diff --git a/assets/index-CJJ9dfwM.js b/assets/index-CJJ9dfwM.js new file mode 100644 index 0000000..0bce5c1 --- /dev/null +++ b/assets/index-CJJ9dfwM.js @@ -0,0 +1,200 @@ +function HR(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var xr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ga(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ys(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var VR={exports:{}},Sg={},KR={exports:{}},Bt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var np=Symbol.for("react.element"),kM=Symbol.for("react.portal"),EM=Symbol.for("react.fragment"),RM=Symbol.for("react.strict_mode"),PM=Symbol.for("react.profiler"),TM=Symbol.for("react.provider"),OM=Symbol.for("react.context"),jM=Symbol.for("react.forward_ref"),LM=Symbol.for("react.suspense"),IM=Symbol.for("react.memo"),MM=Symbol.for("react.lazy"),r_=Symbol.iterator;function NM(e){return e===null||typeof e!="object"?null:(e=r_&&e[r_]||e["@@iterator"],typeof e=="function"?e:null)}var qR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},YR=Object.assign,QR={};function Au(e,t,n){this.props=e,this.context=t,this.refs=QR,this.updater=n||qR}Au.prototype.isReactComponent={};Au.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Au.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function XR(){}XR.prototype=Au.prototype;function tw(e,t,n){this.props=e,this.context=t,this.refs=QR,this.updater=n||qR}var nw=tw.prototype=new XR;nw.constructor=tw;YR(nw,Au.prototype);nw.isPureReactComponent=!0;var i_=Array.isArray,JR=Object.prototype.hasOwnProperty,rw={current:null},ZR={key:!0,ref:!0,__self:!0,__source:!0};function e2(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)JR.call(t,r)&&!ZR.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,Ue=H[Oe];if(0>>1;Oei(qe,le))Rei(tt,qe)?(H[Oe]=tt,H[Re]=le,Oe=Re):(H[Oe]=qe,H[ke]=le,Oe=ke);else if(Rei(tt,le))H[Oe]=tt,H[Re]=le,Oe=Re;else break e}}return V}function i(H,V){var le=H.sortIndex-V.sortIndex;return le!==0?le: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,h=!1,m=!1,g=!1,E=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,x=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),!m)if(n(l)!==null)m=!0,oe(k);else{var V=n(c);V!==null&&fe(_,V.startTime-H)}}function k(H,V){m=!1,g&&(g=!1,b(T),T=-1),h=!0;var le=f;try{for(y(V),d=n(l);d!==null&&(!(d.expirationTime>V)||H&&!M());){var Oe=d.callback;if(typeof Oe=="function"){d.callback=null,f=d.priorityLevel;var Ue=Oe(d.expirationTime<=V);V=e.unstable_now(),typeof Ue=="function"?d.callback=Ue:d===n(l)&&r(l),y(V)}else r(l);d=n(l)}if(d!==null)var Te=!0;else{var ke=n(c);ke!==null&&fe(_,ke.startTime-V),Te=!1}return Te}finally{d=null,f=le,h=!1}}var O=!1,R=null,T=-1,$=5,L=-1;function M(){return!(e.unstable_now()-L<$)}function F(){if(R!==null){var H=e.unstable_now();L=H;var V=!0;try{V=R(!0,H)}finally{V?z():(O=!1,R=null)}}else O=!1}var z;if(typeof x=="function")z=function(){x(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 oe(H){R=H,O||(O=!0,z())}function fe(H,V){T=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(){m||h||(m=!0,oe(k))},e.unstable_forceFrameRate=function(H){0>H||125Oe?(H.sortIndex=le,t(c,H),n(l)===null&&H===n(c)&&(g?(b(T),T=-1):g=!0,fe(_,le-Oe))):(H.sortIndex=Ue,t(l,H),m||h||(m=!0,oe(k))),H},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(H){var V=f;return function(){var le=f;f=V;try{return H.apply(this,arguments)}finally{f=le}}}})(o2);i2.exports=o2;var VM=i2.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var KM=C,Li=VM;function Ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rb=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]*$/,s_={},a_={};function YM(e){return rb.call(a_,e)?!0:rb.call(s_,e)?!1:qM.test(e)?a_[e]=!0:(s_[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 Hr(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 cr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){cr[e]=new Hr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];cr[t]=new Hr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){cr[e]=new Hr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){cr[e]=new Hr(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){cr[e]=new Hr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){cr[e]=new Hr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){cr[e]=new Hr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){cr[e]=new Hr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){cr[e]=new Hr(e,5,!1,e.toLowerCase(),null,!1,!1)});var ow=/[\-:]([a-z])/g;function sw(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(ow,sw);cr[t]=new Hr(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(ow,sw);cr[t]=new Hr(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(ow,sw);cr[t]=new Hr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){cr[e]=new Hr(e,1,!1,e.toLowerCase(),null,!1,!1)});cr.xlinkHref=new Hr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){cr[e]=new Hr(e,1,!1,e.toLowerCase(),null,!0,!0)});function aw(e,t,n,r){var i=cr.hasOwnProperty(t)?cr[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{Ey=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?jd(e):""}function JM(e){switch(e.tag){case 5:return jd(e.type);case 16:return jd("Lazy");case 13:return jd("Suspense");case 19:return jd("SuspenseList");case 0:case 2:case 15:return e=Ry(e.type,!1),e;case 11:return e=Ry(e.type.render,!1),e;case 1:return e=Ry(e.type,!0),e;default:return""}}function ab(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 Bc:return"Fragment";case Ac:return"Portal";case ib:return"Profiler";case lw:return"StrictMode";case ob:return"Suspense";case sb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case l2:return(e.displayName||"Context")+".Consumer";case a2:return(e._context.displayName||"Context")+".Provider";case cw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case uw:return t=e.displayName||null,t!==null?t:ab(e.type)||"Memo";case ha:t=e._payload,e=e._init;try{return ab(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 ab(t);case 8:return t===lw?"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 u2(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function eN(e){var t=u2(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 Kp(e){e._valueTracker||(e._valueTracker=eN(e))}function d2(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=u2(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function lm(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 lb(e,t){var n=t.checked;return Sn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function c_(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 f2(e,t){t=t.checked,t!=null&&aw(e,"checked",t,!1)}function cb(e,t){f2(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")?ub(e,t.type,n):t.hasOwnProperty("defaultValue")&&ub(e,t.type,Da(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function u_(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 ub(e,t,n){(t!=="number"||lm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ld=Array.isArray;function Zc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=qp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function gf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ud={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(Ud).forEach(function(e){tN.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ud[t]=Ud[e]})});function g2(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ud.hasOwnProperty(e)&&Ud[e]?(""+t).trim():t+"px"}function v2(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=g2(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var nN=Sn({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 pb(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 hb(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 mb=null;function dw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gb=null,eu=null,tu=null;function p_(e){if(e=op(e)){if(typeof gb!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=Rg(t),gb(e.stateNode,e.type,t))}}function y2(e){eu?tu?tu.push(e):tu=[e]:eu=e}function b2(){if(eu){var e=eu,t=tu;if(tu=eu=null,p_(e),t)for(e=0;e>>=0,e===0?32:31-(pN(e)/hN|0)|0}var Yp=64,Qp=4194304;function Id(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 fm(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=Id(a):(o&=s,o!==0&&(r=Id(o)))}else s=n&~i,s!==0?r=Id(s):o!==0&&(r=Id(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 rp(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=Gd),S_=" ",__=!1;function B2(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 F2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fc=!1;function qN(e,t){switch(e){case"compositionend":return F2(t);case"keypress":return t.which!==32?null:(__=!0,S_);case"textInput":return e=t.data,e===S_&&__?null:e;default:return null}}function YN(e,t){if(Fc)return e==="compositionend"||!bw&&B2(e,t)?(e=D2(),Mh=gw=wa=null,Fc=!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=R_(n)}}function G2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?G2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function H2(){for(var e=window,t=lm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=lm(e.document)}return t}function ww(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=H2(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&G2(n.ownerDocument.documentElement,n)){if(r!==null&&ww(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=P_(n,o);var s=P_(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,zc=null,Sb=null,Vd=null,_b=!1;function T_(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_b||zc==null||zc!==lm(r)||(r=zc,"selectionStart"in r&&ww(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}),Vd&&Sf(Vd,r)||(Vd=r,r=mm(Sb,"onSelect"),0Gc||(e.current=Tb[Gc],Tb[Gc]=null,Gc--)}function dn(e,t){Gc++,Tb[Gc]=e.current,e.current=t}var Aa={},_r=Va(Aa),ti=Va(!1),Al=Aa;function pu(e,t){var n=e.type.contextTypes;if(!n)return Aa;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 ni(e){return e=e.childContextTypes,e!=null}function vm(){hn(ti),hn(_r)}function $_(e,t,n){if(_r.current!==Aa)throw Error(Ne(168));dn(_r,t),dn(ti,n)}function eP(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 Sn({},n,r)}function ym(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Aa,Al=_r.current,dn(_r,e),dn(ti,ti.current),!0}function D_(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=eP(e,t,Al),r.__reactInternalMemoizedMergedChildContext=e,hn(ti),hn(_r),dn(_r,e)):hn(ti),dn(ti,n)}var _s=null,Pg=!1,zy=!1;function tP(e){_s===null?_s=[e]:_s.push(e)}function g$(e){Pg=!0,tP(e)}function Ka(){if(!zy&&_s!==null){zy=!0;var e=0,t=Qt;try{var n=_s;for(Qt=1;e>=s,i-=s,Es=1<<32-To(t)+i|n<T?($=R,R=null):$=R.sibling;var L=f(b,R,y[T],_);if(L===null){R===null&&(R=$);break}e&&R&&L.alternate===null&&t(b,R),x=o(L,x,T),O===null?k=L:O.sibling=L,O=L,R=$}if(T===y.length)return n(b,R),gn&&pl(b,T),k;if(R===null){for(;TT?($=R,R=null):$=R.sibling;var M=f(b,R,L.value,_);if(M===null){R===null&&(R=$);break}e&&R&&M.alternate===null&&t(b,R),x=o(M,x,T),O===null?k=M:O.sibling=M,O=M,R=$}if(L.done)return n(b,R),gn&&pl(b,T),k;if(R===null){for(;!L.done;T++,L=y.next())L=d(b,L.value,_),L!==null&&(x=o(L,x,T),O===null?k=L:O.sibling=L,O=L);return gn&&pl(b,T),k}for(R=r(b,R);!L.done;T++,L=y.next())L=h(R,b,T,L.value,_),L!==null&&(e&&L.alternate!==null&&R.delete(L.key===null?T:L.key),x=o(L,x,T),O===null?k=L:O.sibling=L,O=L);return e&&R.forEach(function(F){return t(b,F)}),gn&&pl(b,T),k}function E(b,x,y,_){if(typeof y=="object"&&y!==null&&y.type===Bc&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Vp:e:{for(var k=y.key,O=x;O!==null;){if(O.key===k){if(k=y.type,k===Bc){if(O.tag===7){n(b,O.sibling),x=i(O,y.props.children),x.return=b,b=x;break e}}else if(O.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ha&&F_(k)===O.type){n(b,O.sibling),x=i(O,y.props),x.ref=hd(b,O,y),x.return=b,b=x;break e}n(b,O);break}else t(b,O);O=O.sibling}y.type===Bc?(x=jl(y.props.children,b.mode,_,y.key),x.return=b,b=x):(_=Uh(y.type,y.key,y.props,null,b.mode,_),_.ref=hd(b,x,y),_.return=b,b=_)}return s(b);case Ac:e:{for(O=y.key;x!==null;){if(x.key===O)if(x.tag===4&&x.stateNode.containerInfo===y.containerInfo&&x.stateNode.implementation===y.implementation){n(b,x.sibling),x=i(x,y.children||[]),x.return=b,b=x;break e}else{n(b,x);break}else t(b,x);x=x.sibling}x=Yy(y,b.mode,_),x.return=b,b=x}return s(b);case ha:return O=y._init,E(b,x,O(y._payload),_)}if(Ld(y))return m(b,x,y,_);if(cd(y))return g(b,x,y,_);rh(b,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,x!==null&&x.tag===6?(n(b,x.sibling),x=i(x,y),x.return=b,b=x):(n(b,x),x=qy(y,b.mode,_),x.return=b,b=x),s(b)):n(b,x)}return E}var mu=oP(!0),sP=oP(!1),xm=Va(null),Sm=null,Kc=null,Cw=null;function kw(){Cw=Kc=Sm=null}function Ew(e){var t=xm.current;hn(xm),e._currentValue=t}function Lb(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 ru(e,t){Sm=e,Cw=Kc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ei=!0),e.firstContext=null)}function ro(e){var t=e._currentValue;if(Cw!==e)if(e={context:e,memoizedValue:t,next:null},Kc===null){if(Sm===null)throw Error(Ne(308));Kc=e,Sm.dependencies={lanes:0,firstContext:e}}else Kc=Kc.next=e;return t}var xl=null;function Rw(e){xl===null?xl=[e]:xl.push(e)}function aP(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Rw(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 Pw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lP(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 Ta(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,zt&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,Rw(r)):(t.next=i.next,i.next=t),r.interleaved=t,Bs(e,n)}function $h(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,pw(e,n)}}function z_(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 _m(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,h=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,g=a;switch(f=t,h=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(h,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(h,d,f):m,f==null)break e;d=Sn({},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 h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=h,l=d):u=u.next=h,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);zl|=s,e.lanes=s,e.memoizedState=d}}function U_(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Wy.transition;Wy.transition={};try{e(!1),t()}finally{Qt=n,Wy.transition=r}}function kP(){return io().memoizedState}function w$(e,t,n){var r=ja(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},EP(e))RP(t,n);else if(n=aP(e,t,n,r),n!==null){var i=Ur();Oo(n,e,r,i),PP(n,t,r)}}function x$(e,t,n){var r=ja(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(EP(e))RP(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,Rw(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=aP(e,t,i,r),n!==null&&(i=Ur(),Oo(n,e,r,i),PP(n,t,r))}}function EP(e){var t=e.alternate;return e===xn||t!==null&&t===xn}function RP(e,t){Kd=km=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function PP(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pw(e,n)}}var Em={readContext:ro,useCallback:vr,useContext:vr,useEffect:vr,useImperativeHandle:vr,useInsertionEffect:vr,useLayoutEffect:vr,useMemo:vr,useReducer:vr,useRef:vr,useState:vr,useDebugValue:vr,useDeferredValue:vr,useTransition:vr,useMutableSource:vr,useSyncExternalStore:vr,useId:vr,unstable_isNewReconciler:!1},S$={readContext:ro,useCallback:function(e,t){return qo().memoizedState=[e,t===void 0?null:t],e},useContext:ro,useEffect:G_,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ah(4194308,4,wP.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ah(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ah(4,2,e,t)},useMemo:function(e,t){var n=qo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=qo();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,xn,e),[r.memoizedState,e]},useRef:function(e){var t=qo();return e={current:e},t.memoizedState=e},useState:W_,useDebugValue:$w,useDeferredValue:function(e){return qo().memoizedState=e},useTransition:function(){var e=W_(!1),t=e[0];return e=b$.bind(null,e[1]),qo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xn,i=qo();if(gn){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),er===null)throw Error(Ne(349));Fl&30||fP(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,G_(hP.bind(null,r,o,e),[e]),r.flags|=2048,Of(9,pP.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=qo(),t=er.identifierPrefix;if(gn){var n=Rs,r=Es;n=(r&~(1<<32-To(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Pf++,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[Zo]=t,e[kf]=r,AP(e,t,!1,!1),t.stateNode=e;e:{switch(s=hb(n,r),n){case"dialog":pn("cancel",e),pn("close",e),i=r;break;case"iframe":case"object":case"embed":pn("load",e),i=r;break;case"video":case"audio":for(i=0;iyu&&(t.flags|=128,r=!0,md(o,!1),t.lanes=4194304)}else{if(!r)if(e=Cm(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),md(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!gn)return yr(t),null}else 2*jn()-o.renderingStartTime>yu&&n!==1073741824&&(t.flags|=128,r=!0,md(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=wn.current,dn(wn,r?n&1|2:n&1),t):(yr(t),null);case 22:case 23:return Uw(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?wi&1073741824&&(yr(t),t.subtreeFlags&6&&(t.flags|=8192)):yr(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function O$(e,t){switch(Sw(t),t.tag){case 1:return ni(t.type)&&vm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gu(),hn(ti),hn(_r),jw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ow(t),null;case 13:if(hn(wn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));hu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return hn(wn),null;case 4:return gu(),null;case 10:return Ew(t.type._context),null;case 22:case 23:return Uw(),null;case 24:return null;default:return null}}var oh=!1,Sr=!1,j$=typeof WeakSet=="function"?WeakSet:Set,rt=null;function qc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Rn(e,t,r)}else n.current=null}function zb(e,t,n){try{n()}catch(r){Rn(e,t,r)}}var tC=!1;function L$(e,t){if(Cb=pm,e=H2(),ww(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 h;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),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++c===i&&(a=s),f===o&&++u===r&&(l=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(kb={focusedElem:e,selectionRange:n},pm=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,E=m.memoizedState,b=t.stateNode,x=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:_o(t.type,g),E);b.__reactInternalSnapshotBeforeUpdate=x}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(_){Rn(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return m=tC,tC=!1,m}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&&zb(t,n,o)}i=i.next}while(i!==r)}}function jg(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 Ub(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 zP(e){var t=e.alternate;t!==null&&(e.alternate=null,zP(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zo],delete t[kf],delete t[Pb],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 UP(e){return e.tag===5||e.tag===3||e.tag===4}function nC(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||UP(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 Wb(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=gm));else if(r!==4&&(e=e.child,e!==null))for(Wb(e,t,n),e=e.sibling;e!==null;)Wb(e,t,n),e=e.sibling}function Gb(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(Gb(e,t,n),e=e.sibling;e!==null;)Gb(e,t,n),e=e.sibling}var ir=null,Co=!1;function la(e,t,n){for(n=n.child;n!==null;)WP(e,t,n),n=n.sibling}function WP(e,t,n){if(is&&typeof is.onCommitFiberUnmount=="function")try{is.onCommitFiberUnmount(_g,n)}catch{}switch(n.tag){case 5:Sr||qc(n,t);case 6:var r=ir,i=Co;ir=null,la(e,t,n),ir=r,Co=i,ir!==null&&(Co?(e=ir,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ir.removeChild(n.stateNode));break;case 18:ir!==null&&(Co?(e=ir,n=n.stateNode,e.nodeType===8?Fy(e.parentNode,n):e.nodeType===1&&Fy(e,n),wf(e)):Fy(ir,n.stateNode));break;case 4:r=ir,i=Co,ir=n.stateNode.containerInfo,Co=!0,la(e,t,n),ir=r,Co=i;break;case 0:case 11:case 14:case 15:if(!Sr&&(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)&&zb(n,t,s),i=i.next}while(i!==r)}la(e,t,n);break;case 1:if(!Sr&&(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Rn(n,t,a)}la(e,t,n);break;case 21:la(e,t,n);break;case 22:n.mode&1?(Sr=(r=Sr)||n.memoizedState!==null,la(e,t,n),Sr=r):la(e,t,n);break;default:la(e,t,n)}}function rC(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 xo(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,Tm=0,zt&6)throw Error(Ne(331));var i=zt;for(zt|=4,rt=e.current;rt!==null;){var o=rt,s=o.child;if(rt.flags&16){var a=o.deletions;if(a!==null){for(var l=0;ljn()-Fw?Ol(e,0):Bw|=n),ri(e,t)}function XP(e,t){t===0&&(e.mode&1?(t=Qp,Qp<<=1,!(Qp&130023424)&&(Qp=4194304)):t=1);var n=Ur();e=Bs(e,t),e!==null&&(rp(e,t,n),ri(e,n))}function F$(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),XP(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),XP(e,n)}var JP;JP=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ti.current)ei=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ei=!1,P$(e,t,n);ei=!!(e.flags&131072)}else ei=!1,gn&&t.flags&1048576&&nP(t,wm,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bh(e,t),e=t.pendingProps;var i=pu(t,_r.current);ru(t,n),i=Iw(null,t,r,e,i,n);var o=Mw();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,ni(r)?(o=!0,ym(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Pw(t),i.updater=Og,t.stateNode=i,i._reactInternals=t,Mb(t,r,e,n),t=Db(null,t,r,!0,o,n)):(t.tag=0,gn&&o&&xw(t),zr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bh(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=W$(r),e=_o(r,e),i){case 0:t=$b(null,t,r,e,n);break e;case 1:t=J_(null,t,r,e,n);break e;case 11:t=Q_(null,t,r,e,n);break e;case 14:t=X_(null,t,r,_o(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:_o(r,i),$b(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_o(r,i),J_(e,t,r,i,n);case 3:e:{if(NP(t),e===null)throw Error(Ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,lP(e,t),_m(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=vu(Error(Ne(423)),t),t=Z_(e,t,r,n,i);break e}else if(r!==i){i=vu(Error(Ne(424)),t),t=Z_(e,t,r,n,i);break e}else for(Ri=Pa(t.stateNode.containerInfo.firstChild),Oi=t,gn=!0,Po=null,n=sP(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(hu(),r===i){t=Fs(e,t,n);break e}zr(e,t,r,n)}t=t.child}return t;case 5:return cP(t),e===null&&jb(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Eb(r,i)?s=null:o!==null&&Eb(r,o)&&(t.flags|=32),MP(e,t),zr(e,t,s,n),t.child;case 6:return e===null&&jb(t),null;case 13:return $P(e,t,n);case 4:return Tw(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=mu(t,null,r,n):zr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_o(r,i),Q_(e,t,r,i,n);case 7:return zr(e,t,t.pendingProps,n),t.child;case 8:return zr(e,t,t.pendingProps.children,n),t.child;case 12:return zr(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,dn(xm,r._currentValue),r._currentValue=s,o!==null)if(Io(o.value,s)){if(o.children===i.children&&!ti.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),Lb(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),Lb(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}zr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ru(t,n),i=ro(i),r=r(i),t.flags|=1,zr(e,t,r,n),t.child;case 14:return r=t.type,i=_o(r,t.pendingProps),i=_o(r.type,i),X_(e,t,r,i,n);case 15:return LP(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_o(r,i),Bh(e,t),t.tag=1,ni(r)?(e=!0,ym(t)):e=!1,ru(t,n),TP(t,r,i),Mb(t,r,i,n),Db(null,t,r,!0,e,n);case 19:return DP(e,t,n);case 22:return IP(e,t,n)}throw Error(Ne(156,t.tag))};function ZP(e,t){return E2(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 Ji(e,t,n,r){return new U$(e,t,n,r)}function Gw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function W$(e){if(typeof e=="function")return Gw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===cw)return 11;if(e===uw)return 14}return 2}function La(e,t){var n=e.alternate;return n===null?(n=Ji(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 Uh(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Gw(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Bc:return jl(n.children,i,o,t);case lw:s=8,i|=8;break;case ib:return e=Ji(12,n,t,i|2),e.elementType=ib,e.lanes=o,e;case ob:return e=Ji(13,n,t,i),e.elementType=ob,e.lanes=o,e;case sb:return e=Ji(19,n,t,i),e.elementType=sb,e.lanes=o,e;case c2:return Ig(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case a2:s=10;break e;case l2:s=9;break e;case cw:s=11;break e;case uw:s=14;break e;case ha:s=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Ji(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jl(e,t,n,r){return e=Ji(7,e,r,t),e.lanes=n,e}function Ig(e,t,n,r){return e=Ji(22,e,r,t),e.elementType=c2,e.lanes=n,e.stateNode={isHidden:!1},e}function qy(e,t,n){return e=Ji(6,e,null,t),e.lanes=n,e}function Yy(e,t,n){return t=Ji(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=Ty(0),this.expirationTimes=Ty(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ty(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Hw(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=Ji(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pw(o),e}function H$(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rT)}catch(e){console.error(e)}}rT(),r2.exports=$i;var Ag=r2.exports;const Nd=Ga(Ag),Q$=HR({__proto__:null,default:Nd},[Ag]);var dC=Ag;nb.createRoot=dC.createRoot,nb.hydrateRoot=dC.hydrateRoot;/** + * @remix-run/router v1.19.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function bn(){return bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Wl(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 pC(e,t){return{usr:e.state,key:e.key,idx:t}}function Lf(e,t,n,r){return n===void 0&&(n=null),bn({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Xs(t):t,{state:n,key:t&&t.key||r||J$()})}function Gl(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 Xs(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=Dn.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(bn({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){a=Dn.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=Dn.Push;let x=Lf(g.location,E,b);n&&n(x,E),c=u()+1;let y=pC(x,c),_=g.createHref(x);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 h(E,b){a=Dn.Replace;let x=Lf(g.location,E,b);n&&n(x,E),c=u();let y=pC(x,c),_=g.createHref(x);s.replaceState(y,"",_),o&&l&&l({action:a,location:g.location,delta:0})}function m(E){let b=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof E=="string"?E:Gl(E);return x=x.replace(/ $/,"%20"),Rt(b,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,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(fC,d),l=E,()=>{i.removeEventListener(fC,d),l=null}},createHref(E){return t(i,E)},createURL:m,encodeLocation(E){let b=m(E);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:h,go(E){return s.go(E)}};return g}var Zt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Zt||(Zt={}));const eD=new Set(["lazy","caseSensitive","path","id","index","children"]);function tD(e){return e.index===!0}function If(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(Rt(i.index!==!0||!i.children,"Cannot specify children on an index route"),Rt(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),tD(i)){let l=bn({},i,t(i),{id:a});return r[a]=l,l}else{let l=bn({},i,t(i),{id:a,children:void 0});return r[a]=l,i.children&&(l.children=If(i.children,t,s,r)),l}})}function yl(e,t,n){return n===void 0&&(n="/"),Wh(e,t,n,!1)}function Wh(e,t,n,r){let i=typeof t=="string"?Xs(t):t,o=Mo(i.pathname||"/",n);if(o==null)return null;let s=iT(e);rD(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("/")&&(Rt(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&&(Rt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),iT(o.children,t,u,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:uD(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 oT(o.path))i(o,s,l)}),t}function oT(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=oT(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 rD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:dD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const iD=/^:[\w-]+$/,oD=3,sD=2,aD=1,lD=10,cD=-2,hC=e=>e==="*";function uD(e,t){let n=e.split("/"),r=n.length;return n.some(hC)&&(r+=cD),t&&(r+=sD),n.filter(i=>!hC(i)).reduce((i,o)=>i+(iD.test(o)?oD:o===""?aD:lD),r)}function dD(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 fD(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a{let{paramName:f,isOptional:h}=u;if(f==="*"){let g=a[d]||"";s=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const m=a[d];return h&&!m?c[f]=void 0:c[f]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:e}}function pD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Wl(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 hD(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Wl(!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 mD(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Xs(e):e;return{pathname:n?n.startsWith("/")?n:gD(n,t):t,search:yD(r),hash:bD(i)}}function gD(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 Qy(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 sT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Bg(e,t){let n=sT(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Fg(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Xs(e):(i=bn({},e),Rt(!i.pathname||!i.pathname.includes("?"),Qy("?","pathname","search",i)),Rt(!i.pathname||!i.pathname.includes("#"),Qy("#","pathname","hash",i)),Rt(!i.search||!i.search.includes("#"),Qy("#","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=mD(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,"/"),vD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),yD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Im{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 zg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const aT=["post","put","patch","delete"],wD=new Set(aT),xD=["get",...aT],SD=new Set(xD),_D=new Set([301,302,303,307,308]),CD=new Set([307,308]),Xy={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},kD={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},jc={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Yw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ED=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),lT="remix-router-transitions";function RD(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;Rt(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=te=>({hasErrorBoundary:Q(te)})}else i=ED;let o={},s=If(e.routes,i,void 0,o),a,l=e.basename||"/",c=e.unstable_dataStrategy||LD,u=e.unstable_patchRoutesOnNavigation,d=bn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),f=null,h=new Set,m=1e3,g=new Set,E=null,b=null,x=null,y=e.hydrationData!=null,_=yl(s,e.history.location,l),k=null;if(_==null&&!u){let Q=Fr(404,{pathname:e.history.location.pathname}),{matches:te,route:ge}=CC(s);_=te,k={[ge.id]:Q}}_&&!e.hydrationData&&Un(_,s,e.history.location.pathname).active&&(_=null);let O;if(_)if(_.some(Q=>Q.route.lazy))O=!1;else if(!_.some(Q=>Q.route.loader))O=!0;else if(d.v7_partialHydration){let Q=e.hydrationData?e.hydrationData.loaderData:null,te=e.hydrationData?e.hydrationData.errors:null,ge=xe=>xe.route.loader?typeof xe.route.loader=="function"&&xe.route.loader.hydrate===!0?!1:Q&&Q[xe.route.id]!==void 0||te&&te[xe.route.id]!==void 0:!0;if(te){let xe=_.findIndex(He=>te[He.route.id]!==void 0);O=_.slice(0,xe+1).every(ge)}else O=_.every(ge)}else O=e.hydrationData!=null;else if(O=!1,_=[],d.v7_partialHydration){let Q=Un(null,s,e.history.location.pathname);Q.active&&Q.matches&&(_=Q.matches)}let R,T={historyAction:e.history.action,location:e.history.location,matches:_,initialized:O,navigation:Xy,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||k,fetchers:new Map,blockers:new Map},$=Dn.Pop,L=!1,M,F=!1,z=new Map,K=null,Z=!1,oe=!1,fe=[],H=new Set,V=new Map,le=0,Oe=-1,Ue=new Map,Te=new Set,ke=new Map,qe=new Map,Re=new Set,tt=new Map,at=new Map,Pe=new Map,Pt=!1;function ct(){if(f=e.history.listen(Q=>{let{action:te,location:ge,delta:xe}=Q;if(Pt){Pt=!1;return}Wl(at.size===0||xe!=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 He=kr({currentLocation:T.location,nextLocation:ge,historyAction:te});if(He&&xe!=null){Pt=!0,e.history.go(xe*-1),ui(He,{state:"blocked",location:ge,proceed(){ui(He,{state:"proceeding",proceed:void 0,reset:void 0,location:ge}),e.history.go(xe)},reset(){let Qe=new Map(T.blockers);Qe.set(He,jc),nt({blockers:Qe})}});return}return Be(te,ge)}),n){HD(t,z);let Q=()=>VD(t,z);t.addEventListener("pagehide",Q),K=()=>t.removeEventListener("pagehide",Q)}return T.initialized||Be(Dn.Pop,T.location,{initialHydration:!0}),R}function Ze(){f&&f(),K&&K(),h.clear(),M&&M.abort(),T.fetchers.forEach((Q,te)=>Xe(te)),T.blockers.forEach((Q,te)=>Wi(te))}function ot(Q){return h.add(Q),()=>h.delete(Q)}function nt(Q,te){te===void 0&&(te={}),T=bn({},T,Q);let ge=[],xe=[];d.v7_fetcherPersist&&T.fetchers.forEach((He,Qe)=>{He.state==="idle"&&(Re.has(Qe)?xe.push(Qe):ge.push(Qe))}),[...h].forEach(He=>He(T,{deletedFetchers:xe,unstable_viewTransitionOpts:te.viewTransitionOpts,unstable_flushSync:te.flushSync===!0})),d.v7_fetcherPersist&&(ge.forEach(He=>T.fetchers.delete(He)),xe.forEach(He=>Xe(He)))}function ee(Q,te,ge){var xe,He;let{flushSync:Qe}=ge===void 0?{}:ge,ht=T.actionData!=null&&T.navigation.formMethod!=null&&ko(T.navigation.formMethod)&&T.navigation.state==="loading"&&((xe=Q.state)==null?void 0:xe._isRedirect)!==!0,ze;te.actionData?Object.keys(te.actionData).length>0?ze=te.actionData:ze=null:ht?ze=T.actionData:ze=null;let yt=te.loaderData?SC(T.loaderData,te.loaderData,te.matches||[],te.errors):T.loaderData,dt=T.blockers;dt.size>0&&(dt=new Map(dt),dt.forEach((St,vt)=>dt.set(vt,jc)));let bt=L===!0||T.navigation.formMethod!=null&&ko(T.navigation.formMethod)&&((He=Q.state)==null?void 0:He._isRedirect)!==!0;a&&(s=a,a=void 0),Z||$===Dn.Pop||($===Dn.Push?e.history.push(Q,Q.state):$===Dn.Replace&&e.history.replace(Q,Q.state));let Je;if($===Dn.Pop){let St=z.get(T.location.pathname);St&&St.has(Q.pathname)?Je={currentLocation:T.location,nextLocation:Q}:z.has(Q.pathname)&&(Je={currentLocation:Q,nextLocation:T.location})}else if(F){let St=z.get(T.location.pathname);St?St.add(Q.pathname):(St=new Set([Q.pathname]),z.set(T.location.pathname,St)),Je={currentLocation:T.location,nextLocation:Q}}nt(bn({},te,{actionData:ze,loaderData:yt,historyAction:$,location:Q,initialized:!0,navigation:Xy,revalidation:"idle",restoreScrollPosition:hi(Q,te.matches||T.matches),preventScrollReset:bt,blockers:dt}),{viewTransitionOpts:Je,flushSync:Qe===!0}),$=Dn.Pop,L=!1,F=!1,Z=!1,oe=!1,fe=[]}async function me(Q,te){if(typeof Q=="number"){e.history.go(Q);return}let ge=Yb(T.location,T.matches,l,d.v7_prependBasename,Q,d.v7_relativeSplatPath,te==null?void 0:te.fromRouteId,te==null?void 0:te.relative),{path:xe,submission:He,error:Qe}=mC(d.v7_normalizeFormMethod,!1,ge,te),ht=T.location,ze=Lf(T.location,xe,te&&te.state);ze=bn({},ze,e.history.encodeLocation(ze));let yt=te&&te.replace!=null?te.replace:void 0,dt=Dn.Push;yt===!0?dt=Dn.Replace:yt===!1||He!=null&&ko(He.formMethod)&&He.formAction===T.location.pathname+T.location.search&&(dt=Dn.Replace);let bt=te&&"preventScrollReset"in te?te.preventScrollReset===!0:void 0,Je=(te&&te.unstable_flushSync)===!0,St=kr({currentLocation:ht,nextLocation:ze,historyAction:dt});if(St){ui(St,{state:"blocked",location:ze,proceed(){ui(St,{state:"proceeding",proceed:void 0,reset:void 0,location:ze}),me(Q,te)},reset(){let vt=new Map(T.blockers);vt.set(St,jc),nt({blockers:vt})}});return}return await Be(dt,ze,{submission:He,pendingError:Qe,preventScrollReset:bt,replace:te&&te.replace,enableViewTransition:te&&te.unstable_viewTransition,flushSync:Je})}function _e(){if(je(),nt({revalidation:"loading"}),T.navigation.state!=="submitting"){if(T.navigation.state==="idle"){Be(T.historyAction,T.location,{startUninterruptedRevalidation:!0});return}Be($||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation})}}async function Be(Q,te,ge){M&&M.abort(),M=null,$=Q,Z=(ge&&ge.startUninterruptedRevalidation)===!0,pi(T.location,T.matches),L=(ge&&ge.preventScrollReset)===!0,F=(ge&&ge.enableViewTransition)===!0;let xe=a||s,He=ge&&ge.overrideNavigation,Qe=yl(xe,te,l),ht=(ge&&ge.flushSync)===!0,ze=Un(Qe,xe,te.pathname);if(ze.active&&ze.matches&&(Qe=ze.matches),!Qe){let{error:jt,notFoundMatches:Yt,route:fn}=vo(te.pathname);ee(te,{matches:Yt,loaderData:{},errors:{[fn.id]:jt}},{flushSync:ht});return}if(T.initialized&&!oe&&AD(T.location,te)&&!(ge&&ge.submission&&ko(ge.submission.formMethod))){ee(te,{matches:Qe},{flushSync:ht});return}M=new AbortController;let yt=gc(e.history,te,M.signal,ge&&ge.submission),dt;if(ge&&ge.pendingError)dt=[Qc(Qe).route.id,{type:Zt.error,error:ge.pendingError}];else if(ge&&ge.submission&&ko(ge.submission.formMethod)){let jt=await W(yt,te,ge.submission,Qe,ze.active,{replace:ge.replace,flushSync:ht});if(jt.shortCircuited)return;if(jt.pendingActionResult){let[Yt,fn]=jt.pendingActionResult;if(xi(fn)&&zg(fn.error)&&fn.error.status===404){M=null,ee(te,{matches:jt.matches,loaderData:{},errors:{[Yt]:fn.error}});return}}Qe=jt.matches||Qe,dt=jt.pendingActionResult,He=Jy(te,ge.submission),ht=!1,ze.active=!1,yt=gc(e.history,yt.url,yt.signal)}let{shortCircuited:bt,matches:Je,loaderData:St,errors:vt}=await S(yt,te,Qe,ze.active,He,ge&&ge.submission,ge&&ge.fetcherSubmission,ge&&ge.replace,ge&&ge.initialHydration===!0,ht,dt);bt||(M=null,ee(te,bn({matches:Je||Qe},_C(dt),{loaderData:St,errors:vt})))}async function W(Q,te,ge,xe,He,Qe){Qe===void 0&&(Qe={}),je();let ht=WD(te,ge);if(nt({navigation:ht},{flushSync:Qe.flushSync===!0}),He){let dt=await At(xe,te.pathname,Q.signal);if(dt.type==="aborted")return{shortCircuited:!0};if(dt.type==="error"){let{boundaryId:bt,error:Je}=di(te.pathname,dt);return{matches:dt.partialMatches,pendingActionResult:[bt,{type:Zt.error,error:Je}]}}else if(dt.matches)xe=dt.matches;else{let{notFoundMatches:bt,error:Je,route:St}=vo(te.pathname);return{matches:bt,pendingActionResult:[St.id,{type:Zt.error,error:Je}]}}}let ze,yt=$d(xe,te);if(!yt.route.action&&!yt.route.lazy)ze={type:Zt.error,error:Fr(405,{method:Q.method,pathname:te.pathname,routeId:yt.route.id})};else if(ze=(await it("action",Q,[yt],xe))[0],Q.signal.aborted)return{shortCircuited:!0};if(Cl(ze)){let dt;return Qe&&Qe.replace!=null?dt=Qe.replace:dt=bC(ze.response.headers.get("Location"),new URL(Q.url),l)===T.location.pathname+T.location.search,await Fe(Q,ze,{submission:ge,replace:dt}),{shortCircuited:!0}}if(_l(ze))throw Fr(400,{type:"defer-action"});if(xi(ze)){let dt=Qc(xe,yt.route.id);return(Qe&&Qe.replace)!==!0&&($=Dn.Push),{matches:xe,pendingActionResult:[dt.route.id,ze]}}return{matches:xe,pendingActionResult:[yt.route.id,ze]}}async function S(Q,te,ge,xe,He,Qe,ht,ze,yt,dt,bt){let Je=He||Jy(te,Qe),St=Qe||ht||PC(Je),vt=!Z&&(!d.v7_partialHydration||!yt);if(xe){if(vt){let sn=j(bt);nt(bn({navigation:Je},sn!==void 0?{actionData:sn}:{}),{flushSync:dt})}let Et=await At(ge,te.pathname,Q.signal);if(Et.type==="aborted")return{shortCircuited:!0};if(Et.type==="error"){let{boundaryId:sn,error:Xn}=di(te.pathname,Et);return{matches:Et.partialMatches,loaderData:{},errors:{[sn]:Xn}}}else if(Et.matches)ge=Et.matches;else{let{error:sn,notFoundMatches:Xn,route:wt}=vo(te.pathname);return{matches:Xn,loaderData:{},errors:{[wt.id]:sn}}}}let jt=a||s,[Yt,fn]=gC(e.history,T,ge,St,te,d.v7_partialHydration&&yt===!0,d.v7_skipActionErrorRevalidation,oe,fe,H,Re,ke,Te,jt,l,bt);if(zo(Et=>!(ge&&ge.some(sn=>sn.route.id===Et))||Yt&&Yt.some(sn=>sn.route.id===Et)),Oe=++le,Yt.length===0&&fn.length===0){let Et=Tn();return ee(te,bn({matches:ge,loaderData:{},errors:bt&&xi(bt[1])?{[bt[0]]:bt[1].error}:null},_C(bt),Et?{fetchers:new Map(T.fetchers)}:{}),{flushSync:dt}),{shortCircuited:!0}}if(vt){let Et={};if(!xe){Et.navigation=Je;let sn=j(bt);sn!==void 0&&(Et.actionData=sn)}fn.length>0&&(Et.fetchers=A(fn)),nt(Et,{flushSync:dt})}fn.forEach(Et=>{V.has(Et.key)&&Le(Et.key),Et.controller&&V.set(Et.key,Et.controller)});let Yr=()=>fn.forEach(Et=>Le(Et.key));M&&M.signal.addEventListener("abort",Yr);let{loaderResults:Er,fetcherResults:Gi}=await et(T.matches,ge,Yt,fn,Q);if(Q.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",Yr),fn.forEach(Et=>V.delete(Et.key));let mi=kC([...Er,...Gi]);if(mi){if(mi.idx>=Yt.length){let Et=fn[mi.idx-Yt.length].key;Te.add(Et)}return await Fe(Q,mi.result,{replace:ze}),{shortCircuited:!0}}let{loaderData:Wn,errors:Rr}=xC(T,ge,Yt,Er,bt,fn,Gi,tt);tt.forEach((Et,sn)=>{Et.subscribe(Xn=>{(Xn||Et.done)&&tt.delete(sn)})}),d.v7_partialHydration&&yt&&T.errors&&Object.entries(T.errors).filter(Et=>{let[sn]=Et;return!Yt.some(Xn=>Xn.route.id===sn)}).forEach(Et=>{let[sn,Xn]=Et;Rr=Object.assign(Rr||{},{[sn]:Xn})});let gi=Tn(),ms=pr(Oe),Lt=gi||ms||fn.length>0;return bn({matches:ge,loaderData:Wn,errors:Rr},Lt?{fetchers:new Map(T.fetchers)}:{})}function j(Q){if(Q&&!xi(Q[1]))return{[Q[0]]:Q[1].data};if(T.actionData)return Object.keys(T.actionData).length===0?null:T.actionData}function A(Q){return Q.forEach(te=>{let ge=T.fetchers.get(te.key),xe=vd(void 0,ge?ge.data:void 0);T.fetchers.set(te.key,xe)}),new Map(T.fetchers)}function q(Q,te,ge,xe){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.");V.has(Q)&&Le(Q);let He=(xe&&xe.unstable_flushSync)===!0,Qe=a||s,ht=Yb(T.location,T.matches,l,d.v7_prependBasename,ge,d.v7_relativeSplatPath,te,xe==null?void 0:xe.relative),ze=yl(Qe,ht,l),yt=Un(ze,Qe,ht);if(yt.active&&yt.matches&&(ze=yt.matches),!ze){kt(Q,te,Fr(404,{pathname:ht}),{flushSync:He});return}let{path:dt,submission:bt,error:Je}=mC(d.v7_normalizeFormMethod,!0,ht,xe);if(Je){kt(Q,te,Je,{flushSync:He});return}let St=$d(ze,dt);if(L=(xe&&xe.preventScrollReset)===!0,bt&&ko(bt.formMethod)){J(Q,te,dt,St,ze,yt.active,He,bt);return}ke.set(Q,{routeId:te,path:dt}),pe(Q,te,dt,St,ze,yt.active,He,bt)}async function J(Q,te,ge,xe,He,Qe,ht,ze){je(),ke.delete(Q);function yt(wt){if(!wt.route.action&&!wt.route.lazy){let Gn=Fr(405,{method:ze.formMethod,pathname:ge,routeId:te});return kt(Q,te,Gn,{flushSync:ht}),!0}return!1}if(!Qe&&yt(xe))return;let dt=T.fetchers.get(Q);Ye(Q,GD(ze,dt),{flushSync:ht});let bt=new AbortController,Je=gc(e.history,ge,bt.signal,ze);if(Qe){let wt=await At(He,ge,Je.signal);if(wt.type==="aborted")return;if(wt.type==="error"){let{error:Gn}=di(ge,wt);kt(Q,te,Gn,{flushSync:ht});return}else if(wt.matches){if(He=wt.matches,xe=$d(He,ge),yt(xe))return}else{kt(Q,te,Fr(404,{pathname:ge}),{flushSync:ht});return}}V.set(Q,bt);let St=le,jt=(await it("action",Je,[xe],He))[0];if(Je.signal.aborted){V.get(Q)===bt&&V.delete(Q);return}if(d.v7_fetcherPersist&&Re.has(Q)){if(Cl(jt)||xi(jt)){Ye(Q,pa(void 0));return}}else{if(Cl(jt))if(V.delete(Q),Oe>St){Ye(Q,pa(void 0));return}else return Te.add(Q),Ye(Q,vd(ze)),Fe(Je,jt,{fetcherSubmission:ze});if(xi(jt)){kt(Q,te,jt.error);return}}if(_l(jt))throw Fr(400,{type:"defer-action"});let Yt=T.navigation.location||T.location,fn=gc(e.history,Yt,bt.signal),Yr=a||s,Er=T.navigation.state!=="idle"?yl(Yr,T.navigation.location,l):T.matches;Rt(Er,"Didn't find any matches after fetcher action");let Gi=++le;Ue.set(Q,Gi);let mi=vd(ze,jt.data);T.fetchers.set(Q,mi);let[Wn,Rr]=gC(e.history,T,Er,ze,Yt,!1,d.v7_skipActionErrorRevalidation,oe,fe,H,Re,ke,Te,Yr,l,[xe.route.id,jt]);Rr.filter(wt=>wt.key!==Q).forEach(wt=>{let Gn=wt.key,Uo=T.fetchers.get(Gn),Wo=vd(void 0,Uo?Uo.data:void 0);T.fetchers.set(Gn,Wo),V.has(Gn)&&Le(Gn),wt.controller&&V.set(Gn,wt.controller)}),nt({fetchers:new Map(T.fetchers)});let gi=()=>Rr.forEach(wt=>Le(wt.key));bt.signal.addEventListener("abort",gi);let{loaderResults:ms,fetcherResults:Lt}=await et(T.matches,Er,Wn,Rr,fn);if(bt.signal.aborted)return;bt.signal.removeEventListener("abort",gi),Ue.delete(Q),V.delete(Q),Rr.forEach(wt=>V.delete(wt.key));let Et=kC([...ms,...Lt]);if(Et){if(Et.idx>=Wn.length){let wt=Rr[Et.idx-Wn.length].key;Te.add(wt)}return Fe(fn,Et.result)}let{loaderData:sn,errors:Xn}=xC(T,T.matches,Wn,ms,void 0,Rr,Lt,tt);if(T.fetchers.has(Q)){let wt=pa(jt.data);T.fetchers.set(Q,wt)}pr(Gi),T.navigation.state==="loading"&&Gi>Oe?(Rt($,"Expected pending action"),M&&M.abort(),ee(T.navigation.location,{matches:Er,loaderData:sn,errors:Xn,fetchers:new Map(T.fetchers)})):(nt({errors:Xn,loaderData:SC(T.loaderData,sn,Er,Xn),fetchers:new Map(T.fetchers)}),oe=!1)}async function pe(Q,te,ge,xe,He,Qe,ht,ze){let yt=T.fetchers.get(Q);Ye(Q,vd(ze,yt?yt.data:void 0),{flushSync:ht});let dt=new AbortController,bt=gc(e.history,ge,dt.signal);if(Qe){let jt=await At(He,ge,bt.signal);if(jt.type==="aborted")return;if(jt.type==="error"){let{error:Yt}=di(ge,jt);kt(Q,te,Yt,{flushSync:ht});return}else if(jt.matches)He=jt.matches,xe=$d(He,ge);else{kt(Q,te,Fr(404,{pathname:ge}),{flushSync:ht});return}}V.set(Q,dt);let Je=le,vt=(await it("loader",bt,[xe],He))[0];if(_l(vt)&&(vt=await pT(vt,bt.signal,!0)||vt),V.get(Q)===dt&&V.delete(Q),!bt.signal.aborted){if(Re.has(Q)){Ye(Q,pa(void 0));return}if(Cl(vt))if(Oe>Je){Ye(Q,pa(void 0));return}else{Te.add(Q),await Fe(bt,vt);return}if(xi(vt)){kt(Q,te,vt.error);return}Rt(!_l(vt),"Unhandled fetcher deferred data"),Ye(Q,pa(vt.data))}}async function Fe(Q,te,ge){let{submission:xe,fetcherSubmission:He,replace:Qe}=ge===void 0?{}:ge;te.response.headers.has("X-Remix-Revalidate")&&(oe=!0);let ht=te.response.headers.get("Location");Rt(ht,"Expected a Location header on the redirect Response"),ht=bC(ht,new URL(Q.url),l);let ze=Lf(T.location,ht,{_isRedirect:!0});if(n){let vt=!1;if(te.response.headers.has("X-Remix-Reload-Document"))vt=!0;else if(Yw.test(ht)){const jt=e.history.createURL(ht);vt=jt.origin!==t.location.origin||Mo(jt.pathname,l)==null}if(vt){Qe?t.location.replace(ht):t.location.assign(ht);return}}M=null;let yt=Qe===!0||te.response.headers.has("X-Remix-Replace")?Dn.Replace:Dn.Push,{formMethod:dt,formAction:bt,formEncType:Je}=T.navigation;!xe&&!He&&dt&&bt&&Je&&(xe=PC(T.navigation));let St=xe||He;if(CD.has(te.response.status)&&St&&ko(St.formMethod))await Be(yt,ze,{submission:bn({},St,{formAction:ht}),preventScrollReset:L});else{let vt=Jy(ze,xe);await Be(yt,ze,{overrideNavigation:vt,fetcherSubmission:He,preventScrollReset:L})}}async function it(Q,te,ge,xe){try{let He=await ID(c,Q,te,ge,xe,o,i);return await Promise.all(He.map((Qe,ht)=>{if(FD(Qe)){let ze=Qe.result;return{type:Zt.redirect,response:$D(ze,te,ge[ht].route.id,xe,l,d.v7_relativeSplatPath)}}return ND(Qe)}))}catch(He){return ge.map(()=>({type:Zt.error,error:He}))}}async function et(Q,te,ge,xe,He){let[Qe,...ht]=await Promise.all([ge.length?it("loader",He,ge,te):[],...xe.map(ze=>{if(ze.matches&&ze.match&&ze.controller){let yt=gc(e.history,ze.path,ze.controller.signal);return it("loader",yt,[ze.match],ze.matches).then(dt=>dt[0])}else return Promise.resolve({type:Zt.error,error:Fr(404,{pathname:ze.path})})})]);return await Promise.all([RC(Q,ge,Qe,Qe.map(()=>He.signal),!1,T.loaderData),RC(Q,xe.map(ze=>ze.match),ht,xe.map(ze=>ze.controller?ze.controller.signal:null),!0)]),{loaderResults:Qe,fetcherResults:ht}}function je(){oe=!0,fe.push(...zo()),ke.forEach((Q,te)=>{V.has(te)&&(H.add(te),Le(te))})}function Ye(Q,te,ge){ge===void 0&&(ge={}),T.fetchers.set(Q,te),nt({fetchers:new Map(T.fetchers)},{flushSync:(ge&&ge.flushSync)===!0})}function kt(Q,te,ge,xe){xe===void 0&&(xe={});let He=Qc(T.matches,te);Xe(Q),nt({errors:{[He.route.id]:ge},fetchers:new Map(T.fetchers)},{flushSync:(xe&&xe.flushSync)===!0})}function Kt(Q){return d.v7_fetcherPersist&&(qe.set(Q,(qe.get(Q)||0)+1),Re.has(Q)&&Re.delete(Q)),T.fetchers.get(Q)||kD}function Xe(Q){let te=T.fetchers.get(Q);V.has(Q)&&!(te&&te.state==="loading"&&Ue.has(Q))&&Le(Q),ke.delete(Q),Ue.delete(Q),Te.delete(Q),Re.delete(Q),H.delete(Q),T.fetchers.delete(Q)}function _t(Q){if(d.v7_fetcherPersist){let te=(qe.get(Q)||0)-1;te<=0?(qe.delete(Q),Re.add(Q)):qe.set(Q,te)}else Xe(Q);nt({fetchers:new Map(T.fetchers)})}function Le(Q){let te=V.get(Q);Rt(te,"Expected fetch controller: "+Q),te.abort(),V.delete(Q)}function qt(Q){for(let te of Q){let ge=Kt(te),xe=pa(ge.data);T.fetchers.set(te,xe)}}function Tn(){let Q=[],te=!1;for(let ge of Te){let xe=T.fetchers.get(ge);Rt(xe,"Expected fetcher: "+ge),xe.state==="loading"&&(Te.delete(ge),Q.push(ge),te=!0)}return qt(Q),te}function pr(Q){let te=[];for(let[ge,xe]of Ue)if(xe0}function We(Q,te){let ge=T.blockers.get(Q)||jc;return at.get(Q)!==te&&at.set(Q,te),ge}function Wi(Q){T.blockers.delete(Q),at.delete(Q)}function ui(Q,te){let ge=T.blockers.get(Q)||jc;Rt(ge.state==="unblocked"&&te.state==="blocked"||ge.state==="blocked"&&te.state==="blocked"||ge.state==="blocked"&&te.state==="proceeding"||ge.state==="blocked"&&te.state==="unblocked"||ge.state==="proceeding"&&te.state==="unblocked","Invalid blocker state transition: "+ge.state+" -> "+te.state);let xe=new Map(T.blockers);xe.set(Q,te),nt({blockers:xe})}function kr(Q){let{currentLocation:te,nextLocation:ge,historyAction:xe}=Q;if(at.size===0)return;at.size>1&&Wl(!1,"A router only supports one blocker at a time");let He=Array.from(at.entries()),[Qe,ht]=He[He.length-1],ze=T.blockers.get(Qe);if(!(ze&&ze.state==="proceeding")&&ht({currentLocation:te,nextLocation:ge,historyAction:xe}))return Qe}function vo(Q){let te=Fr(404,{pathname:Q}),ge=a||s,{matches:xe,route:He}=CC(ge);return zo(),{notFoundMatches:xe,route:He,error:te}}function di(Q,te){return{boundaryId:Qc(te.partialMatches).route.id,error:Fr(400,{type:"route-discovery",pathname:Q,message:te.error!=null&&"message"in te.error?te.error:String(te.error)})}}function zo(Q){let te=[];return tt.forEach((ge,xe)=>{(!Q||Q(xe))&&(ge.cancel(),te.push(xe),tt.delete(xe))}),te}function tl(Q,te,ge){if(E=Q,x=te,b=ge||null,!y&&T.navigation===Xy){y=!0;let xe=hi(T.location,T.matches);xe!=null&&nt({restoreScrollPosition:xe})}return()=>{E=null,x=null,b=null}}function fi(Q,te){return b&&b(Q,te.map(xe=>nD(xe,T.loaderData)))||Q.key}function pi(Q,te){if(E&&x){let ge=fi(Q,te);E[ge]=x()}}function hi(Q,te){if(E){let ge=fi(Q,te),xe=E[ge];if(typeof xe=="number")return xe}return null}function Un(Q,te,ge){if(u){if(g.has(ge))return{active:!1,matches:Q};if(Q){if(Object.keys(Q[0].params).length>0)return{active:!0,matches:Wh(te,ge,l,!0)}}else return{active:!0,matches:Wh(te,ge,l,!0)||[]}}return{active:!1,matches:null}}async function At(Q,te,ge){let xe=Q;for(;;){let He=a==null,Qe=a||s;try{await jD(u,te,xe,Qe,o,i,Pe,ge)}catch(yt){return{type:"error",error:yt,partialMatches:xe}}finally{He&&(s=[...s])}if(ge.aborted)return{type:"aborted"};let ht=yl(Qe,te,l);if(ht)return on(te,g),{type:"success",matches:ht};let ze=Wh(Qe,te,l,!0);if(!ze||xe.length===ze.length&&xe.every((yt,dt)=>yt.route.id===ze[dt].route.id))return on(te,g),{type:"success",matches:null};xe=ze}}function on(Q,te){if(te.size>=m){let ge=te.values().next().value;te.delete(ge)}te.add(Q)}function nr(Q){o={},a=If(Q,i,void 0,o)}function qr(Q,te){let ge=a==null;uT(Q,te,a||s,o,i),ge&&(s=[...s],nt({}))}return R={get basename(){return l},get future(){return d},get state(){return T},get routes(){return s},get window(){return t},initialize:ct,subscribe:ot,enableScrollRestoration:tl,navigate:me,fetch:q,revalidate:_e,createHref:Q=>e.history.createHref(Q),encodeLocation:Q=>e.history.encodeLocation(Q),getFetcher:Kt,deleteFetcher:_t,dispose:Ze,getBlocker:We,deleteBlocker:Wi,patchRoutes:qr,_internalFetchControllers:V,_internalActiveDeferreds:tt,_internalSetRoutes:nr},R}function PD(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Yb(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=Fg(i||".",Bg(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&&!Qw(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Ls([n,u.pathname])),Gl(u)}function mC(e,t,n,r){if(!r||!PD(r))return{path:n};if(r.formMethod&&!UD(r.formMethod))return{path:n,error:Fr(405,{method:r.formMethod})};let i=()=>({path:n,error:Fr(400,{type:"invalid-body"})}),o=r.formMethod||"get",s=e?o.toUpperCase():o.toLowerCase(),a=dT(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ko(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((h,m)=>{let[g,E]=m;return""+h+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(!ko(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()}}}Rt(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=Qb(r.formData),c=r.formData;else if(r.body instanceof FormData)l=Qb(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=wC(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=wC(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(ko(u.formMethod))return{path:n,submission:u};let d=Xs(n);return t&&d.search&&Qw(d.search)&&l.append("index",""),d.search="?"+l,{path:Gl(d),submission:u}}function TD(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 gC(e,t,n,r,i,o,s,a,l,c,u,d,f,h,m,g){let E=g?xi(g[1])?g[1].error:g[1].data:void 0,b=e.createURL(t.location),x=e.createURL(i),y=g&&xi(g[1])?g[0]:void 0,_=y?TD(n,y):n,k=g?g[1].statusCode:void 0,O=s&&k&&k>=400,R=_.filter(($,L)=>{let{route:M}=$;if(M.lazy)return!0;if(M.loader==null)return!1;if(o)return typeof M.loader!="function"||M.loader.hydrate?!0:t.loaderData[M.id]===void 0&&(!t.errors||t.errors[M.id]===void 0);if(OD(t.loaderData,t.matches[L],$)||l.some(K=>K===$.route.id))return!0;let F=t.matches[L],z=$;return vC($,bn({currentUrl:b,currentParams:F.params,nextUrl:x,nextParams:z.params},r,{actionResult:E,actionStatus:k,defaultShouldRevalidate:O?!1:a||b.pathname+b.search===x.pathname+x.search||b.search!==x.search||cT(F,z)}))}),T=[];return d.forEach(($,L)=>{if(o||!n.some(Z=>Z.route.id===$.routeId)||u.has(L))return;let M=yl(h,$.path,m);if(!M){T.push({key:L,routeId:$.routeId,path:$.path,matches:null,match:null,controller:null});return}let F=t.fetchers.get(L),z=$d(M,$.path),K=!1;f.has(L)?K=!1:c.has(L)?(c.delete(L),K=!0):F&&F.state!=="idle"&&F.data===void 0?K=a:K=vC(z,bn({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:n[n.length-1].params},r,{actionResult:E,actionStatus:k,defaultShouldRevalidate:O?!1:a})),K&&T.push({key:L,routeId:$.routeId,path:$.path,matches:M,match:z,controller:new AbortController})}),[R,T]}function OD(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function cT(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function vC(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function jD(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||uT(u,d,r,i,o)}}),s.set(l,c)),c&&BD(c)&&await c}finally{s.delete(l)}}function uT(e,t,n,r,i){if(e){var o;let s=r[e];Rt(s,"No route found to patch children into: routeId = "+e);let a=If(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=If(t,i,["patch",String(n.length||"0")],r);n.push(...s)}}async function yC(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];Rt(i,"No route found in manifest");let o={};for(let s in r){let l=i[s]!==void 0&&s!=="hasErrorBoundary";Wl(!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&&!eD.has(s)&&(o[s]=r[s])}Object.assign(i,o),Object.assign(i,bn({},t(i),{lazy:void 0}))}function LD(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function ID(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 bn({},d,{shouldLoad:f,resolve:m=>(c.add(d.route.id),f?MD(t,n,d,o,s,m,a):Promise.resolve({type:Zt.data,result:void 0}))})}),request:n,params:i[0].params,context:a});return i.forEach(d=>Rt(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 MD(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 h=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]:[]),m;return o?m=o(g=>h(g)):m=(async()=>{try{return{type:"data",result:await h()}}catch(g){return{type:"error",result:g}}})(),Promise.race([m,f])};try{let u=n.route[e];if(n.route.lazy)if(u){let d,[f]=await Promise.all([c(u).catch(h=>{d=h}),yC(n.route,i,r)]);if(d!==void 0)throw d;a=f}else if(await yC(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 Fr(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:Zt.data,result:void 0};else if(u)a=await c(u);else{let d=new URL(t.url),f=d.pathname+d.search;throw Fr(404,{pathname:f})}Rt(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:Zt.error,result:u}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function ND(e){let{result:t,type:n}=e;if(fT(t)){let c;try{let u=t.headers.get("Content-Type");u&&/\bapplication\/json\b/.test(u)?t.body==null?c=null:c=await t.json():c=await t.text()}catch(u){return{type:Zt.error,error:u}}return n===Zt.error?{type:Zt.error,error:new Im(t.status,t.statusText,c),statusCode:t.status,headers:t.headers}:{type:Zt.data,data:c,statusCode:t.status,headers:t.headers}}if(n===Zt.error){if(EC(t)){var r;if(t.data instanceof Error){var i;return{type:Zt.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new Im(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:Zt.error,error:t,statusCode:zg(t)?t.status:void 0}}if(zD(t)){var o,s;return{type:Zt.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((s=t.init)==null?void 0:s.headers)&&new Headers(t.init.headers)}}if(EC(t)){var a,l;return{type:Zt.data,data:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}}return{type:Zt.data,data:t}}function $D(e,t,n,r,i,o){let s=e.headers.get("Location");if(Rt(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Yw.test(s)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);s=Yb(new URL(t.url),a,i,!0,s,o),e.headers.set("Location",s)}return e}function bC(e,t,n){if(Yw.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 gc(e,t,n,r){let i=e.createURL(dT(t)).toString(),o={signal:n};if(r&&ko(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=Qb(r.formData):o.body=r.formData}return new Request(i,o)}function Qb(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function wC(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function DD(e,t,n,r,i,o){let s={},a=null,l,c=!1,u={},d=r&&xi(r[1])?r[1].error:void 0;return n.forEach((f,h)=>{let m=t[h].route.id;if(Rt(!Cl(f),"Cannot handle redirect results in processLoaderData"),xi(f)){let g=f.error;d!==void 0&&(g=d,d=void 0),a=a||{};{let E=Qc(e,m);a[E.route.id]==null&&(a[E.route.id]=g)}s[m]=void 0,c||(c=!0,l=zg(f.error)?f.error.status:500),f.headers&&(u[m]=f.headers)}else _l(f)?(i.set(m,f.deferredData),s[m]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!c&&(l=f.statusCode),f.headers&&(u[m]=f.headers)):(s[m]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(l=f.statusCode),f.headers&&(u[m]=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 xC(e,t,n,r,i,o,s,a){let{loaderData:l,errors:c}=DD(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 CC(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 Fr(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 `unstable_patchRoutesOnNavigation()` '+(`function threw the following error: +`+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 Im(e||500,a,new Error(l),!0)}function kC(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Cl(n))return{result:n,idx:t}}}function dT(e){let t=typeof e=="string"?Xs(e):e;return Gl(bn({},t,{hash:""}))}function AD(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function BD(e){return typeof e=="object"&&e!=null&&"then"in e}function FD(e){return fT(e.result)&&_D.has(e.result.status)}function _l(e){return e.type===Zt.deferred}function xi(e){return e.type===Zt.error}function Cl(e){return(e&&e.type)===Zt.redirect}function EC(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function zD(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 fT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function UD(e){return SD.has(e.toLowerCase())}function ko(e){return wD.has(e.toLowerCase())}async function RC(e,t,n,r,i,o){for(let s=0;sd.route.id===l.route.id),u=c!=null&&!cT(c,l)&&(o&&o[l.route.id])!==void 0;if(_l(a)&&(i||u)){let d=r[s];Rt(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await pT(a,d,i).then(f=>{f&&(n[s]=f||n[s])})}}}async function pT(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Zt.data,data:e.deferredData.unwrappedData}}catch(i){return{type:Zt.error,error:i}}return{type:Zt.data,data:e.deferredData.data}}}function Qw(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function $d(e,t){let n=typeof t=="string"?Xs(t).search:t.search;if(e[e.length-1].route.index&&Qw(n||""))return e[e.length-1];let r=sT(e);return r[r.length-1]}function PC(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 Jy(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 WD(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 vd(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 GD(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 HD(e,t){try{let n=e.sessionStorage.getItem(lT);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 VD(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(lT,JSON.stringify(n))}catch(r){Wl(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + * React Router v6.26.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function bu(){return bu=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=Fg(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 gT=C.createContext(null);function lp(){return C.useContext(gT)}function YD(e){let t=C.useContext(ds).outlet;return t&&C.createElement(gT.Provider,{value:e},t)}function QD(){let{matches:e}=C.useContext(ds),t=e[e.length-1];return t?t.params:{}}function Ug(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=C.useContext(Js),{matches:i}=C.useContext(ds),{pathname:o}=Zs(),s=JSON.stringify(Bg(i,r.v7_relativeSplatPath));return C.useMemo(()=>Fg(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function XD(e,t,n,r){zu()||Rt(!1);let{navigator:i}=C.useContext(Js),{matches:o}=C.useContext(ds),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=Zs(),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 h=yl(e,{pathname:f});return nA(h&&h.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 JD(){let e=iA(),t=zg(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 ZD=C.createElement(JD,null);class eA 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(ds.Provider,{value:this.props.routeContext},C.createElement(hT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tA(e){let{routeContext:t,match:n,children:r}=e,i=C.useContext(ap);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(ds.Provider,{value:t},r)}function nA(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(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)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||Rt(!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 h,m=!1,g=null,E=null;n&&(h=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||ZD,l&&(c<0&&f===0?(m=!0,E=null):c===f&&(m=!0,E=d.route.hydrateFallbackElement||null)));let b=t.concat(s.slice(0,f+1)),x=()=>{let y;return h?y=g:m?y=E:d.route.Component?y=C.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=u,C.createElement(tA,{match:d,routeContext:{outlet:u,matches:b,isDataRoute:n!=null},children:y})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?C.createElement(eA,{location:n.location,revalidation:n.revalidation,component:g,error:h,children:x(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):x()},null)}var Zw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Zw||{}),Mf=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}(Mf||{});function vT(e){let t=C.useContext(ap);return t||Rt(!1),t}function yT(e){let t=C.useContext(Xw);return t||Rt(!1),t}function rA(e){let t=C.useContext(ds);return t||Rt(!1),t}function bT(e){let t=rA(),n=t.matches[t.matches.length-1];return n.route.id||Rt(!1),n.route.id}function iA(){var e;let t=C.useContext(hT),n=yT(Mf.UseRouteError),r=bT(Mf.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}let oA=0;function sA(e){let{router:t,basename:n}=vT(Zw.UseBlocker),r=yT(Mf.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:bu({},l,{pathname:Mo(l.pathname,n)||l.pathname}),nextLocation:bu({},c,{pathname:Mo(c.pathname,n)||c.pathname}),historyAction:u})},[n,e]);return C.useEffect(()=>{let a=String(++oA);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):jc}function aA(){let{router:e}=vT(Zw.UseNavigateStable),t=bT(Mf.UseNavigateStable),n=C.useRef(!1);return mT(()=>{n.current=!0}),C.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,bu({fromRouteId:t},o)))},[e,t])}function lA(e){let{to:t,replace:n,state:r,relative:i}=e;zu()||Rt(!1);let{future:o,static:s}=C.useContext(Js),{matches:a}=C.useContext(ds),{pathname:l}=Zs(),c=qa(),u=Fg(t,Bg(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 ex(e){return YD(e.context)}function Jr(e){Rt(!1)}function cA(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Dn.Pop,navigator:o,static:s=!1,future:a}=e;zu()&&Rt(!1);let l=t.replace(/^\/*/,"/"),c=C.useMemo(()=>({basename:l,navigator:o,static:s,future:bu({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=Xs(r));let{pathname:u="/",search:d="",hash:f="",state:h=null,key:m="default"}=r,g=C.useMemo(()=>{let E=Mo(u,l);return E==null?null:{location:{pathname:E,search:d,hash:f,state:h,key:m},navigationType:i}},[l,u,d,f,h,m,i]);return g==null?null:C.createElement(Js.Provider,{value:c},C.createElement(Jw.Provider,{children:n,value:g}))}new Promise(()=>{});function Xb(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,Xb(r.props.children,o));return}r.type!==Jr&&Rt(!1),!r.props.index||!r.props.children||Rt(!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=Xb(r.props.children,o)),n.push(s)}),n}function uA(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.26.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function wu(){return wu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function dA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fA(e,t){return e.button===0&&(!t||t==="_self")&&!dA(e)}function Jb(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 pA(e,t){let n=Jb(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const hA=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],mA=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],gA="6";try{window.__reactRouterVersion=gA}catch{}function vA(e,t){return RD({basename:void 0,future:wu({},void 0,{v7_prependBasename:!0}),history:X$({window:void 0}),hydrationData:yA(),routes:e,mapRouteProperties:uA,unstable_dataStrategy:void 0,unstable_patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function yA(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=wu({},t,{errors:bA(t.errors)})),t}function bA(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 Im(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 xT=C.createContext({isTransitioning:!1}),wA=C.createContext(new Map),xA="startTransition",TC=am[xA],SA="flushSync",OC=Q$[SA];function _A(e){TC?TC(e):e()}function yd(e){OC?OC(e):e()}class CA{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 kA(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,h]=C.useState(),[m,g]=C.useState(),E=C.useRef(new Map),{v7_startTransition:b}=r||{},x=C.useCallback(T=>{b?_A(T):T()},[b]),y=C.useCallback((T,$)=>{let{deletedFetchers:L,unstable_flushSync:M,unstable_viewTransitionOpts:F}=$;L.forEach(K=>E.current.delete(K)),T.fetchers.forEach((K,Z)=>{K.data!==void 0&&E.current.set(Z,K.data)});let z=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!F||z){M?yd(()=>o(T)):x(()=>o(T));return}if(M){yd(()=>{f&&(u&&u.resolve(),f.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:F.currentLocation,nextLocation:F.nextLocation})});let K=n.window.document.startViewTransition(()=>{yd(()=>o(T))});K.finished.finally(()=>{yd(()=>{d(void 0),h(void 0),a(void 0),c({isTransitioning:!1})})}),yd(()=>h(K));return}f?(u&&u.resolve(),f.skipTransition(),g({state:T,currentLocation:F.currentLocation,nextLocation:F.nextLocation})):(a(T),c({isTransitioning:!0,flushSync:!1,currentLocation:F.currentLocation,nextLocation:F.nextLocation}))},[n.window,f,u,E,x]);C.useLayoutEffect(()=>n.subscribe(y),[n,y]),C.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new CA)},[l]),C.useEffect(()=>{if(u&&s&&n.window){let T=s,$=u.promise,L=n.window.document.startViewTransition(async()=>{x(()=>o(T)),await $});L.finished.finally(()=>{d(void 0),h(void 0),a(void 0),c({isTransitioning:!1})}),h(L)}},[x,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&&m&&(a(m.state),c({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),g(void 0))},[l.isTransitioning,m]),C.useEffect(()=>{},[]);let _=C.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:T=>n.navigate(T),push:(T,$,L)=>n.navigate(T,{state:$,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(T,$,L)=>n.navigate(T,{replace:!0,state:$,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[n]),k=n.basename||"/",O=C.useMemo(()=>({router:n,navigator:_,static:!1,basename:k}),[n,_,k]),R=C.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return C.createElement(C.Fragment,null,C.createElement(ap.Provider,{value:O},C.createElement(Xw.Provider,{value:i},C.createElement(wA.Provider,{value:E.current},C.createElement(xT.Provider,{value:l},C.createElement(cA,{basename:k,location:i.location,navigationType:i.historyAction,navigator:_,future:R},i.initialized||n.future.v7_partialHydration?C.createElement(EA,{routes:n.routes,future:n.future,state:i}):t))))),null)}const EA=C.memo(RA);function RA(e){let{routes:t,future:n,state:r}=e;return XD(t,void 0,r,n)}const PA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",TA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ST=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=wT(t,hA),{basename:h}=C.useContext(Js),m,g=!1;if(typeof c=="string"&&TA.test(c)&&(m=c,PA))try{let y=new URL(window.location.href),_=c.startsWith("//")?new URL(y.protocol+c):new URL(c),k=Mo(_.pathname,h);_.origin===y.origin&&k!=null?c=k+_.search+_.hash:g=!0}catch{}let E=KD(c,{relative:i}),b=LA(c,{replace:s,state:a,target:l,preventScrollReset:u,relative:i,unstable_viewTransition:d});function x(y){r&&r(y),y.defaultPrevented||b(y)}return C.createElement("a",wu({},f,{href:m||E,onClick:g||o?r:x,ref:n,target:l}))}),OA=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=wT(t,mA),f=Ug(l,{relative:d.relative}),h=Zs(),m=C.useContext(Xw),{navigator:g,basename:E}=C.useContext(Js),b=m!=null&&MA(f)&&c===!0,x=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,y=h.pathname,_=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(y=y.toLowerCase(),_=_?_.toLowerCase():null,x=x.toLowerCase()),_&&E&&(_=Mo(_,E)||_);const k=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let O=y===x||!s&&y.startsWith(x)&&y.charAt(k)==="/",R=_!=null&&(_===x||!s&&_.startsWith(x)&&_.charAt(x.length)==="/"),T={isActive:O,isPending:R,isTransitioning:b},$=O?r:void 0,L;typeof o=="function"?L=o(T):L=[o,O?"active":null,R?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let M=typeof a=="function"?a(T):a;return C.createElement(ST,wu({},d,{"aria-current":$,className:L,ref:n,style:M,to:l,unstable_viewTransition:c}),typeof u=="function"?u(T):u)});var Zb;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Zb||(Zb={}));var jC;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(jC||(jC={}));function jA(e){let t=C.useContext(ap);return t||Rt(!1),t}function LA(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a}=t===void 0?{}:t,l=qa(),c=Zs(),u=Ug(e,{relative:s});return C.useCallback(d=>{if(fA(d,n)){d.preventDefault();let f=r!==void 0?r:Gl(c)===Gl(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 IA(e){let t=C.useRef(Jb(e)),n=C.useRef(!1),r=Zs(),i=C.useMemo(()=>pA(r.search,n.current?null:t.current),[r.search]),o=qa(),s=C.useCallback((a,l)=>{const c=Jb(typeof a=="function"?a(i):a);n.current=!0,o("?"+c,l)},[o,i]);return[i,s]}function MA(e,t){t===void 0&&(t={});let n=C.useContext(xT);n==null&&Rt(!1);let{basename:r}=jA(Zb.useViewTransitionState),i=Ug(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 Lm(i.pathname,s)!=null||Lm(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.includes(r))continue;n[r]=e[r]}return n}function D(){return D=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 Hl(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n0?sr(Uu,--si):0,xu--,An===10&&(xu=1,Gg--),An}function ji(){return An=si2||$f(An)>3?"":" "}function eB(e,t){for(;--t&&ji()&&!(An<48||An>102||An>57&&An<65||An>70&&An<97););return up(e,Gh()+(t<6&&ss()==32&&ji()==32))}function t1(e){for(;ji();)switch(An){case e:return si;case 34:case 39:e!==34&&e!==39&&t1(An);break;case 40:e===41&&t1(e);break;case 92:ji();break}return si}function tB(e,t){for(;ji()&&e+An!==57;)if(e+An===84&&ss()===47)break;return"/*"+up(t,si-1)+"*"+Wg(e===47?e:ji())}function nB(e){for(;!$f(ss());)ji();return up(e,si)}function rB(e){return LT(Vh("",null,null,null,[""],e=jT(e),0,[0],e))}function Vh(e,t,n,r,i,o,s,a,l){for(var c=0,u=0,d=s,f=0,h=0,m=0,g=1,E=1,b=1,x=0,y="",_=i,k=o,O=r,R=y;E;)switch(m=x,x=ji()){case 40:if(m!=108&&sr(R,d-1)==58){e1(R+=Ht(Hh(x),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:R+=Hh(x);break;case 9:case 10:case 13:case 32:R+=ZA(m);break;case 92:R+=eB(Gh()-1,7);continue;case 47:switch(ss()){case 42:case 47:lh(iB(tB(ji(),Gh()),t,n),l);break;default:R+="/"}break;case 123*g:a[c++]=Xo(R)*b;case 125*g:case 59:case 0:switch(x){case 0:case 125:E=0;case 59+u:b==-1&&(R=Ht(R,/\f/g,"")),h>0&&Xo(R)-d&&lh(h>32?NC(R+";",r,n,d-1):NC(Ht(R," ","")+";",r,n,d-2),l);break;case 59:R+=";";default:if(lh(O=MC(R,t,n,c,u,i,a,y,_=[],k=[],d),o),x===123)if(u===0)Vh(R,t,O,O,_,o,d,a,k);else switch(f===99&&sr(R,3)===110?100:f){case 100:case 108:case 109:case 115:Vh(e,O,O,r&&lh(MC(e,O,O,0,0,i,a,y,i,_=[],d),k),i,k,d,a,r?_:k);break;default:Vh(R,O,O,O,[""],k,0,a,k)}}c=u=h=0,g=b=1,y=R="",d=s;break;case 58:d=1+Xo(R),h=m;default:if(g<1){if(x==123)--g;else if(x==125&&g++==0&&JA()==125)continue}switch(R+=Wg(x),x*g){case 38:b=u>0?1:(R+="\f",-1);break;case 44:a[c++]=(Xo(R)-1)*b,b=1;break;case 64:ss()===45&&(R+=Hh(ji())),f=ss(),u=d=Xo(y=R+=nB(Gh())),x++;break;case 45:m===45&&Xo(R)==2&&(g=0)}}return o}function MC(e,t,n,r,i,o,s,a,l,c,u){for(var d=i-1,f=i===0?o:[""],h=rx(f),m=0,g=0,E=0;m0?f[b]+" "+x:Ht(x,/&\f/g,f[b])))&&(l[E++]=y);return Hg(e,t,n,i===0?tx:a,l,c,u)}function iB(e,t,n){return Hg(e,t,n,RT,Wg(XA()),Nf(e,2,-2),0)}function NC(e,t,n,r){return Hg(e,t,n,nx,Nf(e,0,r),Nf(e,r+1,-1),r)}function ou(e,t){for(var n="",r=rx(e),i=0;i6)switch(sr(e,t+1)){case 109:if(sr(e,t+4)!==45)break;case 102:return Ht(e,/(.+:)(.+)-([^]+)/,"$1"+Gt+"$2-$3$1"+Mm+(sr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~e1(e,"stretch")?IT(Ht(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(sr(e,t+1)!==115)break;case 6444:switch(sr(e,Xo(e)-3-(~e1(e,"!important")&&10))){case 107:return Ht(e,":",":"+Gt)+e;case 101:return Ht(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Gt+(sr(e,14)===45?"inline-":"")+"box$3$1"+Gt+"$2$3$1"+wr+"$2box$3")+e}break;case 5936:switch(sr(e,t+11)){case 114:return Gt+e+wr+Ht(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Gt+e+wr+Ht(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Gt+e+wr+Ht(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Gt+e+wr+e+e}return e}var pB=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case nx:t.return=IT(t.value,t.length);break;case PT:return ou([bd(t,{value:Ht(t.value,"@","@"+Gt)})],i);case tx:if(t.length)return QA(t.props,function(o){switch(YA(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ou([bd(t,{props:[Ht(o,/:(read-\w+)/,":"+Mm+"$1")]})],i);case"::placeholder":return ou([bd(t,{props:[Ht(o,/:(plac\w+)/,":"+Gt+"input-$1")]}),bd(t,{props:[Ht(o,/:(plac\w+)/,":"+Mm+"$1")]}),bd(t,{props:[Ht(o,/:(plac\w+)/,wr+"input-$1")]})],i)}return""})}},hB=[pB],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 E=g.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||hB,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=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 EB={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,scale: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},RB=!1,PB=/[A-Z]|^ms/g,TB=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zT=function(t){return t.charCodeAt(1)===45},DC=function(t){return t!=null&&typeof t!="boolean"},t0=ET(function(e){return zT(e)?e:e.replace(PB,"-$&").toLowerCase()}),AC=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(TB,function(r,i,o){return Jo={name:i,styles:o,next:Jo},i})}return EB[t]!==1&&!zT(t)&&typeof n=="number"&&n!==0?n+"px":n},OB="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Df(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 Jo={name:i.name,styles:i.styles,next:Jo},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Jo={name:s.name,styles:s.styles,next:Jo},s=s.next;var a=o.styles+";";return a}return jB(e,t,n)}case"function":{if(e!==void 0){var l=Jo,c=n(e);return Jo=l,Df(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function jB(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?$B:DB},UC=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},AB=!1,BB=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return BT(n,r,i),IB(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=UC(t,n,r),l=a||zC(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,h=1;ht(WB(i)?n:i):t;return v.jsx(NB,{styles:r})}function lx(e,t){return n1(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:dp,css:HT,default:lx,internal_processStyles:KT,keyframes:nv},Symbol.toStringTag,{value:"Module"})),qT=Ys(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 Wr(e,t,n={clone:!0}){const r=n.clone?D({},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]=Wr(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:Wr,isPlainObject:Cs},Symbol.toStringTag,{value:"Module"})),VB=Ys(HB),KB=Ys($A);var QT={exports:{}},Jt={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var cx=Symbol.for("react.element"),ux=Symbol.for("react.portal"),rv=Symbol.for("react.fragment"),iv=Symbol.for("react.strict_mode"),ov=Symbol.for("react.profiler"),sv=Symbol.for("react.provider"),av=Symbol.for("react.context"),qB=Symbol.for("react.server_context"),lv=Symbol.for("react.forward_ref"),cv=Symbol.for("react.suspense"),uv=Symbol.for("react.suspense_list"),dv=Symbol.for("react.memo"),fv=Symbol.for("react.lazy"),YB=Symbol.for("react.offscreen"),XT;XT=Symbol.for("react.module.reference");function fo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case cx:switch(e=e.type,e){case rv:case ov:case iv:case cv:case uv:return e;default:switch(e=e&&e.$$typeof,e){case qB:case av:case lv:case fv:case dv:case sv:return e;default:return t}}case ux:return t}}}Jt.ContextConsumer=av;Jt.ContextProvider=sv;Jt.Element=cx;Jt.ForwardRef=lv;Jt.Fragment=rv;Jt.Lazy=fv;Jt.Memo=dv;Jt.Portal=ux;Jt.Profiler=ov;Jt.StrictMode=iv;Jt.Suspense=cv;Jt.SuspenseList=uv;Jt.isAsyncMode=function(){return!1};Jt.isConcurrentMode=function(){return!1};Jt.isContextConsumer=function(e){return fo(e)===av};Jt.isContextProvider=function(e){return fo(e)===sv};Jt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===cx};Jt.isForwardRef=function(e){return fo(e)===lv};Jt.isFragment=function(e){return fo(e)===rv};Jt.isLazy=function(e){return fo(e)===fv};Jt.isMemo=function(e){return fo(e)===dv};Jt.isPortal=function(e){return fo(e)===ux};Jt.isProfiler=function(e){return fo(e)===ov};Jt.isStrictMode=function(e){return fo(e)===iv};Jt.isSuspense=function(e){return fo(e)===cv};Jt.isSuspenseList=function(e){return fo(e)===uv};Jt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===rv||e===ov||e===iv||e===cv||e===uv||e===YB||typeof e=="object"&&e!==null&&(e.$$typeof===fv||e.$$typeof===dv||e.$$typeof===sv||e.$$typeof===av||e.$$typeof===lv||e.$$typeof===XT||e.getModuleId!==void 0)};Jt.typeOf=fo;QT.exports=Jt;var WC=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 GC(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 WC.ForwardRef:return GC(e,e.render,"ForwardRef");case WC.Memo:return GC(e,e.type,"memo");default:return}}}const JB=Object.freeze(Object.defineProperty({__proto__:null,default:XB,getFunctionName:JT},Symbol.toStringTag,{value:"Module"})),ZB=Ys(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)=>D({},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,h){const m=s.indexOf(h);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(m!==-1&&typeof t[s[m]]=="number"?t[s[m]]:h)-r/100}${n})`}function u(f){return s.indexOf(f)+1`@media (min-width:${dx[e]}px)`};function No(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||HC;return t.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const o=r.breakpoints||HC;return Object.keys(t).reduce((s,a)=>{if(Object.keys(o.values||dx).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)=>Wr(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 n0({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 Su(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 Nm(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Su(e,n)||r,t&&(i=t(i,r,e)),i}function In(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=Su(l,r)||{};return No(s,a,d=>{let f=Nm(c,i,d);return d===f&&typeof d=="string"&&(f=Nm(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"]},VC={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},l4=o4(e=>{if(e.length>2)if(VC[e])e=VC[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]}),fx=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],px=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...fx,...px];function fp(e,t,n,r){var i;const o=(i=Su(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 hx(e){return fp(e,"spacing",8)}function Vl(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]=Vl(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=hx(e.theme);return Object.keys(e).map(r=>u4(e,t,r,n)).reduce(Xd,{})}function kn(e){return rO(e,fx)}kn.propTypes={};kn.filterProps=fx;function En(e){return rO(e,px)}En.propTypes={};En.filterProps=px;function d4(e=8){if(e.mui)return e;const t=hx({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 pv(...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]?Xd(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Xi(e){return typeof e!="number"?e:`${e}px solid`}function po(e,t){return In({prop:e,themeKey:"borders",transform:t})}const f4=po("border",Xi),p4=po("borderTop",Xi),h4=po("borderRight",Xi),m4=po("borderBottom",Xi),g4=po("borderLeft",Xi),v4=po("borderColor"),y4=po("borderTopColor"),b4=po("borderRightColor"),w4=po("borderBottomColor"),x4=po("borderLeftColor"),S4=po("outline",Xi),_4=po("outlineColor"),hv=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=fp(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Vl(t,r)});return No(e,e.borderRadius,n)}return null};hv.propTypes={};hv.filterProps=["borderRadius"];pv(f4,p4,h4,m4,g4,v4,y4,b4,w4,x4,hv,S4,_4);const mv=e=>{if(e.gap!==void 0&&e.gap!==null){const t=fp(e.theme,"spacing",8),n=r=>({gap:Vl(t,r)});return No(e,e.gap,n)}return null};mv.propTypes={};mv.filterProps=["gap"];const gv=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=fp(e.theme,"spacing",8),n=r=>({columnGap:Vl(t,r)});return No(e,e.columnGap,n)}return null};gv.propTypes={};gv.filterProps=["columnGap"];const vv=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=fp(e.theme,"spacing",8),n=r=>({rowGap:Vl(t,r)});return No(e,e.rowGap,n)}return null};vv.propTypes={};vv.filterProps=["rowGap"];const C4=In({prop:"gridColumn"}),k4=In({prop:"gridRow"}),E4=In({prop:"gridAutoFlow"}),R4=In({prop:"gridAutoColumns"}),P4=In({prop:"gridAutoRows"}),T4=In({prop:"gridTemplateColumns"}),O4=In({prop:"gridTemplateRows"}),j4=In({prop:"gridTemplateAreas"}),L4=In({prop:"gridArea"});pv(mv,gv,vv,C4,k4,E4,R4,P4,T4,O4,j4,L4);function su(e,t){return t==="grey"?t:e}const I4=In({prop:"color",themeKey:"palette",transform:su}),M4=In({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:su}),N4=In({prop:"backgroundColor",themeKey:"palette",transform:su});pv(I4,M4,N4);function Ci(e){return e<=1&&e!==0?`${e*100}%`:e}const $4=In({prop:"width",transform:Ci}),mx=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])||dx[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:Ci(n)}};return No(e,e.maxWidth,t)}return null};mx.filterProps=["maxWidth"];const D4=In({prop:"minWidth",transform:Ci}),A4=In({prop:"height",transform:Ci}),B4=In({prop:"maxHeight",transform:Ci}),F4=In({prop:"minHeight",transform:Ci});In({prop:"size",cssProperty:"width",transform:Ci});In({prop:"size",cssProperty:"height",transform:Ci});const z4=In({prop:"boxSizing"});pv($4,mx,D4,A4,B4,F4,z4);const pp={border:{themeKey:"borders",transform:Xi},borderTop:{themeKey:"borders",transform:Xi},borderRight:{themeKey:"borders",transform:Xi},borderBottom:{themeKey:"borders",transform:Xi},borderLeft:{themeKey:"borders",transform:Xi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Xi},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:hv},color:{themeKey:"palette",transform:su},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:su},backgroundColor:{themeKey:"palette",transform:su},p:{style:En},pt:{style:En},pr:{style:En},pb:{style:En},pl:{style:En},px:{style:En},py:{style:En},padding:{style:En},paddingTop:{style:En},paddingRight:{style:En},paddingBottom:{style:En},paddingLeft:{style:En},paddingX:{style:En},paddingY:{style:En},paddingInline:{style:En},paddingInlineStart:{style:En},paddingInlineEnd:{style:En},paddingBlock:{style:En},paddingBlockStart:{style:En},paddingBlockEnd:{style:En},m:{style:kn},mt:{style:kn},mr:{style:kn},mb:{style:kn},ml:{style:kn},mx:{style:kn},my:{style:kn},margin:{style:kn},marginTop:{style:kn},marginRight:{style:kn},marginBottom:{style:kn},marginLeft:{style:kn},marginX:{style:kn},marginY:{style:kn},marginInline:{style:kn},marginInlineStart:{style:kn},marginInlineEnd:{style:kn},marginBlock:{style:kn},marginBlockStart:{style:kn},marginBlockEnd:{style:kn},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:mv},rowGap:{style:vv},columnGap:{style:gv},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ci},maxWidth:{style:mx},minWidth:{transform:Ci},height:{transform:Ci},maxHeight:{transform:Ci},minHeight:{transform:Ci},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=Su(i,c)||{};return d?d(s):No(s,r,m=>{let g=Nm(f,u,m);return m===g&&typeof m=="string"&&(g=Nm(f,u,`${n}${m==="default"?"":we(m)}`,m)),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:pp;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(h=>{const m=W4(c[h],o);if(m!=null)if(typeof m=="object")if(s[h])f=Xd(f,e(h,m,o,s));else{const g=No({theme:o},m,E=>({[h]:E}));U4(g,m)?f[h]=t({sx:m,theme:o}):f=Xd(f,g)}else f=Xd(f,e(h,m,o,s))}),nO(d,f)}return Array.isArray(i)?i.map(a):a(i)}return t}const Wu=iO();Wu.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 hp(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Ie(e,G4),a=eO(n),l=d4(i);let c=Wr({breakpoints:a,direction:"ltr",components:{},palette:D({mode:"light"},r),spacing:l,shape:D({},n4,o)},s);return c.applyStyles=oO,c=t.reduce((u,d)=>Wr(u,d),c),c.unstable_sxConfig=D({},pp,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Wu({sx:d,theme:this})},c}const H4=Object.freeze(Object.defineProperty({__proto__:null,default:hp,private_createBreakpoints:eO,unstable_applyStyles:oO},Symbol.toStringTag,{value:"Module"})),V4=Ys(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:pp;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function yv(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)?D({},r,a):r}:o=D({},r,t),D({},i,{sx:o})}const Y4=Object.freeze(Object.defineProperty({__proto__:null,default:Wu,extendSxProp:yv,unstable_createStyleFunctionSx:iO,unstable_defaultSxConfig:pp},Symbol.toStringTag,{value:"Module"})),Q4=Ys(Y4);var Gu=uo;Object.defineProperty(cp,"__esModule",{value:!0});var X4=cp.default=u5;cp.shouldForwardProp=Kh;cp.systemDefaultTheme=void 0;var Ki=Gu(kT()),i1=Gu(DA()),KC=i5(qT),J4=VB;Gu(KB);Gu(ZB);var Z4=Gu(V4),e5=Gu(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 Kh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const a5=cp.systemDefaultTheme=(0,Z4.default)(),l5=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function ch({defaultTheme:e,theme:t,themeId:n}){return o5(t)?e:t[n]||t}function c5(e){return e?(t,n)=>n[e]:null}function qh(e,t){let{ownerState:n}=t,r=(0,i1.default)(t,t5);const i=typeof e=="function"?e((0,Ki.default)({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>qh(o,(0,Ki.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=(0,i1.default)(i,n5);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,Ki.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,Ki.default)({ownerState:n},r,n)):l.style))}),a}return i}function u5(e={}){const{themeId:t,defaultTheme:n=a5,rootShouldForwardProp:r=Kh,slotShouldForwardProp:i=Kh}=e,o=s=>(0,e5.default)((0,Ki.default)({},s,{theme:ch((0,Ki.default)({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{(0,KC.internal_processStyles)(s,k=>k.filter(O=>!(O!=null&&O.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=c5(l5(c))}=a,h=(0,i1.default)(a,r5),m=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=d||!1;let E,b=Kh;c==="Root"||c==="root"?b=r:c?b=i:s5(s)&&(b=void 0);const x=(0,KC.default)(s,(0,Ki.default)({shouldForwardProp:b,label:E},h)),y=k=>typeof k=="function"&&k.__emotion_real!==k||(0,J4.isPlainObject)(k)?O=>qh(k,(0,Ki.default)({},O,{theme:ch({theme:O.theme,defaultTheme:n,themeId:t})})):k,_=(k,...O)=>{let R=y(k);const T=O?O.map(y):[];l&&f&&T.push(M=>{const F=ch((0,Ki.default)({},M,{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,oe])=>{K[Z]=qh(oe,(0,Ki.default)({},M,{theme:F}))}),f(M,K)}),l&&!m&&T.push(M=>{var F;const z=ch((0,Ki.default)({},M,{defaultTheme:n,themeId:t})),K=z==null||(F=z.components)==null||(F=F[l])==null?void 0:F.variants;return qh({variants:K},(0,Ki.default)({},M,{theme:z}))}),g||T.push(o);const $=T.length-O.length;if(Array.isArray(k)&&$>0){const M=new Array($).fill("");R=[...k,...M],R.raw=[...k.raw,...M]}const L=x(R,...T);return s.muiName&&(L.muiName=s.muiName),L};return x.withConfig&&(_.withConfig=x.withConfig),_}}const qC=e=>e,d5=()=>{let e=qC;return{configure(t){e=t},generate(t){return e(t)},reset(){e=qC}}},gx=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}`:`${gx.generate(e)}-${t}`}function p5(e,t){return D({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Mn={};const h5=Ys(NA);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=Ys(g5);var aO=uo;Object.defineProperty(Mn,"__esModule",{value:!0});var Dt=Mn.alpha=dO;Mn.blend=P5;Mn.colorChannel=void 0;var $m=Mn.darken=yx;Mn.decomposeColor=oo;var o1=Mn.emphasize=fO,y5=Mn.getContrastRatio=_5;Mn.getLuminance=Am;Mn.hexToRgb=lO;Mn.hslToRgb=uO;var Dm=Mn.lighten=bx;Mn.private_safeAlpha=C5;Mn.private_safeColorChannel=void 0;Mn.private_safeDarken=k5;Mn.private_safeEmphasize=R5;Mn.private_safeLighten=E5;Mn.recomposeColor=Hu;Mn.rgbToHex=S5;var YC=aO(h5),b5=aO(v5);function vx(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 oo(e){if(e.type)return e;if(e.charAt(0)==="#")return oo(lO(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,YC.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,YC.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=oo(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Mn.colorChannel=cO;const x5=(e,t)=>{try{return cO(e)}catch{return e}};Mn.private_safeColorChannel=x5;function Hu(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}=oo(e);return`#${t.map((n,r)=>w5(r===3?Math.round(255*n):n)).join("")}`}function uO(e){e=oo(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])),Hu({type:a,values:l})}function Am(e){e=oo(e);let t=e.type==="hsl"||e.type==="hsla"?oo(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=Am(e),r=Am(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function dO(e,t){return e=oo(e),t=vx(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Hu(e)}function C5(e,t,n){try{return dO(e,t)}catch{return e}}function yx(e,t){if(e=oo(e),t=vx(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 Hu(e)}function k5(e,t,n){try{return yx(e,t)}catch{return e}}function bx(e,t){if(e=oo(e),t=vx(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 Hu(e)}function E5(e,t,n){try{return bx(e,t)}catch{return e}}function fO(e,t=.15){return Am(e)>.5?yx(e,t):bx(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=oo(e),s=oo(t),a=[i(o.values[0],s.values[0]),i(o.values[1],s.values[1]),i(o.values[2],s.values[2])];return Hu({type:"rgb",values:a})}const Af={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"},vc={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"},yc={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"},wd={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"},bc={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"},wc={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"},xc={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"],QC={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:Af.white,default:Af.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}},r0={text:{primary:Af.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:Af.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 XC(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=Dm(e.main,i):t==="dark"&&(e.dark=$m(e.main,o)))}function j5(e="light"){return e==="dark"?{main:bc[200],light:bc[50],dark:bc[400]}:{main:bc[700],light:bc[400],dark:bc[800]}}function L5(e="light"){return e==="dark"?{main:vc[200],light:vc[50],dark:vc[400]}:{main:vc[500],light:vc[300],dark:vc[700]}}function I5(e="light"){return e==="dark"?{main:yc[500],light:yc[300],dark:yc[700]}:{main:yc[700],light:yc[400],dark:yc[800]}}function M5(e="light"){return e==="dark"?{main:wc[400],light:wc[300],dark:wc[700]}:{main:wc[700],light:wc[500],dark:wc[900]}}function N5(e="light"){return e==="dark"?{main:xc[400],light:xc[300],dark:xc[700]}:{main:xc[800],light:xc[500],dark:xc[900]}}function $5(e="light"){return e==="dark"?{main:wd[400],light:wd[300],dark:wd[700]}:{main:"#ed6c02",light:wd[500],dark:wd[900]}}function D5(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,r0.text.primary)>=n?r0.text.primary:QC.text.primary}const f=({color:g,name:E,mainShade:b=500,lightShade:x=300,darkShade:y=700})=>{if(g=D({},g),!g.main&&g[b]&&(g.main=g[b]),!g.hasOwnProperty("main"))throw new Error(Hl(11,E?` (${E})`:"",b));if(typeof g.main!="string")throw new Error(Hl(12,E?` (${E})`:"",JSON.stringify(g.main)));return XC(g,"light",x,r),XC(g,"dark",y,r),g.contrastText||(g.contrastText=d(g.main)),g},h={dark:r0,light:QC};return Wr(D({common:D({},Af),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},h[t]),i)}const A5=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function B5(e){return Math.round(e*1e5)/1e5}const JC={textTransform:"uppercase"},ZC='"Roboto", "Helvetica", "Arial", sans-serif';function F5(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=ZC,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),h=i/14,m=d||(b=>`${b/c*h}rem`),g=(b,x,y,_,k)=>D({fontFamily:r,fontWeight:b,fontSize:m(x),lineHeight:y},r===ZC?{letterSpacing:`${B5(_/x)}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,JC),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,JC),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Wr(D({htmlFontSize:c,pxToRem:m,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},E),f,{clone:!1})}const z5=.2,U5=.14,W5=.12;function mn(...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",mn(0,2,1,-1,0,1,1,0,0,1,3,0),mn(0,3,1,-2,0,2,2,0,0,1,5,0),mn(0,3,3,-2,0,3,4,0,0,1,8,0),mn(0,2,4,-1,0,4,5,0,0,1,10,0),mn(0,3,5,-1,0,5,8,0,0,1,14,0),mn(0,3,5,-1,0,6,10,0,0,1,18,0),mn(0,4,5,-2,0,7,10,1,0,2,16,1),mn(0,5,5,-3,0,8,10,1,0,3,14,2),mn(0,5,6,-3,0,9,12,1,0,3,16,2),mn(0,6,6,-3,0,10,14,1,0,4,18,3),mn(0,6,7,-4,0,11,15,1,0,4,20,3),mn(0,7,8,-4,0,12,17,2,0,5,22,4),mn(0,7,8,-4,0,13,19,2,0,5,24,4),mn(0,7,9,-4,0,14,21,2,0,5,26,4),mn(0,8,9,-5,0,15,22,2,0,6,28,5),mn(0,8,10,-5,0,16,24,2,0,6,30,5),mn(0,8,11,-5,0,17,26,2,0,6,32,5),mn(0,9,11,-5,0,18,28,2,0,7,34,6),mn(0,9,12,-6,0,19,29,2,0,7,36,6),mn(0,10,13,-6,0,20,31,3,0,8,38,7),mn(0,10,13,-6,0,21,33,3,0,8,40,7),mn(0,10,14,-6,0,22,35,3,0,8,42,7),mn(0,11,14,-7,0,23,36,3,0,9,44,8),mn(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 ek(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=D({},V5,e.easing),n=D({},pO,e.duration);return D({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:ek(s)} ${a} ${typeof l=="string"?l:ek(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 wx(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Ie(e,Q5);if(e.vars)throw new Error(Hl(18));const a=D5(r),l=hp(e);let c=Wr(l,{mixins:p5(l.breakpoints,n),palette:a,shadows:G5.slice(),typography:F5(a,o),transitions:q5(i),zIndex:D({},Y5)});return c=Wr(c,s),c=t.reduce((u,d)=>Wr(u,d),c),c.unstable_sxConfig=D({},pp,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Wu({sx:d,theme:this})},c}const xx=wx(),_u="$$material";function hO(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const dr=e=>hO(e)&&e!=="classes",Ee=X4({themeId:_u,defaultTheme:xx,rootShouldForwardProp:dr});function Bf(e,t){const n=D({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=D({},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]=D({},o),Object.keys(i).forEach(s=>{n[r][s]=Bf(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?Bf(i.defaultProps,r):!i.styleOverrides&&!i.variants?Bf(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 tk={};function e3(e,t){const n=C.useRef(tk);return n.current===tk&&(n.current=e(t)),n}const t3=[];function n3(e){C.useEffect(e,t3)}class mp{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new mp}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Sa(){const e=e3(mp.create).current;return n3(e.disposeEffect),e}let bv=!0,s1=!1;const r3=new mp,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||(bv=!0)}function i0(){bv=!1}function a3(){this.visibilityState==="hidden"&&s1&&(bv=!0)}function l3(e){e.addEventListener("keydown",s3,!0),e.addEventListener("mousedown",i0,!0),e.addEventListener("pointerdown",i0,!0),e.addEventListener("touchstart",i0,!0),e.addEventListener("visibilitychange",a3,!0)}function c3(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return bv||o3(t)}function wv(){const e=C.useCallback(i=>{i!=null&&l3(i.ownerDocument)},[]),t=C.useRef(!1);function n(){return t.current?(s1=!0,r3.start(100,()=>{s1=!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 Bm(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=>{Bm(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})=>D({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})),nk={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,Ct=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiTypography"}),i=m3(r.color),o=yv(D({},r,{color:i})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:d=!1,variant:f="body1",variantMapping:h=nk}=o,m=Ie(o,d3),g=D({},o,{align:s,color:i,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:d,variant:f,variantMapping:h}),E=l||(d?"p":h[f]||nk[f])||"span",b=f3(g);return v.jsx(p3,D({as:E,ref:n,ownerState:g,className:Ae(b.root,a)},m))});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 Sx(e=null){const t=C.useContext(dp);return!t||y3(t)?e:t}const b3=hp();function xv(e=b3){return Sx(e)}function w3({styles:e,themeId:t,defaultTheme:n={}}){const r=xv(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=lx("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(Wu);return C.forwardRef(function(l,c){const u=xv(n),d=yv(l),{className:f,component:h="div"}=d,m=Ie(d,x3);return v.jsx(o,D({as:h,ref:c,className:Ae(f,i?i(r):r),theme:t&&u[t]||u},m))})}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 o0(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const P3=hp(),T3=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function uh({defaultTheme:e,theme:t,themeId:n}){return E3(t)?e:t[n]||t}function O3(e){return e?(t,n)=>n[e]:null}function Yh(e,t){let{ownerState:n}=t,r=Ie(t,_3);const i=typeof e=="function"?e(D({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Yh(o,D({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(D({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(D({ownerState:n},r,n)):l.style))}),a}return i}function j3(e={}){const{themeId:t,defaultTheme:n=P3,rootShouldForwardProp:r=o0,slotShouldForwardProp:i=o0}=e,o=s=>Wu(D({},s,{theme:uh(D({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{KT(s,k=>k.filter(O=>!(O!=null&&O.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=O3(T3(c))}=a,h=Ie(a,k3),m=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=d||!1;let E,b=o0;c==="Root"||c==="root"?b=r:c?b=i:R3(s)&&(b=void 0);const x=lx(s,D({shouldForwardProp:b,label:E},h)),y=k=>typeof k=="function"&&k.__emotion_real!==k||Cs(k)?O=>Yh(k,D({},O,{theme:uh({theme:O.theme,defaultTheme:n,themeId:t})})):k,_=(k,...O)=>{let R=y(k);const T=O?O.map(y):[];l&&f&&T.push(M=>{const F=uh(D({},M,{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,oe])=>{K[Z]=Yh(oe,D({},M,{theme:F}))}),f(M,K)}),l&&!m&&T.push(M=>{var F;const z=uh(D({},M,{defaultTheme:n,themeId:t})),K=z==null||(F=z.components)==null||(F=F[l])==null?void 0:F.variants;return Yh({variants:K},D({},M,{theme:z}))}),g||T.push(o);const $=T.length-O.length;if(Array.isArray(k)&&$>0){const M=new Array($).fill("");R=[...k,...M],R.raw=[...k.raw,...M]}const L=x(R,...T);return s.muiName&&(L.muiName=s.muiName),L};return x.withConfig&&(_.withConfig=x.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:Bf(t.components[n].defaultProps,r)}function I3({props:e,name:t,defaultTheme:n,themeId:r}){let i=xv(n);return r&&(i=i[r]||i),gO({theme:i,name:t,props:e})}const ai=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 ai(()=>{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 _x(e,t={}){const n=Sx(),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 a1(...e){return e.reduce((t,n)=>n==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function Sv(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 Jd(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 Yn(e){return e&&e.ownerDocument||document}function ls(e){return Yn(e).defaultView||window}function D3(e,t){return()=>null}let rk=0;function A3(e){const[t,n]=C.useState(e),r=e||t;return C.useEffect(()=>{t==null&&(rk+=1,n(`mui-${rk}`))},[t]),r}const ik=am.useId;function gp(e){if(ik!==void 0){const t=ik();return e??t}return A3(e)}function B3(e,t,n,r,i){return null}function Cu({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 Zi(e){const t=C.useRef(e);return ai(()=>{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 ku(e){return typeof e=="string"}function Xc(e,t,n){return e===void 0||ku(e)?t:D({},t,{ownerState:D({},t.ownerState,n)})}function Fm(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 ok(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 h=Ae(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),m=D({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=D({},n,i,r);return h.length>0&&(g.className=h),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const s=Fm(D({},i,r)),a=ok(r),l=ok(i),c=t(s),u=Ae(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=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=D({},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(D({},s,{externalSlotProps:a})),u=un(c,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return Xc(n,D({},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):D({},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,D({value:t??!0},n))}const Cx=()=>{const e=C.useContext(CO);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?D({},t,{[e]:o}):o;return r?()=>s:s}return e?D({},t,{[e]:n}):D({},t,n)},[e,t,n,r])}function q3(e){const{children:t,theme:n,themeId:r}=e,i=Sx(sk),o=_O()||sk,s=ak(r,i,n),a=ak(r,o,n,!0),l=s.direction==="rtl";return v.jsx(H3,{theme:a,children:v.jsx(dp.Provider,{value:s,children:v.jsx(K3,{value:l,children:v.jsx(X5,{value:s==null?void 0:s.components,children:t})})})})}function Ff(e){"@babel/helpers - typeof";return Ff=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},Ff(e)}function Y3(e,t){if(Ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ff(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 Ff(t)=="symbol"?t:t+""}const X3=["component","direction","spacing","divider","children","className","useFlexGap"],J3=hp(),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=D({display:"flex",flexDirection:"column"},No({theme:t},n0({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=hx(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=n0({values:e.direction,base:i}),s=n0({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=Wr(n,No({theme:t},s,(l,c)=>e.useFlexGap?{gap:Vl(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${nF(c?o[c]:e.direction)}`]:Vl(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=yv(u),{component:f="div",direction:h="column",spacing:m=0,divider:g,children:E,className:b,useFlexGap:x=!1}=d,y=Ie(d,X3),_={direction:h,spacing:m,useFlexGap:x},k=i();return v.jsx(o,D({as:f,ownerState:_,ref:c,className:Ae(k.root,b)},y,{children:g?tF(E,g):E}))})}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=Su(e,`palette.${n}`,!1)||t.color,i=Su(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:Dt(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(Ct,{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})=>D({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&D({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"}})),Eo=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,h=Ie(r,aF),{isFocusVisibleRef:m,onBlur:g,onFocus:E,ref:b}=wv(),[x,y]=C.useState(!1),_=un(n,b),k=$=>{g($),m.current===!1&&y(!1),a&&a($)},O=$=>{E($),m.current===!0&&y(!0),l&&l($)},R=D({},r,{color:o,component:s,focusVisible:x,underline:u,variant:d}),T=lF(R);return v.jsx(cF,D({color:o,className:Ae(T.root,i),classes:c,component:s,onBlur:k,onFocus:O,ref:_,ownerState:R,variant:d,sx:[...Object.keys(kO).includes(o)?[]:[{color:o}],...Array.isArray(f)?f:[f]]},h))}),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 Bi(){const e=xv(xx);return e[_u]||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 D({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"&&D({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Dt("#fff",lk(t.elevation))}, ${Dt("#fff",lk(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),fs=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=D({},r,{component:o,elevation:s,square:a,variant:l}),d=fF(u);return v.jsx(pF,D({as:o,ownerState:u,className:Ae(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)},dh=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,vF=Ee(fs,{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 D({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&&D({},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"&&D({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&D({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:dh(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:dh(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:dh(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:dh(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=D({},r,{color:o,position:a,enableColorOnDark:s}),u=gF(c);return v.jsx(vF,D({square:!0,component:"header",ownerState:c,elevation:4,className:Ae(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})=>D({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=D({},r,{component:o,disableGutters:s,variant:a}),u=xF(c);return v.jsx(SF,D({as:o,className:Ae(u.root,i),ref:n,ownerState:c},l))});function zf(e,t){return zf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},zf(e,t)}function vp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,zf(e,t)}const ck={disabled:!1},zm=It.createContext(null);var CF=function(t){return t.scrollTop},Dd="unmounted",ml="exited",gl="entering",Lc="entered",l1="exiting",ho=function(e){vp(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=ml,o.appearStatus=gl):l=Lc:r.unmountOnExit||r.mountOnEnter?l=Dd:l=ml,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Dd?{status:ml}: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!==gl&&s!==Lc&&(o=gl):(s===gl||s===Lc)&&(o=l1)}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===gl){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Nd.findDOMNode(this);s&&CF(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ml&&this.setState({status:Dd})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[Nd.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:Lc},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:gl},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:Lc},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:Nd.findDOMNode(this);if(!o||ck.disabled){this.safeSetState({status:ml},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:l1},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:ml},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:Nd.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===Dd)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 It.createElement(zm.Provider,{value:null},typeof s=="function"?s(i,a):It.cloneElement(It.Children.only(s),a))},t}(It.Component);ho.contextType=zm;ho.propTypes={};function Sc(){}ho.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Sc,onEntering:Sc,onEntered:Sc,onExit:Sc,onExiting:Sc,onExited:Sc};ho.UNMOUNTED=Dd;ho.EXITED=ml;ho.ENTERING=gl;ho.ENTERED=Lc;ho.EXITING=l1;function kF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kx(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:h,children:v.jsx("span",{className:m})})}const qi=pt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),LF=["center","classes","className"];let _v=e=>e,uk,dk,fk,pk;const c1=550,IF=80,MF=nv(uk||(uk=_v` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`)),NF=nv(dk||(dk=_v` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`)),$F=nv(fk||(fk=_v` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`)),DF=Ee("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),AF=Ee(jF,{name:"MuiTouchRipple",slot:"Ripple"})(pk||(pk=_v` + opacity: 0; + position: absolute; + + &.${0} { + opacity: 0.3; + transform: scale(1); + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + &.${0} { + animation-duration: ${0}ms; + } + + & .${0} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${0} { + opacity: 0; + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + & .${0} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + animation-name: ${0}; + animation-duration: 2500ms; + animation-timing-function: ${0}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } +`),qi.rippleVisible,MF,c1,({theme:e})=>e.transitions.easing.easeInOut,qi.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,qi.child,qi.childLeaving,NF,c1,({theme:e})=>e.transitions.easing.easeInOut,qi.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),h=Sa(),m=C.useRef(null),g=C.useRef(null),E=C.useCallback(_=>{const{pulsate:k,rippleX:O,rippleY:R,rippleSize:T,cb:$}=_;c(L=>[...L,v.jsx(AF,{classes:{ripple:Ae(o.ripple,qi.ripple),rippleVisible:Ae(o.rippleVisible,qi.rippleVisible),ripplePulsate:Ae(o.ripplePulsate,qi.ripplePulsate),child:Ae(o.child,qi.child),childLeaving:Ae(o.childLeaving,qi.childLeaving),childPulsate:Ae(o.childPulsate,qi.childPulsate)},timeout:c1,pulsate:k,rippleX:O,rippleY:R,rippleSize:T},u.current)]),u.current+=1,d.current=$},[o]),b=C.useCallback((_={},k={},O=()=>{})=>{const{pulsate:R=!1,center:T=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,M=L?L.getBoundingClientRect():{width:0,height:0,left:0,top:0};let F,z,K;if(T||_===void 0||_.clientX===0&&_.clientY===0||!_.clientX&&!_.touches)F=Math.round(M.width/2),z=Math.round(M.height/2);else{const{clientX:Z,clientY:oe}=_.touches&&_.touches.length>0?_.touches[0]:_;F=Math.round(Z-M.left),z=Math.round(oe-M.top)}if(T)K=Math.sqrt((2*M.width**2+M.height**2)/3),K%2===0&&(K+=1);else{const Z=Math.max(Math.abs((L?L.clientWidth:0)-F),F)*2+2,oe=Math.max(Math.abs((L?L.clientHeight:0)-z),z)*2+2;K=Math.sqrt(Z**2+oe**2)}_!=null&&_.touches?m.current===null&&(m.current=()=>{E({pulsate:R,rippleX:F,rippleY:z,rippleSize:K,cb:O})},h.start(IF,()=>{m.current&&(m.current(),m.current=null)})):E({pulsate:R,rippleX:F,rippleY:z,rippleSize:K,cb:O})},[i,E,h]),x=C.useCallback(()=>{b({},{pulsate:!0})},[b]),y=C.useCallback((_,k)=>{if(h.clear(),(_==null?void 0:_.type)==="touchend"&&m.current){m.current(),m.current=null,h.start(0,()=>{y(_,k)});return}m.current=null,c(O=>O.length>0?O.slice(1):O),d.current=k},[h]);return C.useImperativeHandle(n,()=>({pulsate:x,start:b,stop:y}),[x,b,y]),v.jsx(DF,D({className:Ae(qi.root,o.root,s),ref:g},a,{children:v.jsx(Ex,{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"}}),Do=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:h="a",onBlur:m,onClick:g,onContextMenu:E,onDragLeave:b,onFocus:x,onFocusVisible:y,onKeyDown:_,onKeyUp:k,onMouseDown:O,onMouseLeave:R,onMouseUp:T,onTouchEnd:$,onTouchMove:L,onTouchStart:M,tabIndex:F=0,TouchRippleProps:z,touchRippleRef:K,type:Z}=r,oe=Ie(r,UF),fe=C.useRef(null),H=C.useRef(null),V=un(H,K),{isFocusVisibleRef:le,onFocus:Oe,onBlur:Ue,ref:Te}=wv(),[ke,qe]=C.useState(!1);c&&ke&&qe(!1),C.useImperativeHandle(i,()=>({focusVisible:()=>{qe(!0),fe.current.focus()}}),[]);const[Re,tt]=C.useState(!1);C.useEffect(()=>{tt(!0)},[]);const at=Re&&!u&&!c;C.useEffect(()=>{ke&&f&&!u&&Re&&H.current.pulsate()},[u,f,ke,Re]);function Pe(je,Ye,kt=d){return Zi(Kt=>(Ye&&Ye(Kt),!kt&&H.current&&H.current[je](Kt),!0))}const Pt=Pe("start",O),ct=Pe("stop",E),Ze=Pe("stop",b),ot=Pe("stop",T),nt=Pe("stop",je=>{ke&&je.preventDefault(),R&&R(je)}),ee=Pe("start",M),me=Pe("stop",$),_e=Pe("stop",L),Be=Pe("stop",je=>{Ue(je),le.current===!1&&qe(!1),m&&m(je)},!1),W=Zi(je=>{fe.current||(fe.current=je.currentTarget),Oe(je),le.current===!0&&(qe(!0),y&&y(je)),x&&x(je)}),S=()=>{const je=fe.current;return l&&l!=="button"&&!(je.tagName==="A"&&je.href)},j=C.useRef(!1),A=Zi(je=>{f&&!j.current&&ke&&H.current&&je.key===" "&&(j.current=!0,H.current.stop(je,()=>{H.current.start(je)})),je.target===je.currentTarget&&S()&&je.key===" "&&je.preventDefault(),_&&_(je),je.target===je.currentTarget&&S()&&je.key==="Enter"&&!c&&(je.preventDefault(),g&&g(je))}),q=Zi(je=>{f&&je.key===" "&&H.current&&ke&&!je.defaultPrevented&&(j.current=!1,H.current.stop(je,()=>{H.current.pulsate(je)})),k&&k(je),g&&je.target===je.currentTarget&&S()&&je.key===" "&&!je.defaultPrevented&&g(je)});let J=l;J==="button"&&(oe.href||oe.to)&&(J=h);const pe={};J==="button"?(pe.type=Z===void 0?"button":Z,pe.disabled=c):(!oe.href&&!oe.to&&(pe.role="button"),c&&(pe["aria-disabled"]=c));const Fe=un(n,Te,fe),it=D({},r,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:F,focusVisible:ke}),et=WF(it);return v.jsxs(GF,D({as:J,className:Ae(et.root,a),ownerState:it,onBlur:Be,onClick:g,onContextMenu:ct,onFocus:W,onKeyDown:A,onKeyUp:q,onMouseDown:Pt,onMouseLeave:nt,onMouseUp:ot,onDragLeave:Ze,onTouchEnd:me,onTouchMove:_e,onTouchStart:ee,ref:Fe,tabIndex:c?-1:F,type:Z},pe,oe,{children:[s,at?v.jsx(BF,D({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(Do,{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})=>D({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})`:Dt(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 D({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&D({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":D({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Dt(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=D({},r,{edge:i,color:a,disabled:l,disableFocusRipple:c,size:u}),h=qF(f);return v.jsx(YF,D({className:Ae(h.root,s),centerRipple:!0,focusRipple:!c,disabled:l,ref:n},d,{ownerState:f,children:o}))});var Rx={},s0={};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,h,m;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:(h=(e.vars||e).palette)==null||(h=h.action)==null?void 0:h.active,disabled:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.disabled,inherit:void 0}[t.color]}}),u1=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,h=Ie(r,XF),m=C.isValidElement(i)&&i.type==="svg",g=D({},r,{color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:m}),E={};u||(E.viewBox=f);const b=JF(g);return v.jsxs(ZF,D({as:a,className:Ae(b.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},E,h,m&&i.props,{ownerState:g,children:[m?i.props.children:i,d?v.jsx("title",{children:d}):null]}))});u1.muiName="SvgIcon";function zn(e,t){function n(r,i){return v.jsx(u1,D({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=u1.muiName,C.memo(C.forwardRef(n))}const e6={configure:e=>{gx.configure(e)}},t6=Object.freeze(Object.defineProperty({__proto__:null,capitalize:we,createChainedFunction:a1,createSvgIcon:zn,debounce:Sv,deprecatedPropType:$3,isMuiElement:Jd,ownerDocument:Yn,ownerWindow:ls,requirePropFactory:D3,setRef:Bm,unstable_ClassNameGenerator:e6,unstable_useEnhancedEffect:ai,unstable_useId:gp,unsupportedProp:B3,useControlled:Cu,useEventCallback:Zi,useForkRef:un,useIsFocusVisible:wv},Symbol.toStringTag,{value:"Module"})),n6=Ys(t6);var hk;function ps(){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=n6}(s0)),s0}var r6=uo;Object.defineProperty(Rx,"__esModule",{value:!0});var EO=Rx.default=void 0,i6=r6(ps()),o6=v;EO=Rx.default=(0,i6.default)((0,o6.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");function s6(e){const t=Yn(e);return t.body===e?ls(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Zd(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function mk(e){return parseInt(ls(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 gk(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&&Zd(s,i)})}function a0(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(Yn(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${mk(r)+s}px`;const a=Yn(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${mk(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Yn(r).body;else{const s=r.parentElement,a=ls(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&&Zd(t.modalRef,!1);const i=c6(n);gk(n,t.mount,t.modalRef,i,!0);const o=a0(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=a0(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=a0(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&&Zd(t.modalRef,n),gk(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&&Zd(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),h=C.useRef(!1),m=C.useRef(null),g=un(t.ref,m),E=C.useRef(null);C.useEffect(()=>{!a||!m.current||(h.current=!n)},[n,a]),C.useEffect(()=>{if(!a||!m.current)return;const y=Yn(m.current);return m.current.contains(y.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),h.current&&m.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[a]),C.useEffect(()=>{if(!a||!m.current)return;const y=Yn(m.current),_=R=>{E.current=R,!(r||!s()||R.key!=="Tab")&&y.activeElement===m.current&&R.shiftKey&&(l.current=!0,u.current&&u.current.focus())},k=()=>{const R=m.current;if(R===null)return;if(!y.hasFocus()||!s()||l.current){l.current=!1;return}if(R.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(!h.current)return;let T=[];if((y.activeElement===c.current||y.activeElement===u.current)&&(T=o(m.current)),T.length>0){var $,L;const M=!!(($=E.current)!=null&&$.shiftKey&&((L=E.current)==null?void 0:L.key)==="Tab"),F=T[0],z=T[T.length-1];typeof F!="string"&&typeof z!="string"&&(M?z.focus():F.focus())}else R.focus()};y.addEventListener("focusin",k),y.addEventListener("keydown",_,!0);const O=setInterval(()=>{y.activeElement&&y.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(O),y.removeEventListener("focusin",k),y.removeEventListener("keydown",_,!0)}},[n,r,i,s,a,o]);const b=y=>{d.current===null&&(d.current=y.relatedTarget),h.current=!0,f.current=y.target;const _=t.props.onFocus;_&&_(y)},x=y=>{d.current===null&&(d.current=y.relatedTarget),h.current=!0};return v.jsxs(C.Fragment,{children:[v.jsx("div",{tabIndex:a?0:-1,onFocus:x,ref:c,"data-testid":"sentinelStart"}),C.cloneElement(t,{ref:g,onFocus:b}),v.jsx("div",{tabIndex:a?0:-1,onFocus:x,ref:u,"data-testid":"sentinelEnd"})]})}function y6(e){return typeof e=="function"?e():e}const Px=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(ai(()=>{o||a(y6(i)||document.body)},[i,o]),ai(()=>{if(s&&!o)return Bm(n,s),()=>{Bm(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&&Ag.createPortal(r,s)})}),Tx=e=>e.scrollTop;function Ba(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=Bi(),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:h,onExited:m,onExiting:g,style:E,timeout:b=i,TransitionComponent:x=ho}=t,y=Ie(t,b6),_=C.useRef(null),k=un(_,a.ref,n),O=K=>Z=>{if(K){const oe=_.current;Z===void 0?K(oe):K(oe,Z)}},R=O(f),T=O((K,Z)=>{Tx(K);const oe=Ba({style:E,timeout:b,easing:l},{mode:"enter"});K.style.webkitTransition=r.transitions.create("opacity",oe),K.style.transition=r.transitions.create("opacity",oe),u&&u(K,Z)}),$=O(d),L=O(g),M=O(K=>{const Z=Ba({style:E,timeout:b,easing:l},{mode:"exit"});K.style.webkitTransition=r.transitions.create("opacity",Z),K.style.transition=r.transitions.create("opacity",Z),h&&h(K)}),F=O(m),z=K=>{o&&o(_.current,K)};return v.jsx(x,D({appear:s,in:c,nodeRef:_,onEnter:T,onEntered:$,onEntering:R,onExit:M,onExited:F,onExiting:L,addEndListener:z,timeout:b},y,{children:(K,Z)=>C.cloneElement(a,D({style:D({opacity:0,visibility:K==="exited"&&!c?"hidden":void 0},w6[K],E,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})=>D({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:h,slotProps:m={},slots:g={},TransitionComponent:E=RO,transitionDuration:b}=s,x=Ie(s,S6),y=D({},s,{component:c,invisible:f}),_=_6(y),k=(r=m.root)!=null?r:d.root;return v.jsx(E,D({in:h,timeout:b},x,{children:v.jsx(C6,D({"aria-hidden":!0},k,{as:(i=(o=g.root)!=null?o:u.Root)!=null?i:c,className:Ae(_.root,l,k==null?void 0:k.className),ownerState:D({},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({}),h=C.useRef(null),m=C.useRef(null),g=un(m,d),[E,b]=C.useState(!u),x=E6(l);let y=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(y=!1);const _=()=>Yn(h.current),k=()=>(f.current.modalRef=m.current,f.current.mount=h.current,f.current),O=()=>{i.mount(k(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},R=Zi(()=>{const oe=k6(t)||_().body;i.add(k(),oe),m.current&&O()}),T=C.useCallback(()=>i.isTopModal(k()),[i]),$=Zi(oe=>{h.current=oe,oe&&(u&&T()?O():m.current&&Zd(m.current,y))}),L=C.useCallback(()=>{i.remove(k(),y)},[y,i]);C.useEffect(()=>()=>{L()},[L]),C.useEffect(()=>{u?R():(!x||!o)&&L()},[u,L,x,o,R]);const M=oe=>fe=>{var H;(H=oe.onKeyDown)==null||H.call(oe,fe),!(fe.key!=="Escape"||fe.which===229||!T())&&(n||(fe.stopPropagation(),c&&c(fe,"escapeKeyDown")))},F=oe=>fe=>{var H;(H=oe.onClick)==null||H.call(oe,fe),fe.target===fe.currentTarget&&c&&c(fe,"backdropClick")};return{getRootProps:(oe={})=>{const fe=Fm(e);delete fe.onTransitionEnter,delete fe.onTransitionExited;const H=D({},fe,oe);return D({role:"presentation"},H,{onKeyDown:M(H),ref:g})},getBackdropProps:(oe={})=>{const fe=oe;return D({"aria-hidden":!0},fe,{onClick:F(fe),open:u})},getTransitionProps:()=>{const oe=()=>{b(!1),s&&s()},fe=()=>{b(!0),a&&a(),o&&L()};return{onEnter:a1(oe,l==null?void 0:l.props.onEnter),onExited:a1(fe,l==null?void 0:l.props.onExited)}},rootRef:g,portalRef:$,isTopModal:T,exited:E,hasTransition:x}}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})=>D({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}),Cv=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:h=!1,children:m,container:g,component:E,components:b={},componentsProps:x={},disableAutoFocus:y=!1,disableEnforceFocus:_=!1,disableEscapeKeyDown:k=!1,disablePortal:O=!1,disableRestoreFocus:R=!1,disableScrollLock:T=!1,hideBackdrop:$=!1,keepMounted:L=!1,onBackdropClick:M,open:F,slotProps:z,slots:K}=c,Z=Ie(c,O6),oe=D({},c,{closeAfterTransition:h,disableAutoFocus:y,disableEnforceFocus:_,disableEscapeKeyDown:k,disablePortal:O,disableRestoreFocus:R,disableScrollLock:T,hideBackdrop:$,keepMounted:L}),{getRootProps:fe,getBackdropProps:H,getTransitionProps:V,portalRef:le,isTopModal:Oe,exited:Ue,hasTransition:Te}=P6(D({},oe,{rootRef:n})),ke=D({},oe,{exited:Ue}),qe=j6(ke),Re={};if(m.props.tabIndex===void 0&&(Re.tabIndex="-1"),Te){const{onEnter:ot,onExited:nt}=V();Re.onEnter=ot,Re.onExited=nt}const tt=(r=(i=K==null?void 0:K.root)!=null?i:b.Root)!=null?r:L6,at=(o=(s=K==null?void 0:K.backdrop)!=null?s:b.Backdrop)!=null?o:u,Pe=(a=z==null?void 0:z.root)!=null?a:x.root,Pt=(l=z==null?void 0:z.backdrop)!=null?l:x.backdrop,ct=$o({elementType:tt,externalSlotProps:Pe,externalForwardedProps:Z,getSlotProps:fe,additionalProps:{ref:n,as:E},ownerState:ke,className:Ae(f,Pe==null?void 0:Pe.className,qe==null?void 0:qe.root,!ke.open&&ke.exited&&(qe==null?void 0:qe.hidden))}),Ze=$o({elementType:at,externalSlotProps:Pt,additionalProps:d,getSlotProps:ot=>H(D({},ot,{onClick:nt=>{M&&M(nt),ot!=null&&ot.onClick&&ot.onClick(nt)}})),className:Ae(Pt==null?void 0:Pt.className,d==null?void 0:d.className,qe==null?void 0:qe.backdrop),ownerState:ke});return!L&&!F&&(!Te||Ue)?null:v.jsx(Px,{ref:le,container:g,disablePortal:O,children:v.jsxs(tt,D({},ct,{children:[!$&&u?v.jsx(at,D({},Ze)):null,v.jsx(v6,{disableEnforceFocus:_,disableAutoFocus:y,disableRestoreFocus:R,isEnabled:Oe,open:F,children:C.cloneElement(m,Re)})]}))})}),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=ls(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 fh(e,t,n){const r=$6(n),i=N6(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const D6=C.forwardRef(function(t,n){const r=Bi(),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:h,onEntered:m,onEntering:g,onExit:E,onExited:b,onExiting:x,style:y,timeout:_=o,TransitionComponent:k=ho}=t,O=Ie(t,M6),R=C.useRef(null),T=un(l.ref,R,n),$=H=>V=>{H&&(V===void 0?H(R.current):H(R.current,V))},L=$((H,V)=>{fh(u,H,c),Tx(H),h&&h(H,V)}),M=$((H,V)=>{const le=Ba({timeout:_,style:y,easing:d},{mode:"enter"});H.style.webkitTransition=r.transitions.create("-webkit-transform",D({},le)),H.style.transition=r.transitions.create("transform",D({},le)),H.style.webkitTransform="none",H.style.transform="none",g&&g(H,V)}),F=$(m),z=$(x),K=$(H=>{const V=Ba({timeout:_,style:y,easing:d},{mode:"exit"});H.style.webkitTransition=r.transitions.create("-webkit-transform",V),H.style.transition=r.transitions.create("transform",V),fh(u,H,c),E&&E(H)}),Z=$(H=>{H.style.webkitTransition="",H.style.transition="",b&&b(H)}),oe=H=>{s&&s(R.current,H)},fe=C.useCallback(()=>{R.current&&fh(u,R.current,c)},[u,c]);return C.useEffect(()=>{if(f||u==="down"||u==="right")return;const H=Sv(()=>{R.current&&fh(u,R.current,c)}),V=ls(R.current);return V.addEventListener("resize",H),()=>{H.clear(),V.removeEventListener("resize",H)}},[u,f,c]),C.useEffect(()=>{f||fe()},[f,fe]),v.jsx(k,D({nodeRef:R,onEnter:L,onEntered:F,onEntering:M,onExit:K,onExited:Z,onExiting:z,addEndListener:oe,appear:a,in:f,timeout:_},O,{children:(H,V)=>C.cloneElement(l,D({ref:T,style:D({visibility:H==="exited"&&!f?"hidden":void 0},y,l.props.style)},V))}))});function A6(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,A6,t)},U6=Ee(Cv,{name:"MuiDrawer",slot:"Root",overridesResolver:TO})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),vk=Ee("div",{shouldForwardProp:dr,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:TO})({flex:"0 0 auto"}),W6=Ee(fs,{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})=>D({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=Bi(),o=Cx(),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:h}={},onClose:m,open:g=!1,PaperProps:E={},SlideProps:b,TransitionComponent:x=D6,transitionDuration:y=s,variant:_="temporary"}=r,k=Ie(r.ModalProps,B6),O=Ie(r,F6),R=C.useRef(!1);C.useEffect(()=>{R.current=!0},[]);const T=H6({direction:o?"rtl":"ltr"},a),L=D({},r,{anchor:a,elevation:d,open:g,variant:_},O),M=z6(L),F=v.jsx(W6,D({elevation:_==="temporary"?d:0,square:!0},E,{className:Ae(M.paper,E.className),ownerState:L,children:c}));if(_==="permanent")return v.jsx(vk,D({className:Ae(M.root,M.docked,u),ownerState:L,ref:n},O,{children:F}));const z=v.jsx(x,D({in:g,direction:OO[T],timeout:y,appear:R.current},b,{children:F}));return _==="persistent"?v.jsx(vk,D({className:Ae(M.root,M.docked,u),ownerState:L,ref:n},O,{children:z})):v.jsx(U6,D({BackdropProps:D({},l,h,{transitionDuration:y}),className:Ae(M.root,M.modal,u),open:g,ownerState:L,onClose:m,hideBackdrop:f,ref:n},O,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})=>D({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),ef=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=D({},r,{component:s,dense:a,disablePadding:l}),h=Y6(f);return v.jsx(jo.Provider,{value:d,children:v.jsxs(Q6,D({as:s,className:Ae(h.root,o),ref:n,ownerState:f},u,{children:[c,i]}))})});function X6(e){return ft("MuiListItem",e)}const Ic=pt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function J6(e){return ft("MuiListItemButton",e)}const Mc=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 D({},n,c)},nz=Ee(Do,{shouldForwardProp:e=>dr(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:ez})(({theme:e,ownerState:t})=>D({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"}},[`&.${Mc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Dt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Mc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Dt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Mc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Dt(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})`:Dt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Mc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Mc.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:h}=r,m=Ie(r,Z6),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);ai(()=>{o&&b.current&&b.current.focus()},[o]);const x=D({},r,{alignItems:i,dense:E.dense,disableGutters:c,divider:u,selected:f}),y=tz(x),_=un(b,n);return v.jsx(jo.Provider,{value:E,children:v.jsx(nz,D({ref:_,href:m.href||m.to,component:(m.href||m.to)&&s==="div"?"button":s,focusVisibleClassName:Ae(y.focusVisible,d),ownerState:x,className:Ae(y.root,h)},m,{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})=>D({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=D({},r,{disableGutters:s.disableGutters}),l=sz(a);return v.jsx(az,D({className:Ae(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})=>D({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&D({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Mc.root}`]:{paddingRight:48}},{[`&.${Ic.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ic.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Dt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ic.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Dt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ic.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"}},[`&.${Ic.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Dt(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})`:Dt(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"}),So=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:h}={},dense:m=!1,disabled:g=!1,disableGutters:E=!1,disablePadding:b=!1,divider:x=!1,focusVisibleClassName:y,secondaryAction:_,selected:k=!1,slotProps:O={},slots:R={}}=r,T=Ie(r.ContainerProps,lz),$=Ie(r,cz),L=C.useContext(jo),M=C.useMemo(()=>({dense:m||L.dense||!1,alignItems:i,disableGutters:E}),[i,L.dense,m,E]),F=C.useRef(null);ai(()=>{o&&F.current&&F.current.focus()},[o]);const z=C.Children.toArray(a),K=z.length&&Jd(z[z.length-1],["ListItemSecondaryAction"]),Z=D({},r,{alignItems:i,autoFocus:o,button:s,dense:M.dense,disabled:g,disableGutters:E,disablePadding:b,divider:x,hasSecondaryAction:K,selected:k}),oe=dz(Z),fe=un(F,n),H=R.root||u.Root||fz,V=O.root||d.root||{},le=D({className:Ae(oe.root,V.className,l),disabled:g},$);let Oe=c||"li";return s&&(le.component=c||"div",le.focusVisibleClassName=Ae(Ic.focusVisible,y),Oe=Do),K?(Oe=!le.component&&!c?"div":Oe,f==="li"&&(Oe==="li"?Oe="div":le.component==="li"&&(le.component="div")),v.jsx(jo.Provider,{value:M,children:v.jsxs(pz,D({as:f,className:Ae(oe.container,h),ref:fe,ownerState:Z},T,{children:[v.jsx(H,D({},V,!ku(H)&&{as:Oe,ownerState:D({},Z,V.ownerState)},le,{children:z})),z.pop()]}))})):v.jsx(jo.Provider,{value:M,children:v.jsxs(H,D({},V,{as:Oe,ref:fe},!ku(H)&&{ownerState:D({},Z,V.ownerState)},le,{children:[z,_&&v.jsx(jO,{children:_})]}))})});function hz(e){return ft("MuiListItemText",e)}const Um=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[{[`& .${Um.primary}`]:t.primary},{[`& .${Um.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>D({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:h}=C.useContext(jo);let m=l??i,g=u;const E=D({},r,{disableTypography:s,inset:a,primary:!!m,secondary:!!g,dense:h}),b=gz(E);return m!=null&&m.type!==Ct&&!s&&(m=v.jsx(Ct,D({variant:h?"body2":"body1",className:b.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:m}))),g!=null&&g.type!==Ct&&!s&&(g=v.jsx(Ct,D({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},d,{children:g}))),v.jsxs(vz,D({className:Ae(b.root,o),ownerState:E,ref:n},f,{children:[m,g]}))});function yz(e){return ft("MuiDivider",e)}const yk=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})=>D({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)`:Dt(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})=>D({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>D({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>D({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>D({},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})=>D({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:h="fullWidth"}=r,m=Ie(r,bz),g=D({},r,{absolute:i,component:a,flexItem:l,light:c,orientation:u,role:d,textAlign:f,variant:h}),E=wz(g);return v.jsx(xz,D({as:a,className:Ae(E.root,s),role:d,ref:n,ownerState:g},m,{children:o?v.jsx(Sz,{className:E.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[_u];return v.jsx(q3,D({},n,{themeId:r?_u:void 0,theme:r||t}))}var rn={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ox=Symbol.for("react.element"),jx=Symbol.for("react.portal"),kv=Symbol.for("react.fragment"),Ev=Symbol.for("react.strict_mode"),Rv=Symbol.for("react.profiler"),Pv=Symbol.for("react.provider"),Tv=Symbol.for("react.context"),kz=Symbol.for("react.server_context"),Ov=Symbol.for("react.forward_ref"),jv=Symbol.for("react.suspense"),Lv=Symbol.for("react.suspense_list"),Iv=Symbol.for("react.memo"),Mv=Symbol.for("react.lazy"),Ez=Symbol.for("react.offscreen"),LO;LO=Symbol.for("react.module.reference");function mo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ox:switch(e=e.type,e){case kv:case Rv:case Ev:case jv:case Lv:return e;default:switch(e=e&&e.$$typeof,e){case kz:case Tv:case Ov:case Mv:case Iv:case Pv:return e;default:return t}}case jx:return t}}}rn.ContextConsumer=Tv;rn.ContextProvider=Pv;rn.Element=Ox;rn.ForwardRef=Ov;rn.Fragment=kv;rn.Lazy=Mv;rn.Memo=Iv;rn.Portal=jx;rn.Profiler=Rv;rn.StrictMode=Ev;rn.Suspense=jv;rn.SuspenseList=Lv;rn.isAsyncMode=function(){return!1};rn.isConcurrentMode=function(){return!1};rn.isContextConsumer=function(e){return mo(e)===Tv};rn.isContextProvider=function(e){return mo(e)===Pv};rn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ox};rn.isForwardRef=function(e){return mo(e)===Ov};rn.isFragment=function(e){return mo(e)===kv};rn.isLazy=function(e){return mo(e)===Mv};rn.isMemo=function(e){return mo(e)===Iv};rn.isPortal=function(e){return mo(e)===jx};rn.isProfiler=function(e){return mo(e)===Rv};rn.isStrictMode=function(e){return mo(e)===Ev};rn.isSuspense=function(e){return mo(e)===jv};rn.isSuspenseList=function(e){return mo(e)===Lv};rn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kv||e===Rv||e===Ev||e===jv||e===Lv||e===Ez||typeof e=="object"&&e!==null&&(e.$$typeof===Mv||e.$$typeof===Iv||e.$$typeof===Pv||e.$$typeof===Tv||e.$$typeof===Ov||e.$$typeof===LO||e.getModuleId!==void 0)};rn.typeOf=mo;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})=>D({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&D({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})=>D({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})=>D({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:h,onExit:m,onExited:g,onExiting:E,orientation:b="vertical",style:x,timeout:y=pO.standard,TransitionComponent:_=ho}=r,k=Ie(r,Pz),O=D({},r,{orientation:b,collapsedSize:a}),R=Tz(O),T=Bi(),$=Sa(),L=C.useRef(null),M=C.useRef(),F=typeof a=="number"?`${a}px`:a,z=b==="horizontal",K=z?"width":"height",Z=C.useRef(null),oe=un(n,Z),fe=Re=>tt=>{if(Re){const at=Z.current;tt===void 0?Re(at):Re(at,tt)}},H=()=>L.current?L.current[z?"clientWidth":"clientHeight"]:0,V=fe((Re,tt)=>{L.current&&z&&(L.current.style.position="absolute"),Re.style[K]=F,d&&d(Re,tt)}),le=fe((Re,tt)=>{const at=H();L.current&&z&&(L.current.style.position="");const{duration:Pe,easing:Pt}=Ba({style:x,timeout:y,easing:c},{mode:"enter"});if(y==="auto"){const ct=T.transitions.getAutoHeightDuration(at);Re.style.transitionDuration=`${ct}ms`,M.current=ct}else Re.style.transitionDuration=typeof Pe=="string"?Pe:`${Pe}ms`;Re.style[K]=`${at}px`,Re.style.transitionTimingFunction=Pt,h&&h(Re,tt)}),Oe=fe((Re,tt)=>{Re.style[K]="auto",f&&f(Re,tt)}),Ue=fe(Re=>{Re.style[K]=`${H()}px`,m&&m(Re)}),Te=fe(g),ke=fe(Re=>{const tt=H(),{duration:at,easing:Pe}=Ba({style:x,timeout:y,easing:c},{mode:"exit"});if(y==="auto"){const Pt=T.transitions.getAutoHeightDuration(tt);Re.style.transitionDuration=`${Pt}ms`,M.current=Pt}else Re.style.transitionDuration=typeof at=="string"?at:`${at}ms`;Re.style[K]=F,Re.style.transitionTimingFunction=Pe,E&&E(Re)}),qe=Re=>{y==="auto"&&$.start(M.current||0,Re),i&&i(Z.current,Re)};return v.jsx(_,D({in:u,onEnter:V,onEntered:Oe,onEntering:le,onExit:Ue,onExited:Te,onExiting:ke,addEndListener:qe,nodeRef:Z,timeout:y==="auto"?null:y},k,{children:(Re,tt)=>v.jsx(Oz,D({as:l,className:Ae(R.root,s,{entered:R.entered,exited:!u&&F==="0px"&&R.hidden}[Re]),style:D({[z?"minWidth":"minHeight"]:F},x),ref:oe},tt,{ownerState:D({},O,{state:Re}),children:v.jsx(jz,{ownerState:D({},O,{state:Re}),className:R.wrapper,ref:L,children:v.jsx(Lz,{ownerState:D({},O,{state:Re}),className:R.wrapperInner,children:o})})}))}))});IO.muiSupportAuto=!0;const MO=C.createContext({}),Iz=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],Mz=["component","slots","slotProps"],Nz=["component"];function d1(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),h=u[e]||r,m=xO(d[e],i),g=wO(D({className:n},l,{externalForwardedProps:e==="root"?f:void 0,externalSlotProps:m})),{props:{component:E},internalRef:b}=g,x=Ie(g.props,Nz),y=un(b,m==null?void 0:m.ref,t.ref),_=s?s(x):{},k=D({},i,_),O=e==="root"?E||c:E,R=Xc(h,D({},e==="root"&&!c&&!u[e]&&a,e!=="root"&&!u[e]&&a,x,O&&{as:O},{ref:y}),k);return Object.keys(_).forEach(T=>{delete R[T]}),[h,R]}function $z(e){return ft("MuiAccordion",e)}const ph=pt("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),Dz=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],Az=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(fs,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ph.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"}},[`&.${ph.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${ph.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:{[`&.${ph.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:h={},TransitionComponent:m,TransitionProps:g}=r,E=Ie(r,Dz),[b,x]=Cu({controlled:c,default:s,name:"Accordion",state:"expanded"}),y=C.useCallback(z=>{x(!b),u&&u(z,!b)},[b,u,x]),[_,...k]=C.Children.toArray(i),O=C.useMemo(()=>({expanded:b,disabled:a,disableGutters:l,toggle:y}),[b,a,l,y]),R=D({},r,{square:d,disabled:a,disableGutters:l,expanded:b}),T=Az(R),$=D({transition:m},f),L=D({transition:g},h),[M,F]=d1("transition",{elementType:IO,externalForwardedProps:{slots:$,slotProps:L},ownerState:R});return v.jsxs(Bz,D({className:Ae(T.root,o),ref:n,ownerState:R,square:d},E,{children:[v.jsx(MO.Provider,{value:O,children:_}),v.jsx(M,D({in:b,timeout:"auto"},F,{children:v.jsx("div",{"aria-labelledby":_.props.id,id:_.props["aria-controls"],role:"region",className:T.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,D({className:Ae(a.root,i),ref:n,ownerState:s},o))});function Vz(e){return ft("MuiAccordionSummary",e)}const Jc=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(Do,{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),[`&.${Jc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Jc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${Jc.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${Jc.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}),[`&.${Jc.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}),[`&.${Jc.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:h}=C.useContext(MO),m=b=>{h&&h(b),l&&l(b)},g=D({},r,{expanded:f,disabled:u,disableGutters:d}),E=qz(g);return v.jsxs(Yz,D({focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":f,className:Ae(E.root,o),focusVisibleClassName:Ae(E.focusVisible,a),onClick:m,ref:n,ownerState:g},c,{children:[v.jsx(Qz,{className:E.content,ownerState:g,children:i}),s&&v.jsx(Xz,{className:E.expandIconWrapper,ownerState:g,children:s})]}))});function Zz(e){return ft("MuiAlert",e)}const bk=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=zn(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=zn(v.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),n8=zn(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=zn(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=zn(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(fs,{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"?$m:Dm,n=e.palette.mode==="light"?Dm:$m;return D({},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),[`& .${bk.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}`,[`& .${bk.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:D({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"}),wk=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}),xk={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=xk,onClose:h,role:m="alert",severity:g="success",slotProps:E={},slots:b={},variant:x="standard"}=r,y=Ie(r,o8),_=D({},r,{color:l,severity:g,variant:x,colorSeverity:l||g}),k=s8(_),O={slots:D({closeButton:c.CloseButton,closeIcon:c.CloseIcon},b),slotProps:D({},u,E)},[R,T]=d1("closeButton",{elementType:Fo,externalForwardedProps:O,ownerState:_}),[$,L]=d1("closeIcon",{elementType:i8,externalForwardedProps:O,ownerState:_});return v.jsxs(a8,D({role:m,elevation:0,ownerState:_,className:Ae(k.root,s),ref:n},y,{children:[d!==!1?v.jsx(l8,{ownerState:_,className:k.icon,children:d||f[g]||xk[g]}):null,v.jsx(c8,{ownerState:_,className:k.message,children:o}),i!=null?v.jsx(wk,{ownerState:_,className:k.action,children:i}):null,i==null&&h?v.jsx(wk,{ownerState:_,className:k.action,children:v.jsx(R,D({size:"small","aria-label":a,title:a,color:"inherit",onClick:h},T,{children:v.jsx($,D({fontSize:"small"},L))}))}):null]}))});var Lx={};Object.defineProperty(Lx,"__esModule",{value:!0});var NO=Lx.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=Lx.default=m8;var ii="top",so="bottom",ao="right",oi="left",Ix="auto",yp=[ii,so,ao,oi],Eu="start",Uf="end",g8="clippingParents",DO="viewport",xd="popper",v8="reference",Sk=yp.reduce(function(e,t){return e.concat([t+"-"+Eu,t+"-"+Uf])},[]),AO=[].concat(yp,[Ix]).reduce(function(e,t){return e.concat([t,t+"-"+Eu,t+"-"+Uf])},[]),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 cs(e){return e?(e.nodeName||"").toLowerCase():null}function Ii(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Kl(e){var t=Ii(e).Element;return e instanceof t||e instanceof Element}function to(e){var t=Ii(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Mx(e){if(typeof ShadowRoot>"u")return!1;var t=Ii(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];!to(o)||!cs(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},{});!to(i)||!cs(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 as(e){return e.split("-")[0]}var Ll=Math.max,Wm=Math.min,Ru=Math.round;function f1(){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(f1())}function Pu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&to(e)&&(i=e.offsetWidth>0&&Ru(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Ru(r.height)/e.offsetHeight||1);var s=Kl(e)?Ii(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 Nx(e){var t=Pu(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&&Mx(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 Ii(e).getComputedStyle(e)}function j8(e){return["table","td","th"].indexOf(cs(e))>=0}function Ya(e){return((Kl(e)?e.ownerDocument:e.document)||window.document).documentElement}function Nv(e){return cs(e)==="html"?e:e.assignedSlot||e.parentNode||(Mx(e)?e.host:null)||Ya(e)}function _k(e){return!to(e)||zs(e).position==="fixed"?null:e.offsetParent}function L8(e){var t=/firefox/i.test(f1()),n=/Trident/i.test(f1());if(n&&to(e)){var r=zs(e);if(r.position==="fixed")return null}var i=Nv(e);for(Mx(i)&&(i=i.host);to(i)&&["html","body"].indexOf(cs(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 bp(e){for(var t=Ii(e),n=_k(e);n&&j8(n)&&zs(n).position==="static";)n=_k(n);return n&&(cs(n)==="html"||cs(n)==="body"&&zs(n).position==="static")?t:n||L8(e)||t}function $x(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function tf(e,t,n){return Ll(e,Wm(t,n))}function I8(e,t,n){var r=tf(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,yp))};function N8(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=as(n.placement),l=$x(a),c=[oi,ao].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var d=M8(i.padding,n),f=Nx(o),h=l==="y"?ii:oi,m=l==="y"?so:ao,g=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],E=s[l]-n.rects.reference[l],b=bp(o),x=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,y=g/2-E/2,_=d[h],k=x-f[u]-d[m],O=x/2-f[u]/2+y,R=tf(_,O,k),T=l;n.modifiersData[r]=(t={},t[T]=R,t.centerOffset=R-O,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 D8={name:"arrow",enabled:!0,phase:"main",fn:N8,effect:$8,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Tu(e){return e.split("-")[1]}var A8={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:Ru(n*i)/i||0,y:Ru(r*i)/i||0}}function Ck(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,h=f===void 0?0:f,m=s.y,g=m===void 0?0:m,E=typeof u=="function"?u({x:h,y:g}):{x:h,y:g};h=E.x,g=E.y;var b=s.hasOwnProperty("x"),x=s.hasOwnProperty("y"),y=oi,_=ii,k=window;if(c){var O=bp(n),R="clientHeight",T="clientWidth";if(O===Ii(n)&&(O=Ya(n),zs(O).position!=="static"&&a==="absolute"&&(R="scrollHeight",T="scrollWidth")),O=O,i===ii||(i===oi||i===ao)&&o===Uf){_=so;var $=d&&O===k&&k.visualViewport?k.visualViewport.height:O[R];g-=$-r.height,g*=l?1:-1}if(i===oi||(i===ii||i===so)&&o===Uf){y=ao;var L=d&&O===k&&k.visualViewport?k.visualViewport.width:O[T];h-=L-r.width,h*=l?1:-1}}var M=Object.assign({position:a},c&&A8),F=u===!0?B8({x:h,y:g},Ii(n)):{x:h,y:g};if(h=F.x,g=F.y,l){var z;return Object.assign({},M,(z={},z[_]=x?"0":"",z[y]=b?"0":"",z.transform=(k.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",z))}return Object.assign({},M,(t={},t[_]=x?g+"px":"",t[y]=b?h+"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:as(t.placement),variation:Tu(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,Ck(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,Ck(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 hh={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=Ii(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,hh)}),a&&l.addEventListener("resize",n.update,hh),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,hh)}),a&&l.removeEventListener("resize",n.update,hh)}}const W8={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:U8,data:{}};var G8={left:"right",right:"left",bottom:"top",top:"bottom"};function Qh(e){return e.replace(/left|right|bottom|top/g,function(t){return G8[t]})}var H8={start:"end",end:"start"};function kk(e){return e.replace(/start|end/g,function(t){return H8[t]})}function Dx(e){var t=Ii(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ax(e){return Pu(Ya(e)).left+Dx(e).scrollLeft}function V8(e,t){var n=Ii(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+Ax(e),y:l}}function K8(e){var t,n=Ya(e),r=Dx(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ll(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Ll(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Ax(e),l=-r.scrollTop;return zs(i||n).direction==="rtl"&&(a+=Ll(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Bx(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(cs(e))>=0?e.ownerDocument.body:to(e)&&Bx(e)?e:GO(Nv(e))}function nf(e,t){var n;t===void 0&&(t=[]);var r=GO(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ii(r),s=i?[o].concat(o.visualViewport||[],Bx(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(nf(Nv(s)))}function p1(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=Pu(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 Ek(e,t,n){return t===DO?p1(V8(e,n)):Kl(t)?q8(t,n):p1(K8(Ya(e)))}function Y8(e){var t=nf(Nv(e)),n=["absolute","fixed"].indexOf(zs(e).position)>=0,r=n&&to(e)?bp(e):e;return Kl(r)?t.filter(function(i){return Kl(i)&&FO(i,r)&&cs(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=Ek(e,c,r);return l.top=Ll(u.top,l.top),l.right=Wm(u.right,l.right),l.bottom=Wm(u.bottom,l.bottom),l.left=Ll(u.left,l.left),l},Ek(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?as(r):null,o=r?Tu(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case ii:l={x:s,y:t.y-n.height};break;case so:l={x:s,y:t.y+t.height};break;case ao:l={x:t.x+t.width,y:a};break;case oi:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?$x(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Eu:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Uf:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Wf(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?DO:c,d=n.elementContext,f=d===void 0?xd:d,h=n.altBoundary,m=h===void 0?!1:h,g=n.padding,E=g===void 0?0:g,b=UO(typeof E!="number"?E:WO(E,yp)),x=f===xd?v8:xd,y=e.rects.popper,_=e.elements[m?x:f],k=Q8(Kl(_)?_:_.contextElement||Ya(e.elements.popper),l,u,s),O=Pu(e.elements.reference),R=HO({reference:O,element:y,strategy:"absolute",placement:i}),T=p1(Object.assign({},y,R)),$=f===xd?T:O,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},M=e.modifiersData.offset;if(f===xd&&M){var F=M[i];Object.keys(L).forEach(function(z){var K=[ao,so].indexOf(z)>=0?1:-1,Z=[ii,so].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?AO:l,u=Tu(r),d=u?a?Sk:Sk.filter(function(m){return Tu(m)===u}):yp,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var h=f.reduce(function(m,g){return m[g]=Wf(e,{placement:g,boundary:i,rootBoundary:o,padding:s})[as(g)],m},{});return Object.keys(h).sort(function(m,g){return h[m]-h[g]})}function J8(e){if(as(e)===Ix)return[];var t=Qh(e);return[kk(e),t,kk(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,h=n.flipVariations,m=h===void 0?!0:h,g=n.allowedAutoPlacements,E=t.options.placement,b=as(E),x=b===E,y=l||(x||!m?[Qh(E)]:J8(E)),_=[E].concat(y).reduce(function(ke,qe){return ke.concat(as(qe)===Ix?X8(t,{placement:qe,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:g}):qe)},[]),k=t.rects.reference,O=t.rects.popper,R=new Map,T=!0,$=_[0],L=0;L<_.length;L++){var M=_[L],F=as(M),z=Tu(M)===Eu,K=[ii,so].indexOf(F)>=0,Z=K?"width":"height",oe=Wf(t,{placement:M,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),fe=K?z?ao:oi:z?so:ii;k[Z]>O[Z]&&(fe=Qh(fe));var H=Qh(fe),V=[];if(o&&V.push(oe[F]<=0),a&&V.push(oe[fe]<=0,oe[H]<=0),V.every(function(ke){return ke})){$=M,T=!1;break}R.set(M,V)}if(T)for(var le=m?3:1,Oe=function(qe){var Re=_.find(function(tt){var at=R.get(tt);if(at)return at.slice(0,qe).every(function(Pe){return Pe})});if(Re)return $=Re,"break"},Ue=le;Ue>0;Ue--){var Te=Oe(Ue);if(Te==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const eU={name:"flip",enabled:!0,phase:"main",fn:Z8,requiresIfExists:["offset"],data:{_skip:!1}};function Rk(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 Pk(e){return[ii,ao,so,oi].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=Wf(t,{elementContext:"reference"}),a=Wf(t,{altBoundary:!0}),l=Rk(s,r),c=Rk(a,i,o),u=Pk(l),d=Pk(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=as(e),i=[oi,ii].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,[oi,ao].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=AO.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,h=f===void 0?!0:f,m=n.tetherOffset,g=m===void 0?0:m,E=Wf(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=as(t.placement),x=Tu(t.placement),y=!x,_=$x(b),k=lU(_),O=t.modifiersData.popperOffsets,R=t.rects.reference,T=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},$),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(O){if(o){var z,K=_==="y"?ii:oi,Z=_==="y"?so:ao,oe=_==="y"?"height":"width",fe=O[_],H=fe+E[K],V=fe-E[Z],le=h?-T[oe]/2:0,Oe=x===Eu?R[oe]:T[oe],Ue=x===Eu?-T[oe]:-R[oe],Te=t.elements.arrow,ke=h&&Te?Nx(Te):{width:0,height:0},qe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:zO(),Re=qe[K],tt=qe[Z],at=tf(0,R[oe],ke[oe]),Pe=y?R[oe]/2-le-at-Re-L.mainAxis:Oe-at-Re-L.mainAxis,Pt=y?-R[oe]/2+le+at+tt+L.mainAxis:Ue+at+tt+L.mainAxis,ct=t.elements.arrow&&bp(t.elements.arrow),Ze=ct?_==="y"?ct.clientTop||0:ct.clientLeft||0:0,ot=(z=M==null?void 0:M[_])!=null?z:0,nt=fe+Pe-ot-Ze,ee=fe+Pt-ot,me=tf(h?Wm(H,nt):H,fe,h?Ll(V,ee):V);O[_]=me,F[_]=me-fe}if(a){var _e,Be=_==="x"?ii:oi,W=_==="x"?so:ao,S=O[k],j=k==="y"?"height":"width",A=S+E[Be],q=S-E[W],J=[ii,oi].indexOf(b)!==-1,pe=(_e=M==null?void 0:M[k])!=null?_e:0,Fe=J?A:S-R[j]-T[j]-pe+L.altAxis,it=J?S+R[j]+T[j]-pe-L.altAxis:q,et=h&&J?I8(Fe,S,it):tf(h?Fe:A,S,h?it:q);O[k]=et,F[k]=et-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===Ii(e)||!to(e)?Dx(e):dU(e)}function pU(e){var t=e.getBoundingClientRect(),n=Ru(t.width)/e.offsetWidth||1,r=Ru(t.height)/e.offsetHeight||1;return n!==1||r!==1}function hU(e,t,n){n===void 0&&(n=!1);var r=to(t),i=to(t)&&pU(t),o=Ya(t),s=Pu(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((cs(t)!=="body"||Bx(o))&&(a=fU(t)),to(t)?(l=Pu(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Ax(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 Tk={placement:"bottom",modifiers:[],strategy:"absolute"};function Ok(){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:h={},slots:m={},TransitionProps:g}=t,E=Ie(t,_U),b=C.useRef(null),x=un(b,n),y=C.useRef(null),_=un(y,f),k=C.useRef(_);ai(()=>{k.current=_},[_]),C.useImperativeHandle(f,()=>y.current,[]);const O=kU(u,s),[R,T]=C.useState(O),[$,L]=C.useState(h1(i));C.useEffect(()=>{y.current&&y.current.forceUpdate()}),C.useEffect(()=>{i&&L(h1(i))},[i]),ai(()=>{if(!$||!c)return;const Z=H=>{T(H.placement)};let oe=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:H})=>{Z(H)}}];l!=null&&(oe=oe.concat(l)),d&&d.modifiers!=null&&(oe=oe.concat(d.modifiers));const fe=xU($,b.current,D({placement:O},d,{modifiers:oe}));return k.current(fe),()=>{fe.destroy(),k.current(null)}},[$,a,l,c,d,O]);const M={placement:R};g!==null&&(M.TransitionProps=g);const F=RU(t),z=(r=m.root)!=null?r:"div",K=$o({elementType:z,externalSlotProps:h.root,externalForwardedProps:E,additionalProps:{role:"tooltip",ref:x},ownerState:t,className:F.root});return v.jsx(z,D({},K,{children:typeof o=="function"?o(M):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:h,style:m,transition:g=!1,slotProps:E={},slots:b={}}=t,x=Ie(t,CU),[y,_]=C.useState(!0),k=()=>{_(!1)},O=()=>{_(!0)};if(!l&&!u&&(!g||y))return null;let R;if(o)R=o;else if(r){const L=h1(r);R=L&&EU(L)?Yn(L).body:Yn(null).body}const T=!u&&l&&(!g||y)?"none":void 0,$=g?{in:u,onEnter:k,onExited:O}:void 0;return v.jsx(Px,{disablePortal:a,container:R,children:v.jsx(TU,D({anchorEl:r,direction:s,disablePortal:a,modifiers:c,ref:n,open:g?!y:u,placement:d,popperOptions:f,popperRef:h,slotProps:E,slots:b},x,{style:D({position:"fixed",top:0,left:0,display:T},m),TransitionProps:$,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:h,open:m,placement:g,popperOptions:E,popperRef:b,transition:x,slots:y,slotProps:_}=o,k=Ie(o,jU),O=(r=y==null?void 0:y.root)!=null?r:l==null?void 0:l.Root,R=D({anchorEl:s,container:u,disablePortal:d,keepMounted:f,modifiers:h,open:m,placement:g,popperOptions:E,popperRef:b,transition:x},k);return v.jsx(LU,D({as:a,direction:i==null?void 0:i.direction,slots:{root:O},slotProps:_??c},R,{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})=>D({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=D({},r,{color:o,component:s,disableGutters:a,disableSticky:l,inset:c}),f=NU(d);return v.jsx($U,D({as:s,className:Ae(f.root,i),ref:n,ownerState:d},u))});KO.muiSkipListHighlight=!0;const DU=zn(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 AU(e){return ft("MuiChip",e)}const Ut=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,AU,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[{[`& .${Ut.avatar}`]:t.avatar},{[`& .${Ut.avatar}`]:t[`avatar${we(a)}`]},{[`& .${Ut.avatar}`]:t[`avatarColor${we(r)}`]},{[`& .${Ut.icon}`]:t.icon},{[`& .${Ut.icon}`]:t[`icon${we(a)}`]},{[`& .${Ut.icon}`]:t[`iconColor${we(i)}`]},{[`& .${Ut.deleteIcon}`]:t.deleteIcon},{[`& .${Ut.deleteIcon}`]:t[`deleteIcon${we(a)}`]},{[`& .${Ut.deleteIcon}`]:t[`deleteIconColor${we(r)}`]},{[`& .${Ut.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 D({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",[`&.${Ut.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Ut.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${Ut.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Ut.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Ut.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Ut.icon}`]:D({marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&D({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},t.color!=="default"&&{color:"inherit"})),[`& .${Ut.deleteIcon}`]:D({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Dt(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)`:Dt(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)`:Dt(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&&{[`&.${Ut.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Dt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${Ut.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>D({},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}))`:Dt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Ut.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Dt(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, &.${Ut.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>D({},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]}`,[`&.${Ut.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Ut.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Ut.avatar}`]:{marginLeft:4},[`& .${Ut.avatarSmall}`]:{marginLeft:2},[`& .${Ut.icon}`]:{marginLeft:4},[`& .${Ut.iconSmall}`]:{marginLeft:2},[`& .${Ut.deleteIcon}`]:{marginRight:5},[`& .${Ut.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)`:Dt(e.palette[t.color].main,.7)}`,[`&.${Ut.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Dt(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${Ut.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Dt(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Ut.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Dt(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})=>D({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 jk(e){return e.key==="Backspace"||e.key==="Delete"}const Fx=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:h,onDelete:m,onKeyDown:g,onKeyUp:E,size:b="medium",variant:x="filled",tabIndex:y,skipFocusWhenDisabled:_=!1}=r,k=Ie(r,BU),O=C.useRef(null),R=un(O,n),T=V=>{V.stopPropagation(),m&&m(V)},$=V=>{V.currentTarget===V.target&&jk(V)&&V.preventDefault(),g&&g(V)},L=V=>{V.currentTarget===V.target&&(m&&jk(V)?m(V):V.key==="Escape"&&O.current&&O.current.blur()),E&&E(V)},M=s!==!1&&h?!0:s,F=M||m?Do:l||"div",z=D({},r,{component:F,disabled:u,size:b,color:a,iconColor:C.isValidElement(d)&&d.props.color||a,onDelete:!!m,clickable:M,variant:x}),K=FU(z),Z=F===Do?D({component:l||"div",focusVisibleClassName:K.focusVisible},m&&{disableRipple:!0}):{};let oe=null;m&&(oe=c&&C.isValidElement(c)?C.cloneElement(c,{className:Ae(c.props.className,K.deleteIcon),onClick:T}):v.jsx(DU,{className:Ae(K.deleteIcon),onClick:T}));let fe=null;i&&C.isValidElement(i)&&(fe=C.cloneElement(i,{className:Ae(K.avatar,i.props.className)}));let H=null;return d&&C.isValidElement(d)&&(H=C.cloneElement(d,{className:Ae(K.icon,d.props.className)})),v.jsxs(zU,D({as:F,className:Ae(K.root,o),disabled:M&&u?!0:void 0,onClick:h,onKeyDown:$,onKeyUp:L,ref:R,tabIndex:_&&u?-1:y,ownerState:z},Z,k,{children:[fe||H,v.jsx(UU,{className:Ae(K.label),ownerState:z,children:f}),oe]}))}),WU=["onChange","maxRows","minRows","style","value"];function mh(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),h=C.useRef(null),m=C.useCallback(()=>{const b=u.current,y=ls(b).getComputedStyle(b);if(y.width==="0px")return{outerHeightStyle:0,overflowing:!1};const _=h.current;_.style.width=y.width,_.value=b.value||t.placeholder||"x",_.value.slice(-1)===` +`&&(_.value+=" ");const k=y.boxSizing,O=mh(y.paddingBottom)+mh(y.paddingTop),R=mh(y.borderBottomWidth)+mh(y.borderTopWidth),T=_.scrollHeight;_.value="x";const $=_.scrollHeight;let L=T;o&&(L=Math.max(Number(o)*$,L)),i&&(L=Math.min(Number(i)*$,L)),L=Math.max(L,$);const M=L+(k==="border-box"?O+R:0),F=Math.abs(L-T)<=1;return{outerHeightStyle:M,overflowing:F}},[i,o,t.placeholder]),g=C.useCallback(()=>{const b=m();if(HU(b))return;const x=b.outerHeightStyle,y=u.current;f.current!==x&&(f.current=x,y.style.height=`${x}px`),y.style.overflow=b.overflowing?"hidden":""},[m]);ai(()=>{const b=()=>{g()};let x;const y=Sv(b),_=u.current,k=ls(_);k.addEventListener("resize",y);let O;return typeof ResizeObserver<"u"&&(O=new ResizeObserver(b),O.observe(_)),()=>{y.clear(),cancelAnimationFrame(x),k.removeEventListener("resize",y),O&&O.disconnect()}},[m,g]),ai(()=>{g()});const E=b=>{c||g(),r&&r(b)};return v.jsxs(C.Fragment,{children:[v.jsx("textarea",D({value:a,onChange:E,ref:d,rows:o,style:s},l)),v.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:h,tabIndex:-1,style:D({},GU.shadow,s,{paddingTop:0,paddingBottom:0})})]})});function rc({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 zx=C.createContext(void 0);function Qa(){return C.useContext(zx)}function qO(e){return v.jsx(w3,D({},e,{defaultTheme:xx,themeId:_u}))}function Lk(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Gm(e,t=!1){return e&&(Lk(e.value)&&e.value!==""||t&&Lk(e.defaultValue)&&e.defaultValue!=="")}function KU(e){return e.startAdornment}function qU(e){return ft("MuiInputBase",e)}const Ou=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"],$v=(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]},Dv=(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:h,type:m}=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",h&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",h&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return mt(g,qU,t)},Av=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:$v})(({theme:e,ownerState:t})=>D({},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",[`&.${Ou.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&D({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),Bv=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Dv})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=D({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 D({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] + .${Ou.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},[`&.${Ou.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:h,endAdornment:m,fullWidth:g=!1,id:E,inputComponent:b="input",inputProps:x={},inputRef:y,maxRows:_,minRows:k,multiline:O=!1,name:R,onBlur:T,onChange:$,onClick:L,onFocus:M,onKeyDown:F,onKeyUp:z,placeholder:K,readOnly:Z,renderSuffix:oe,rows:fe,slotProps:H={},slots:V={},startAdornment:le,type:Oe="text",value:Ue}=i,Te=Ie(i,YU),ke=x.value!=null?x.value:Ue,{current:qe}=C.useRef(ke!=null),Re=C.useRef(),tt=C.useCallback(et=>{},[]),at=un(Re,y,x.ref,tt),[Pe,Pt]=C.useState(!1),ct=Qa(),Ze=rc({props:i,muiFormControl:ct,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ze.focused=ct?ct.focused:Pe,C.useEffect(()=>{!ct&&f&&Pe&&(Pt(!1),T&&T())},[ct,f,Pe,T]);const ot=ct&&ct.onFilled,nt=ct&&ct.onEmpty,ee=C.useCallback(et=>{Gm(et)?ot&&ot():nt&&nt()},[ot,nt]);ai(()=>{qe&&ee({value:ke})},[ke,ee,qe]);const me=et=>{if(Ze.disabled){et.stopPropagation();return}M&&M(et),x.onFocus&&x.onFocus(et),ct&&ct.onFocus?ct.onFocus(et):Pt(!0)},_e=et=>{T&&T(et),x.onBlur&&x.onBlur(et),ct&&ct.onBlur?ct.onBlur(et):Pt(!1)},Be=(et,...je)=>{if(!qe){const Ye=et.target||Re.current;if(Ye==null)throw new Error(Hl(1));ee({value:Ye.value})}x.onChange&&x.onChange(et,...je),$&&$(et,...je)};C.useEffect(()=>{ee(Re.current)},[]);const W=et=>{Re.current&&et.currentTarget===et.target&&Re.current.focus(),L&&L(et)};let S=b,j=x;O&&S==="input"&&(fe?j=D({type:void 0,minRows:fe,maxRows:fe},j):j=D({type:void 0,maxRows:_,minRows:k},j),S=VU);const A=et=>{ee(et.animationName==="mui-auto-fill-cancel"?Re.current:{value:"x"})};C.useEffect(()=>{ct&&ct.setAdornedStart(!!le)},[ct,le]);const q=D({},i,{color:Ze.color||"primary",disabled:Ze.disabled,endAdornment:m,error:Ze.error,focused:Ze.focused,formControl:ct,fullWidth:g,hiddenLabel:Ze.hiddenLabel,multiline:O,size:Ze.size,startAdornment:le,type:Oe}),J=QU(q),pe=V.root||c.Root||Av,Fe=H.root||u.root||{},it=V.input||c.Input||Bv;return j=D({},j,(r=H.input)!=null?r:u.input),v.jsxs(C.Fragment,{children:[!h&&XU,v.jsxs(pe,D({},Fe,!ku(pe)&&{ownerState:D({},q,Fe.ownerState)},{ref:n,onClick:W},Te,{className:Ae(J.root,Fe.className,l,Z&&"MuiInputBase-readOnly"),children:[le,v.jsx(zx.Provider,{value:null,children:v.jsx(it,D({ownerState:q,"aria-invalid":Ze.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:d,disabled:Ze.disabled,id:E,onAnimationStart:A,name:R,placeholder:K,readOnly:Z,required:Ze.required,rows:fe,value:ke,onKeyDown:F,onKeyUp:z,type:Oe},j,!ku(it)&&{as:S,ownerState:D({},q,j.ownerState)},{ref:at,className:Ae(J.input,j.className,Z&&"MuiInputBase-readOnly"),onBlur:_e,onChange:Be,onFocus:me}))}),m,oe?oe(D({},Ze,{startAdornment:le})):null]}))]})}),Ux=JU;function ZU(e){return ft("MuiInput",e)}const Sd=D({},Ou,pt("MuiInput",["root","underline","input"]));function e9(e){return ft("MuiOutlinedInput",e)}const ca=D({},Ou,pt("MuiOutlinedInput",["root","notchedOutline","input"]));function t9(e){return ft("MuiFilledInput",e)}const cl=D({},Ou,pt("MuiFilledInput",["root","underline","input"])),n9=zn(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"],l0=10,c0=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:l0*2,lineHeight:1,padding:"0 6px",height:l0*2,borderRadius:l0,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:c0,height:c0*2,minWidth:c0*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:h={},componentsProps:m={},children:g,overlap:E="rectangular",color:b="default",invisible:x=!1,max:y=99,badgeContent:_,slots:k,slotProps:O,showZero:R=!1,variant:T="standard"}=c,$=Ie(c,o9),{badgeContent:L,invisible:M,max:F,displayValue:z}=r9({max:y,invisible:x,badgeContent:_,showZero:R}),K=bO({anchorOrigin:u,color:b,overlap:E,variant:T,badgeContent:_}),Z=M||L==null&&T!=="dot",{color:oe=b,overlap:fe=E,anchorOrigin:H=u,variant:V=T}=Z?K:c,le=V!=="dot"?z:void 0,Oe=D({},c,{badgeContent:L,invisible:Z,max:F,displayValue:le,showZero:R,anchorOrigin:H,color:oe,overlap:fe,variant:V}),Ue=s9(Oe),Te=(r=(i=k==null?void 0:k.root)!=null?i:h.Root)!=null?r:a9,ke=(o=(s=k==null?void 0:k.badge)!=null?s:h.Badge)!=null?o:l9,qe=(a=O==null?void 0:O.root)!=null?a:m.root,Re=(l=O==null?void 0:O.badge)!=null?l:m.badge,tt=$o({elementType:Te,externalSlotProps:qe,externalForwardedProps:$,additionalProps:{ref:n,as:f},ownerState:Oe,className:Ae(qe==null?void 0:qe.className,Ue.root,d)}),at=$o({elementType:ke,externalSlotProps:Re,ownerState:Oe,className:Ae(Ue.badge,Re==null?void 0:Re.className)});return v.jsxs(Te,D({},tt,{children:[g,v.jsx(ke,D({},at,{children:le}))]}))}),u9=pt("MuiBox",["root"]),d9=wx(),tn=S3({themeId:_u,defaultTheme:d9,defaultClassName:u9.root,generateClassName:gx.generate}),f9=zn(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(Do)(({theme:e})=>D({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":D({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":D({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:o1(e.palette.grey[200],.12)}:{backgroundColor:o1(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,D({focusRipple:!0},r,{ownerState:i,children:v.jsx(m9,D({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(Ct,{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 T=()=>{E(!0);const $=_.current.querySelector("a[href],button,[tabindex]");$&&$.focus()};return d+u>=R.length?R:[...R.slice(0,d),v.jsx(g9,{"aria-label":c,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:y},onClick:T},"ellipsis"),...R.slice(R.length-u,R.length)]},O=C.Children.toArray(i).filter(R=>C.isValidElement(R)).map((R,T)=>v.jsx("li",{className:x.li,children:R},`child-${T}`));return v.jsx(x9,D({ref:n,component:s,color:"text.secondary",className:Ae(x.root,o),ownerState:b},m,{children:v.jsx(S9,{className:x.ol,ref:_,ownerState:b,children:C9(g||f&&O.length<=f?O:k(O),x.separator,h,b)})}))});function k9(e){return ft("MuiButton",e)}const gh=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 D({},s,l)},XO=e=>D({},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(Do,{shouldForwardProp:e=>dr(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 D({},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":D({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Dt(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})`:Dt(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})`:Dt(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":D({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${gh.focusVisible}`]:D({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${gh.disabled}`]:D({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 ${Dt(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"},[`&.${gh.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${gh.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})=>D({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})=>D({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},XO(e))),vn=C.forwardRef(function(t,n){const r=C.useContext(YO),i=C.useContext(QO),o=Bf(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:h=!1,endIcon:m,focusVisibleClassName:g,fullWidth:E=!1,size:b="medium",startIcon:x,type:y,variant:_="text"}=s,k=Ie(s,E9),O=D({},s,{color:l,component:c,disabled:d,disableElevation:f,disableFocusRipple:h,fullWidth:E,size:b,type:y,variant:_}),R=R9(O),T=x&&v.jsx(T9,{className:R.startIcon,ownerState:O,children:x}),$=m&&v.jsx(O9,{className:R.endIcon,ownerState:O,children:m}),L=i||"";return v.jsxs(P9,D({ownerState:O,className:Ae(r.className,R.root,u,L),component:c,disabled:d,focusRipple:!h,focusVisibleClassName:Ae(R.focusVisible,g),ref:n,type:y},k,{classes:R,children:[T,a,$]}))});function j9(e){return ft("MuiButtonGroup",e)}const or=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[{[`& .${or.grouped}`]:t.grouped},{[`& .${or.grouped}`]:t[`grouped${we(n.orientation)}`]},{[`& .${or.grouped}`]:t[`grouped${we(n.variant)}`]},{[`& .${or.grouped}`]:t[`grouped${we(n.variant)}${we(n.orientation)}`]},{[`& .${or.grouped}`]:t[`grouped${we(n.variant)}${we(n.color)}`]},{[`& .${or.firstButton}`]:t.firstButton},{[`& .${or.lastButton}`]:t.lastButton},{[`& .${or.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})=>D({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"},{[`& .${or.grouped}`]:D({minWidth:40,"&:hover":D({},t.variant==="contained"&&{boxShadow:"none"})},t.variant==="contained"&&{boxShadow:"none"}),[`& .${or.firstButton},& .${or.middleButton}`]:D({},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)"}`,[`&.${or.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)"}`,[`&.${or.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)`:Dt(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]}`,[`&.${or.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]}`,[`&.${or.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":D({},t.variant==="outlined"&&t.orientation==="horizontal"&&{borderRightColor:"currentColor"},t.variant==="outlined"&&t.orientation==="vertical"&&{borderBottomColor:"currentColor"})}),[`& .${or.lastButton},& .${or.middleButton}`]:D({},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})})),Gf=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:h="horizontal",size:m="medium",variant:g="outlined"}=r,E=Ie(r,L9),b=D({},r,{color:s,component:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,orientation:h,size:m,variant:g}),x=M9(b),y=C.useMemo(()=>({className:x.grouped,color:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,size:m,variant:g}),[s,l,c,u,d,f,m,g,x.grouped]),_=F3(i),k=_.length,O=R=>{const T=R===0,$=R===k-1;return T&&$?"":T?x.firstButton:$?x.lastButton:x.middleButton};return v.jsx(N9,D({as:a,role:"group",className:Ae(x.root,o),ref:n,ownerState:b},E,{children:v.jsx(YO.Provider,{value:y,children:_.map((R,T)=>v.jsx(QO.Provider,{value:O(T),children:R},T))})}))});function $9(e){return ft("MuiCard",e)}pt("MuiCard",["root"]);const D9=["className","raised"],A9=e=>{const{classes:t}=e;return mt({root:["root"]},$9,t)},B9=Ee(fs,{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,D9),a=D({},r,{raised:o}),l=A9(a);return v.jsx(B9,D({className:Ae(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(Do)(({ownerState:e})=>D({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:dr})({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:h,inputRef:m,name:g,onBlur:E,onChange:b,onFocus:x,readOnly:y,required:_=!1,tabIndex:k,type:O,value:R}=t,T=Ie(t,z9),[$,L]=Cu({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),M=Qa(),F=V=>{x&&x(V),M&&M.onFocus&&M.onFocus(V)},z=V=>{E&&E(V),M&&M.onBlur&&M.onBlur(V)},K=V=>{if(V.nativeEvent.defaultPrevented)return;const le=V.target.checked;L(le),b&&b(V,le)};let Z=l;M&&typeof Z>"u"&&(Z=M.disabled);const oe=O==="checkbox"||O==="radio",fe=D({},t,{checked:$,disabled:Z,disableFocusRipple:c,edge:u}),H=U9(fe);return v.jsxs(W9,D({component:"span",className:Ae(H.root,s),centerRipple:!0,focusRipple:!c,disabled:Z,tabIndex:null,role:void 0,onFocus:F,onBlur:z,ownerState:fe,ref:n},T,{children:[v.jsx(G9,D({autoFocus:r,checked:i,defaultChecked:a,className:H.input,disabled:Z,id:oe?f:void 0,name:g,onChange:K,readOnly:y,ref:m,required:_,ownerState:fe,tabIndex:k,type:O},O==="checkbox"&&R===void 0?{}:{value:R},h)),$?o:d]}))}),H9=zn(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=zn(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=zn(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 u0=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 D({},t,s)},X9=Ee(ZO,{shouldForwardProp:e=>dr(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})=>D({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})`:Dt(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${u0.checked}, &.${u0.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${u0.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:h}=o,m=Ie(o,Y9),g=c?u:l,E=c?u:s,b=D({},o,{color:a,indeterminate:c,size:f}),x=Q9(b);return v.jsx(X9,D({type:"checkbox",inputProps:D({"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:Ae(x.root,h)},m,{classes:x}))});function Ik(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=Zi(m=>{const g=c.current;c.current=!1;const E=Yn(a.current);if(!l.current||!a.current||"clientX"in m&&tW(m,E))return;if(s.current){s.current=!1;return}let b;m.composedPath?b=m.composedPath().indexOf(a.current)>-1:b=!E.documentElement.contains(m.target)||a.current.contains(m.target),!b&&(n||!g)&&i(m)}),f=m=>g=>{c.current=!0;const E=t.props[m];E&&E(g)},h={ref:u};return o!==!1&&(h[o]=f(o)),C.useEffect(()=>{if(o!==!1){const m=Ik(o),g=Yn(a.current),E=()=>{s.current=!0};return g.addEventListener(m,d),g.addEventListener("touchmove",E),()=>{g.removeEventListener(m,d),g.removeEventListener("touchmove",E)}}},[d,o]),r!==!1&&(h[r]=f(r)),C.useEffect(()=>{if(r!==!1){const m=Ik(r),g=Yn(a.current);return g.addEventListener(m,d),()=>{g.removeEventListener(m,d)}}},[d,r]),v.jsx(C.Fragment,{children:C.cloneElement(t,h)})}const rW=(e,t)=>D({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),iW=e=>D({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=D({html:rW(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:D({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 d0=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(Cv,{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})=>D({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(fs,{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})=>D({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)`,[`&.${d0.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}`,[`&.${d0.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,[`&.${d0.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),hW=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiDialog"}),i=Bi(),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:h=!1,fullWidth:m=!1,maxWidth:g="sm",onBackdropClick:E,onClick:b,onClose:x,open:y,PaperComponent:_=fs,PaperProps:k={},scroll:O="paper",TransitionComponent:R=RO,transitionDuration:T=o,TransitionProps:$}=r,L=Ie(r,lW),M=D({},r,{disableEscapeKeyDown:f,fullScreen:h,fullWidth:m,maxWidth:g,scroll:O}),F=uW(M),z=C.useRef(),K=H=>{z.current=H.target===H.currentTarget},Z=H=>{b&&b(H),z.current&&(z.current=null,E&&E(H),x&&x(H,"backdropClick"))},oe=gp(a),fe=C.useMemo(()=>({titleId:oe}),[oe]);return v.jsx(dW,D({className:Ae(F.root,d),closeAfterTransition:!0,components:{Backdrop:cW},componentsProps:{backdrop:D({transitionDuration:T,as:l},c)},disableEscapeKeyDown:f,onClose:x,open:y,ref:n,onClick:Z,ownerState:M},L,{children:v.jsx(R,D({appear:!0,in:y,timeout:T,role:"presentation"},$,{children:v.jsx(fW,{className:Ae(F.container),onMouseDown:K,ownerState:M,children:v.jsx(pW,D({as:_,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":oe},k,{className:Ae(F.paper,k.className),ownerState:M,children:v.jsx(ej.Provider,{value:fe,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})=>D({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=D({},r,{dividers:o}),l=bW(a);return v.jsx(wW,D({className:Ae(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(Ct,{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,D({component:"h2",className:Ae(l.root,i),ownerState:a,ref:n,variant:"h6",id:o??c},s))});function EW(e){return ft("MuiFab",e)}const Mk=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 D({},r,s)},TW=Ee(Do,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>dr(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 D({},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"},[`&.${Mk.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})=>D({},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})=>({[`&.${Mk.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,h=Ie(r,RW),m=D({},r,{color:s,component:a,disabled:l,disableFocusRipple:c,size:d,variant:f}),g=PW(m);return v.jsx(TW,D({className:Ae(g.root,o),component:a,disabled:l,focusRipple:!c,focusVisibleClassName:Ae(g.focusVisible,u),ownerState:m,ref:n},h,{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 D({},t,i)},IW=Ee(Av,{shouldForwardProp:e=>dr(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...$v(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 D({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}},[`&.${cl.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${cl.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"},[`&.${cl.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${cl.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(.${cl.disabled}, .${cl.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${cl.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&D({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(Bv,{name:"MuiFilledInput",slot:"Input",overridesResolver:Dv})(({theme:e,ownerState:t})=>D({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})),Wx=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:h,slots:m={},type:g="text"}=a,E=Ie(a,jW),b=D({},a,{fullWidth:u,inputComponent:d,multiline:f,type:g}),x=LW(a),y={root:{ownerState:b},input:{ownerState:b}},_=h??c?Wr(y,h??c):y,k=(r=(i=m.root)!=null?i:l.Root)!=null?r:IW,O=(o=(s=m.input)!=null?s:l.Input)!=null?o:MW;return v.jsx(Ux,D({slots:{root:k,input:O},componentsProps:_,fullWidth:u,inputComponent:d,multiline:f,ref:n,type:g},E,{classes:x}))});Wx.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"],DW=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${we(n)}`,r&&"fullWidth"]};return mt(i,NW,t)},AW=Ee("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>D({},t.root,t[`margin${we(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>D({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%"})),bl=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:h="none",required:m=!1,size:g="medium",variant:E="outlined"}=r,b=Ie(r,$W),x=D({},r,{color:s,component:a,disabled:l,error:c,fullWidth:d,hiddenLabel:f,margin:h,required:m,size:g,variant:E}),y=DW(x),[_,k]=C.useState(()=>{let z=!1;return i&&C.Children.forEach(i,K=>{if(!Jd(K,["Input","Select"]))return;const Z=Jd(K,["Select"])?K.props.input:K;Z&&KU(Z.props)&&(z=!0)}),z}),[O,R]=C.useState(()=>{let z=!1;return i&&C.Children.forEach(i,K=>{Jd(K,["Input","Select"])&&(Gm(K.props,!0)||Gm(K.props.inputProps,!0))&&(z=!0)}),z}),[T,$]=C.useState(!1);l&&T&&$(!1);const L=u!==void 0&&!l?u:T;let M;const F=C.useMemo(()=>({adornedStart:_,setAdornedStart:k,color:s,disabled:l,error:c,filled:O,focused:L,fullWidth:d,hiddenLabel:f,size:g,onBlur:()=>{$(!1)},onEmpty:()=>{R(!1)},onFilled:()=>{R(!0)},onFocus:()=>{$(!0)},registerEffect:M,required:m,variant:E}),[_,s,l,c,O,L,d,f,M,m,g,E]);return v.jsx(zx.Provider,{value:F,children:v.jsx(AW,D({as:a,ownerState:x,className:Ae(y.root,o),ref:n},b,{children:i}))})}),Hm=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 Ad=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[{[`& .${Ad.label}`]:t.label},t.root,t[`labelPlacement${we(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>D({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Ad.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},{[`& .${Ad.label}`]:{[`&.${Ad.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),WW=Ee("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${Ad.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:h,slotProps:m={}}=o,g=Ie(o,FW),E=Qa(),b=(r=c??l.props.disabled)!=null?r:E==null?void 0:E.disabled,x=h??l.props.required,y={disabled:b,required:x};["checked","name","onChange","value","inputRef"].forEach($=>{typeof l.props[$]>"u"&&typeof o[$]<"u"&&(y[$]=o[$])});const _=rc({props:o,muiFormControl:E,states:["error"]}),k=D({},o,{disabled:b,labelPlacement:f,required:x,error:_.error}),O=zW(k),R=(i=m.typography)!=null?i:a.typography;let T=d;return T!=null&&T.type!==Ct&&!u&&(T=v.jsx(Ct,D({component:"span"},R,{className:Ae(O.label,R==null?void 0:R.className),children:T}))),v.jsxs(UW,D({className:Ae(O.root,s),ownerState:k,ref:n},g,{children:[C.cloneElement(l,y),x?v.jsxs(Hm,{display:"block",children:[T,v.jsxs(WW,{ownerState:k,"aria-hidden":!0,className:O.asterisk,children:[" ","*"]})]}):T]}))});function GW(e){return ft("MuiFormHelperText",e)}const Nk=pt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var $k;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})=>D({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Nk.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Nk.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=rc({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=D({},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,D({as:s,ownerState:u,className:Ae(d.root,o),ref:n},a,{children:i===" "?$k||($k=v.jsx("span",{className:"notranslate",children:"​"})):i}))});function YW(e){return ft("MuiFormLabel",e)}const rf=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)=>D({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>D({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${rf.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${rf.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${rf.error}`]:{color:(e.vars||e).palette.error.main}})),ZW=Ee("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${rf.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=rc({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=D({},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,D({as:s,ownerState:u,className:Ae(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 m1(e){return`scale(${e}, ${e**2})`}const nG={entering:{opacity:1,transform:m1(1)},entered:{opacity:1,transform:"none"}},f0=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Hf=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:h,style:m,timeout:g="auto",TransitionComponent:E=ho}=t,b=Ie(t,tG),x=Sa(),y=C.useRef(),_=Bi(),k=C.useRef(null),O=un(k,o.ref,n),R=Z=>oe=>{if(Z){const fe=k.current;oe===void 0?Z(fe):Z(fe,oe)}},T=R(u),$=R((Z,oe)=>{Tx(Z);const{duration:fe,delay:H,easing:V}=Ba({style:m,timeout:g,easing:s},{mode:"enter"});let le;g==="auto"?(le=_.transitions.getAutoHeightDuration(Z.clientHeight),y.current=le):le=fe,Z.style.transition=[_.transitions.create("opacity",{duration:le,delay:H}),_.transitions.create("transform",{duration:f0?le:le*.666,delay:H,easing:V})].join(","),l&&l(Z,oe)}),L=R(c),M=R(h),F=R(Z=>{const{duration:oe,delay:fe,easing:H}=Ba({style:m,timeout:g,easing:s},{mode:"exit"});let V;g==="auto"?(V=_.transitions.getAutoHeightDuration(Z.clientHeight),y.current=V):V=oe,Z.style.transition=[_.transitions.create("opacity",{duration:V,delay:fe}),_.transitions.create("transform",{duration:f0?V:V*.666,delay:f0?fe:fe||V*.333,easing:H})].join(","),Z.style.opacity=0,Z.style.transform=m1(.75),d&&d(Z)}),z=R(f),K=Z=>{g==="auto"&&x.start(y.current||0,Z),r&&r(k.current,Z)};return v.jsx(E,D({appear:i,in:a,nodeRef:k,onEnter:$,onEntered:L,onEntering:T,onExit:F,onExited:z,onExiting:M,addEndListener:K,timeout:g==="auto"?null:g},b,{children:(Z,oe)=>C.cloneElement(o,D({style:D({opacity:0,transform:m1(.75),visibility:Z==="exited"&&!a?"hidden":void 0},nG[Z],m,o.props.style),ref:O},oe))}))});Hf.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 D({},t,i)},oG=Ee(Av,{shouldForwardProp:e=>dr(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...$v(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})`),D({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"},[`&.${Sd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Sd.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(.${Sd.disabled}, .${Sd.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Sd.disabled}:before`]:{borderBottomStyle:"dotted"}})}),sG=Ee(Bv,{name:"MuiInput",slot:"Input",overridesResolver:Dv})({}),Gx=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:h=!1,slotProps:m,slots:g={},type:E="text"}=a,b=Ie(a,rG),x=iG(a),_={root:{ownerState:{disableUnderline:l}}},k=m??u?Wr(m??u,_):_,O=(r=(i=g.root)!=null?i:c.Root)!=null?r:oG,R=(o=(s=g.input)!=null?s:c.Input)!=null?o:sG;return v.jsx(Ux,D({slots:{root:O,input:R},slotProps:k,fullWidth:d,inputComponent:f,multiline:h,ref:n,type:E},b,{classes:x}))});Gx.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 D({},t,c)},uG=Ee(eG,{shouldForwardProp:e=>dr(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${rf.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})=>D({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"&&D({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&&D({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"&&D({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=rc({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),d=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,D({"data-shrink":c,ownerState:d,ref:n,className:Ae(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})=>D({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=D({},r,{alignItems:s.alignItems}),l=pG(a);return v.jsx(hG,D({className:Ae(l.root,i),ownerState:a,ref:n},o))}),gG=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function p0(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Ak(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 _d(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),h=C.useRef(null),m=C.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ai(()=>{i&&h.current.focus()},[i]),C.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(y,{direction:_})=>{const k=!h.current.style.width;if(y.clientHeight{const _=h.current,k=y.key,O=Yn(_).activeElement;if(k==="ArrowDown")y.preventDefault(),_d(_,O,c,l,p0);else if(k==="ArrowUp")y.preventDefault(),_d(_,O,c,l,Ak);else if(k==="Home")y.preventDefault(),_d(_,null,c,l,p0);else if(k==="End")y.preventDefault(),_d(_,null,c,l,Ak);else if(k.length===1){const R=m.current,T=k.toLowerCase(),$=performance.now();R.keys.length>0&&($-R.lastTime>500?(R.keys=[],R.repeating=!0,R.previousKeyMatched=!0):R.repeating&&T!==R.keys[0]&&(R.repeating=!1)),R.lastTime=$,R.keys.push(T);const L=O&&!R.repeating&&nj(O,R);R.previousKeyMatched&&(L||_d(_,O,!1,l,p0,R))?y.preventDefault():R.previousKeyMatched=!1}u&&u(y)},E=un(h,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 x=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(ef,D({role:"menu",ref:E,className:a,onKeyDown:g,tabIndex:i?0:-1},f,{children:x}))});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 Bk(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function Fk(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function zk(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function h0(e){return typeof e=="function"?e():e}const xG=e=>{const{classes:t}=e;return mt({root:["root"],paper:["paper"]},vG,t)},SG=Ee(Cv,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ij=Ee(fs,{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:h,container:m,elevation:g=8,marginThreshold:E=16,open:b,PaperProps:x={},slots:y,slotProps:_,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:O=Hf,transitionDuration:R="auto",TransitionProps:{onEntering:T}={},disableScrollLock:$=!1}=s,L=Ie(s.TransitionProps,yG),M=Ie(s,bG),F=(r=_==null?void 0:_.paper)!=null?r:x,z=C.useRef(),K=un(z,F.ref),Z=D({},s,{anchorOrigin:c,anchorReference:d,elevation:g,marginThreshold:E,externalPaperSlotProps:F,transformOrigin:k,TransitionComponent:O,transitionDuration:R,TransitionProps:L}),oe=xG(Z),fe=C.useCallback(()=>{if(d==="anchorPosition")return u;const ot=h0(l),ee=(ot&&ot.nodeType===1?ot:Yn(z.current).body).getBoundingClientRect();return{top:ee.top+Bk(ee,c.vertical),left:ee.left+Fk(ee,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),H=C.useCallback(ot=>({vertical:Bk(ot,k.vertical),horizontal:Fk(ot,k.horizontal)}),[k.horizontal,k.vertical]),V=C.useCallback(ot=>{const nt={width:ot.offsetWidth,height:ot.offsetHeight},ee=H(nt);if(d==="none")return{top:null,left:null,transformOrigin:zk(ee)};const me=fe();let _e=me.top-ee.vertical,Be=me.left-ee.horizontal;const W=_e+nt.height,S=Be+nt.width,j=ls(h0(l)),A=j.innerHeight-E,q=j.innerWidth-E;if(E!==null&&_eA){const J=W-A;_e-=J,ee.vertical+=J}if(E!==null&&Beq){const J=S-q;Be-=J,ee.horizontal+=J}return{top:`${Math.round(_e)}px`,left:`${Math.round(Be)}px`,transformOrigin:zk(ee)}},[l,d,fe,H,E]),[le,Oe]=C.useState(b),Ue=C.useCallback(()=>{const ot=z.current;if(!ot)return;const nt=V(ot);nt.top!==null&&(ot.style.top=nt.top),nt.left!==null&&(ot.style.left=nt.left),ot.style.transformOrigin=nt.transformOrigin,Oe(!0)},[V]);C.useEffect(()=>($&&window.addEventListener("scroll",Ue),()=>window.removeEventListener("scroll",Ue)),[l,$,Ue]);const Te=(ot,nt)=>{T&&T(ot,nt),Ue()},ke=()=>{Oe(!1)};C.useEffect(()=>{b&&Ue()}),C.useImperativeHandle(a,()=>b?{updatePosition:()=>{Ue()}}:null,[b,Ue]),C.useEffect(()=>{if(!b)return;const ot=Sv(()=>{Ue()}),nt=ls(l);return nt.addEventListener("resize",ot),()=>{ot.clear(),nt.removeEventListener("resize",ot)}},[l,b,Ue]);let qe=R;R==="auto"&&!O.muiSupportAuto&&(qe=void 0);const Re=m||(l?Yn(h0(l)).body:void 0),tt=(i=y==null?void 0:y.root)!=null?i:SG,at=(o=y==null?void 0:y.paper)!=null?o:ij,Pe=$o({elementType:at,externalSlotProps:D({},F,{style:le?F.style:D({},F.style,{opacity:0})}),additionalProps:{elevation:g,ref:K},ownerState:Z,className:Ae(oe.paper,F==null?void 0:F.className)}),Pt=$o({elementType:tt,externalSlotProps:(_==null?void 0:_.root)||{},externalForwardedProps:M,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:Re,open:b},ownerState:Z,className:Ae(oe.root,h)}),{slotProps:ct}=Pt,Ze=Ie(Pt,wG);return v.jsx(tt,D({},Ze,!ku(tt)&&{slotProps:ct,disableScrollLock:$},{children:v.jsx(O,D({appear:!0,in:b,onEntering:Te,onExited:ke,timeout:qe},L,{children:v.jsx(at,D({},Pe,{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=>dr(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}),Fv=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:h={},PopoverClasses:m,transitionDuration:g="auto",TransitionProps:{onEntering:E}={},variant:b="selectedMenu",slots:x={},slotProps:y={}}=o,_=Ie(o.TransitionProps,kG),k=Ie(o,EG),O=Cx(),R=D({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:E,PaperProps:h,transitionDuration:g,TransitionProps:_,variant:b}),T=TG(R),$=s&&!c&&f,L=C.useRef(null),M=(H,V)=>{L.current&&L.current.adjustStyleForScrollbar(H,{direction:O?"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=x.paper)!=null?r:jG,Z=(i=y.paper)!=null?i:h,oe=$o({elementType:x.root,externalSlotProps:y.root,ownerState:R,className:[T.root,l]}),fe=$o({elementType:K,externalSlotProps:Z,ownerState:R,className:T.paper});return v.jsx(OG,D({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:O?"right":"left"},transformOrigin:O?RG:PG,slots:{paper:K,root:x.root},slotProps:{root:oe,paper:fe},open:f,ref:n,transitionDuration:g,TransitionProps:D({onEntering:M},_),ownerState:R},k,{classes:m,children:v.jsx(LG,D({onKeyDown:F,actions:L,autoFocus:s&&(z===-1||c),autoFocusItem:$,variant:b},u,{className:Ae(T.list,u.className),children:a}))}))});function IG(e){return ft("MuiMenuItem",e)}const Cd=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 D({},s,l)},DG=Ee(Do,{shouldForwardProp:e=>dr(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:NG})(({theme:e,ownerState:t})=>D({},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"}},[`&.${Cd.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Dt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Cd.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Dt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Cd.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Dt(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})`:Dt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Cd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Cd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${yk.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${yk.inset}`]:{marginLeft:52},[`& .${Um.root}`]:{marginTop:0,marginBottom:0},[`& .${Um.inset}`]:{paddingLeft:36},[`& .${Dk.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&D({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Dk.root} svg`]:{fontSize:"1.25rem"}}))),Si=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,h=Ie(r,MG),m=C.useContext(jo),g=C.useMemo(()=>({dense:s||m.dense||!1,disableGutters:l}),[m.dense,s,l]),E=C.useRef(null);ai(()=>{i&&E.current&&E.current.focus()},[i]);const b=D({},r,{dense:g.dense,divider:a,disableGutters:l}),x=$G(r),y=un(E,n);let _;return r.disabled||(_=d!==void 0?d:-1),v.jsx(jo.Provider,{value:g,children:v.jsx(DG,D({ref:y,role:u,tabIndex:_,component:o,focusVisibleClassName:Ae(x.focusVisible,c),className:Ae(x.root,f)},h,{ownerState:b,classes:x}))})});function AG(e){return ft("MuiNativeSelect",e)}const Hx=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,AG,t)},oj=({ownerState:e,theme:t})=>D({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":D({},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"},[`&.${Hx.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:dr,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Hx.multiple}`]:t.multiple}]}})(oj),sj=({ownerState:e,theme:t})=>D({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${Hx.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=D({},t,{disabled:i,variant:l,error:o}),d=FG(u);return v.jsxs(C.Fragment,{children:[v.jsx(zG,D({ownerState:u,className:Ae(d.select,r),disabled:i,ref:a||n},c)),t.multiple?null:v.jsx(UG,{as:s,ownerState:u,className:d.icon})]})});var Uk;const GG=["children","classes","className","label","notched"],HG=Ee("fieldset",{shouldForwardProp:dr})({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:dr})(({ownerState:e,theme:t})=>D({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&&D({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=D({},e,{notched:r,withLabel:o});return v.jsx(HG,D({"aria-hidden":!0,className:t,ownerState:s},i,{children:v.jsx(VG,{ownerState:s,children:o?v.jsx("span",{children:n}):Uk||(Uk=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 D({},t,r)},QG=Ee(Av,{shouldForwardProp:e=>dr(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:$v})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return D({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&&D({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(Bv,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Dv})(({theme:e,ownerState:t})=>D({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})),Vx=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:h=!1,notched:m,slots:g={},type:E="text"}=l,b=Ie(l,qG),x=YG(l),y=Qa(),_=rc({props:l,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),k=D({},l,{color:_.color||"primary",disabled:_.disabled,error:_.error,focused:_.focused,formControl:y,fullWidth:u,hiddenLabel:_.hiddenLabel,multiline:h,size:_.size,type:E}),O=(r=(i=g.root)!=null?i:c.Root)!=null?r:QG,R=(o=(s=g.input)!=null?s:c.Input)!=null?o:JG;return v.jsx(Ux,D({slots:{root:O,input:R},renderSuffix:T=>v.jsx(XG,{ownerState:k,className:x.notchedOutline,label:f!=null&&f!==""&&_.required?a||(a=v.jsxs(C.Fragment,{children:[f," ","*"]})):f,notched:typeof m<"u"?m:!!(T.startAdornment||T.filled||T.focused)}),fullWidth:u,inputComponent:d,multiline:h,ref:n,type:E},b,{classes:D({},x,{notchedOutline:null})}))});Vx.muiName="Input";function ZG(e){return ft("MuiSelect",e)}const kd=pt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Wk;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[{[`&.${kd.select}`]:t.select},{[`&.${kd.select}`]:t[n.variant]},{[`&.${kd.error}`]:t.error},{[`&.${kd.multiple}`]:t.multiple}]}})(oj,{[`&.${kd.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 Gk(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:h,error:m=!1,IconComponent:g,inputRef:E,labelId:b,MenuProps:x={},multiple:y,name:_,onBlur:k,onChange:O,onClose:R,onFocus:T,onOpen:$,open:L,readOnly:M,renderValue:F,SelectDisplayProps:z={},tabIndex:K,value:Z,variant:oe="standard"}=t,fe=Ie(t,e7),[H,V]=Cu({controlled:Z,default:d,name:"Select"}),[le,Oe]=Cu({controlled:L,default:u,name:"Select"}),Ue=C.useRef(null),Te=C.useRef(null),[ke,qe]=C.useState(null),{current:Re}=C.useRef(L!=null),[tt,at]=C.useState(),Pe=un(n,E),Pt=C.useCallback(Xe=>{Te.current=Xe,Xe&&qe(Xe)},[]),ct=ke==null?void 0:ke.parentNode;C.useImperativeHandle(Pe,()=>({focus:()=>{Te.current.focus()},node:Ue.current,value:H}),[H]),C.useEffect(()=>{u&&le&&ke&&!Re&&(at(a?null:ct.clientWidth),Te.current.focus())},[ke,a]),C.useEffect(()=>{s&&Te.current.focus()},[s]),C.useEffect(()=>{if(!b)return;const Xe=Yn(Te.current).getElementById(b);if(Xe){const _t=()=>{getSelection().isCollapsed&&Te.current.focus()};return Xe.addEventListener("click",_t),()=>{Xe.removeEventListener("click",_t)}}},[b]);const Ze=(Xe,_t)=>{Xe?$&&$(_t):R&&R(_t),Re||(at(a?null:ct.clientWidth),Oe(Xe))},ot=Xe=>{Xe.button===0&&(Xe.preventDefault(),Te.current.focus(),Ze(!0,Xe))},nt=Xe=>{Ze(!1,Xe)},ee=C.Children.toArray(l),me=Xe=>{const _t=ee.find(Le=>Le.props.value===Xe.target.value);_t!==void 0&&(V(_t.props.value),O&&O(Xe,_t))},_e=Xe=>_t=>{let Le;if(_t.currentTarget.hasAttribute("tabindex")){if(y){Le=Array.isArray(H)?H.slice():[];const qt=H.indexOf(Xe.props.value);qt===-1?Le.push(Xe.props.value):Le.splice(qt,1)}else Le=Xe.props.value;if(Xe.props.onClick&&Xe.props.onClick(_t),H!==Le&&(V(Le),O)){const qt=_t.nativeEvent||_t,Tn=new qt.constructor(qt.type,qt);Object.defineProperty(Tn,"target",{writable:!0,value:{value:Le,name:_}}),O(Tn,Xe)}y||Ze(!1,_t)}},Be=Xe=>{M||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Xe.key)!==-1&&(Xe.preventDefault(),Ze(!0,Xe))},W=ke!==null&&le,S=Xe=>{!W&&k&&(Object.defineProperty(Xe,"target",{writable:!0,value:{value:H,name:_}}),k(Xe))};delete fe["aria-invalid"];let j,A;const q=[];let J=!1;(Gm({value:H})||h)&&(F?j=F(H):J=!0);const pe=ee.map(Xe=>{if(!C.isValidElement(Xe))return null;let _t;if(y){if(!Array.isArray(H))throw new Error(Hl(2));_t=H.some(Le=>Gk(Le,Xe.props.value)),_t&&J&&q.push(Xe.props.children)}else _t=Gk(H,Xe.props.value),_t&&J&&(A=Xe.props.children);return C.cloneElement(Xe,{"aria-selected":_t?"true":"false",onClick:_e(Xe),onKeyUp:Le=>{Le.key===" "&&Le.preventDefault(),Xe.props.onKeyUp&&Xe.props.onKeyUp(Le)},role:"option",selected:_t,value:void 0,"data-value":Xe.props.value})});J&&(y?q.length===0?j=null:j=q.reduce((Xe,_t,Le)=>(Xe.push(_t),Le{const{classes:t}=e;return t},Kx={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>dr(e)&&e!=="variant",slot:"Root"},u7=Ee(Gx,Kx)(""),d7=Ee(Vx,Kx)(""),f7=Ee(Wx,Kx)(""),El=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:h,label:m,labelId:g,MenuProps:E,multiple:b=!1,native:x=!1,onClose:y,onOpen:_,open:k,renderValue:O,SelectDisplayProps:R,variant:T="outlined"}=r,$=Ie(r,a7),L=x?WG:s7,M=Qa(),F=rc({props:r,muiFormControl:M,states:["variant","error"]}),z=F.variant||T,K=D({},r,{variant:z,classes:s}),Z=c7(K),oe=Ie(Z,l7),fe=f||{standard:v.jsx(u7,{ownerState:K}),outlined:v.jsx(d7,{label:m,ownerState:K}),filled:v.jsx(f7,{ownerState:K})}[z],H=un(n,fe.ref);return v.jsx(C.Fragment,{children:C.cloneElement(fe,D({inputComponent:L,inputProps:D({children:o,error:F.error,IconComponent:u,variant:z,type:void 0,multiple:b},x?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:E,onClose:y,onOpen:_,open:k,renderValue:O,SelectDisplayProps:D({id:d},R)},h,{classes:h?Wr(oe,h.classes):oe},f?f.props.inputProps:{})},(b&&x||c)&&z==="outlined"?{notched:!0}:{},{ref:H,className:Ae(fe.props.className,a,Z.root)},!f&&{variant:z},$))})});El.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(x){x.defaultPrevented||(x.key==="Escape"||x.key==="Esc")&&(r==null||r(x,"escapeKeyDown"))}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[i,r]);const a=Zi((b,x)=>{r==null||r(b,x)}),l=Zi(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=>x=>{const y=b.onBlur;y==null||y(x),d()},h=b=>x=>{const y=b.onFocus;y==null||y(x),u()},m=b=>x=>{const y=b.onMouseEnter;y==null||y(x),u()},g=b=>x=>{const y=b.onMouseLeave;y==null||y(x),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 x=D({},Fm(e),Fm(b));return D({role:"presentation"},b,x,{onBlur:f(x),onFocus:h(x),onMouseEnter:m(x),onMouseLeave:g(x)})},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(fs,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=o1(e.palette.background.default,t);return D({},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,D({role:a,square:!0,elevation:6,className:Ae(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)},Hk=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 D({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")]:D({},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=Bi(),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:h,disableWindowBlurListener:m=!1,message:g,open:E,TransitionComponent:b=Hf,transitionDuration:x=o,TransitionProps:{onEnter:y,onExited:_}={}}=r,k=Ie(r.TransitionProps,S7),O=Ie(r,_7),R=D({},r,{anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:c,disableWindowBlurListener:m,TransitionComponent:b,transitionDuration:x}),T=C7(R),{getRootProps:$,onClickAway:L}=p7(D({},R)),[M,F]=C.useState(!0),z=$o({elementType:Hk,getSlotProps:$,externalForwardedProps:O,ownerState:R,additionalProps:{ref:n},className:[T.root,d]}),K=oe=>{F(!0),_&&_(oe)},Z=(oe,fe)=>{F(!1),y&&y(oe,fe)};return!E&&M?null:v.jsx(nW,D({onClickAway:L},f,{children:v.jsx(Hk,D({},z,{children:v.jsx(b,D({appear:!0,in:E,timeout:x,direction:a==="top"?"down":"up",onEnter:Z,onExited:K},k,{children:u||v.jsx(w7,D({message:g,action:s},h))}))}))}))});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})=>D({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}`]:D({},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}`]:D({},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})=>D({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Dt(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"] &`]:D({transformOrigin:"right center"},t.isRtl?D({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):D({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${_a.popper}[data-popper-placement*="right"] &`]:D({transformOrigin:"left center"},t.isRtl?D({marginRight:"14px"},t.touch&&{marginRight:"24px"}):D({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${_a.popper}[data-popper-placement*="top"] &`]:D({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${_a.popper}[data-popper-placement*="bottom"] &`]:D({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:Dt(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let vh=!1;const Vk=new mp;let Ed={x:0,y:0};function yh(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Xh=C.forwardRef(function(t,n){var r,i,o,s,a,l,c,u,d,f,h,m,g,E,b,x,y,_,k;const O=gt({props:t,name:"MuiTooltip"}),{arrow:R=!1,children:T,components:$={},componentsProps:L={},describeChild:M=!1,disableFocusListener:F=!1,disableHoverListener:z=!1,disableInteractive:K=!1,disableTouchListener:Z=!1,enterDelay:oe=100,enterNextDelay:fe=0,enterTouchDelay:H=700,followCursor:V=!1,id:le,leaveDelay:Oe=0,leaveTouchDelay:Ue=1500,onClose:Te,onOpen:ke,open:qe,placement:Re="bottom",PopperComponent:tt,PopperProps:at={},slotProps:Pe={},slots:Pt={},title:ct,TransitionComponent:Ze=Hf,TransitionProps:ot}=O,nt=Ie(O,R7),ee=C.isValidElement(T)?T:v.jsx("span",{children:T}),me=Bi(),_e=Cx(),[Be,W]=C.useState(),[S,j]=C.useState(null),A=C.useRef(!1),q=K||V,J=Sa(),pe=Sa(),Fe=Sa(),it=Sa(),[et,je]=Cu({controlled:qe,default:!1,name:"Tooltip",state:"open"});let Ye=et;const kt=gp(le),Kt=C.useRef(),Xe=Zi(()=>{Kt.current!==void 0&&(document.body.style.WebkitUserSelect=Kt.current,Kt.current=void 0),it.clear()});C.useEffect(()=>Xe,[Xe]);const _t=Je=>{Vk.clear(),vh=!0,je(!0),ke&&!Ye&&ke(Je)},Le=Zi(Je=>{Vk.start(800+Oe,()=>{vh=!1}),je(!1),Te&&Ye&&Te(Je),J.start(me.transitions.duration.shortest,()=>{A.current=!1})}),qt=Je=>{A.current&&Je.type!=="touchstart"||(Be&&Be.removeAttribute("title"),pe.clear(),Fe.clear(),oe||vh&&fe?pe.start(vh?fe:oe,()=>{_t(Je)}):_t(Je))},Tn=Je=>{pe.clear(),Fe.start(Oe,()=>{Le(Je)})},{isFocusVisibleRef:pr,onBlur:We,onFocus:Wi,ref:ui}=wv(),[,kr]=C.useState(!1),vo=Je=>{We(Je),pr.current===!1&&(kr(!1),Tn(Je))},di=Je=>{Be||W(Je.currentTarget),Wi(Je),pr.current===!0&&(kr(!0),qt(Je))},zo=Je=>{A.current=!0;const St=ee.props;St.onTouchStart&&St.onTouchStart(Je)},tl=Je=>{zo(Je),Fe.clear(),J.clear(),Xe(),Kt.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",it.start(H,()=>{document.body.style.WebkitUserSelect=Kt.current,qt(Je)})},fi=Je=>{ee.props.onTouchEnd&&ee.props.onTouchEnd(Je),Xe(),Fe.start(Ue,()=>{Le(Je)})};C.useEffect(()=>{if(!Ye)return;function Je(St){(St.key==="Escape"||St.key==="Esc")&&Le(St)}return document.addEventListener("keydown",Je),()=>{document.removeEventListener("keydown",Je)}},[Le,Ye]);const pi=un(ee.ref,ui,W,n);!ct&&ct!==0&&(Ye=!1);const hi=C.useRef(),Un=Je=>{const St=ee.props;St.onMouseMove&&St.onMouseMove(Je),Ed={x:Je.clientX,y:Je.clientY},hi.current&&hi.current.update()},At={},on=typeof ct=="string";M?(At.title=!Ye&&on&&!z?ct:null,At["aria-describedby"]=Ye?kt:null):(At["aria-label"]=on?ct:null,At["aria-labelledby"]=Ye&&!on?kt:null);const nr=D({},At,nt,ee.props,{className:Ae(nt.className,ee.props.className),onTouchStart:zo,ref:pi},V?{onMouseMove:Un}:{}),qr={};Z||(nr.onTouchStart=tl,nr.onTouchEnd=fi),z||(nr.onMouseOver=yh(qt,nr.onMouseOver),nr.onMouseLeave=yh(Tn,nr.onMouseLeave),q||(qr.onMouseOver=qt,qr.onMouseLeave=Tn)),F||(nr.onFocus=yh(di,nr.onFocus),nr.onBlur=yh(vo,nr.onBlur),q||(qr.onFocus=di,qr.onBlur=vo));const Q=C.useMemo(()=>{var Je;let St=[{name:"arrow",enabled:!!S,options:{element:S,padding:4}}];return(Je=at.popperOptions)!=null&&Je.modifiers&&(St=St.concat(at.popperOptions.modifiers)),D({},at.popperOptions,{modifiers:St})},[S,at]),te=D({},O,{isRtl:_e,arrow:R,disableInteractive:q,placement:Re,PopperComponentProp:tt,touch:A.current}),ge=T7(te),xe=(r=(i=Pt.popper)!=null?i:$.Popper)!=null?r:O7,He=(o=(s=(a=Pt.transition)!=null?a:$.Transition)!=null?s:Ze)!=null?o:Hf,Qe=(l=(c=Pt.tooltip)!=null?c:$.Tooltip)!=null?l:j7,ht=(u=(d=Pt.arrow)!=null?d:$.Arrow)!=null?u:L7,ze=Xc(xe,D({},at,(f=Pe.popper)!=null?f:L.popper,{className:Ae(ge.popper,at==null?void 0:at.className,(h=(m=Pe.popper)!=null?m:L.popper)==null?void 0:h.className)}),te),yt=Xc(He,D({},ot,(g=Pe.transition)!=null?g:L.transition),te),dt=Xc(Qe,D({},(E=Pe.tooltip)!=null?E:L.tooltip,{className:Ae(ge.tooltip,(b=(x=Pe.tooltip)!=null?x:L.tooltip)==null?void 0:b.className)}),te),bt=Xc(ht,D({},(y=Pe.arrow)!=null?y:L.arrow,{className:Ae(ge.arrow,(_=(k=Pe.arrow)!=null?k:L.arrow)==null?void 0:_.className)}),te);return v.jsxs(C.Fragment,{children:[C.cloneElement(ee,nr),v.jsx(xe,D({as:tt??VO,placement:Re,anchorEl:V?{getBoundingClientRect:()=>({top:Ed.y,left:Ed.x,right:Ed.x,bottom:Ed.y,width:0,height:0})}:Be,popperRef:hi,open:Be?Ye:!1,id:kt,transition:!0},qr,ze,{popperOptions:Q,children:({TransitionProps:Je})=>v.jsx(He,D({timeout:me.transitions.duration.shorter},Je,yt,{children:v.jsxs(Qe,D({},dt,{children:[ct,R?v.jsx(ht,D({},bt,{ref:j})):null]}))}))}))]})});function I7(e){return ft("MuiSwitch",e)}const Br=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 D({},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,[`& .${Br.thumb}`]:{width:16,height:16},[`& .${Br.switchBase}`]:{padding:4,[`&.${Br.checked}`]:{transform:"translateX(16px)"}}}}]}),D7=Ee(ZO,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Br.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}),[`&.${Br.checked}`]:{transform:"translateX(20px)"},[`&.${Br.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Br.checked} + .${Br.track}`]:{opacity:.5},[`&.${Br.disabled} + .${Br.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Br.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Dt(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:{[`&.${Br.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Dt(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Br.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?Dm(e.palette[t].main,.62):$m(e.palette[t].main,.55)}`}},[`&.${Br.checked} + .${Br.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),A7=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=D({},r,{color:o,edge:s,size:a}),d=N7(u),f=v.jsx(B7,{className:d.thumb,ownerState:u});return v.jsxs($7,{className:Ae(d.root,i),sx:l,ownerState:u,children:[v.jsx(D7,D({type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:u},c,{classes:D({},d,{root:d.switchBase})})),v.jsx(A7,{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:Gx,filled:Wx,outlined:Vx},G7=e=>{const{classes:t}=e;return mt({root:["root"]},z7,t)},H7=Ee(bl,{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:h=!1,helperText:m,id:g,InputLabelProps:E,inputProps:b,InputProps:x,inputRef:y,label:_,maxRows:k,minRows:O,multiline:R=!1,name:T,onBlur:$,onChange:L,onFocus:M,placeholder:F,required:z=!1,rows:K,select:Z=!1,SelectProps:oe,type:fe,value:H,variant:V="outlined"}=r,le=Ie(r,U7),Oe=D({},r,{autoFocus:o,color:l,disabled:u,error:d,fullWidth:h,multiline:R,required:z,select:Z,variant:V}),Ue=G7(Oe),Te={};V==="outlined"&&(E&&typeof E.shrink<"u"&&(Te.notched=E.shrink),Te.label=_),Z&&((!oe||!oe.native)&&(Te.id=void 0),Te["aria-describedby"]=void 0);const ke=gp(g),qe=m&&ke?`${ke}-helper-text`:void 0,Re=_&&ke?`${ke}-label`:void 0,tt=W7[V],at=v.jsx(tt,D({"aria-describedby":qe,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:h,multiline:R,name:T,rows:K,maxRows:k,minRows:O,type:fe,value:H,id:ke,inputRef:y,onBlur:$,onChange:L,onFocus:M,placeholder:F,inputProps:b},Te,x));return v.jsxs(H7,D({className:Ae(Ue.root,a),disabled:u,error:d,fullWidth:h,ref:n,required:z,color:l,variant:V,ownerState:Oe},le,{children:[_!=null&&_!==""&&v.jsx(tj,D({htmlFor:ke,id:Re},E,{children:_})),Z?v.jsx(El,D({"aria-describedby":qe,id:ke,labelId:Re,value:H,input:at},oe,{children:s})):at,m&&v.jsx(qW,D({id:qe},f,{children:m}))]}))});function K7(e,t){for(var n=0;nr[e]:r=>{for(var i=r,o=0;o"u")return i}return i}}function nn(e){return Object.assign({},e)}function J7(e){return Object.keys(e)[0]}function Vm(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=>Vm(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]=Vm(e[r],t)}),n}return e}function g1(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]=g1(e[n]);return t}var r={};for(var i in e)r[i]=g1(e[i]);return r}var lo=g1;function Ns(e,t,n){return Object.defineProperty(e,t,{get:function(){return n}}),n}var Yx=1;function Vu(){return{lwt:Yx}}function Ao(){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 Ia([...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 Ia(n,t)}},rH={parse(e){return nH.parse(unescape(encodeURIComponent(e)))}};class iH{constructor(){this._data=new Ia,this._nDataBytes=0,this._minBufferSize=0,this.blockSize=512/32}reset(){this._data=new Ia,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=ul[f-2],O=(k<<15|k>>>17)^(k<<13|k>>>19)^k>>>10;ul[f]=_+ul[f-7]+O+ul[f-16]}const h=l&c^~l&u,m=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+h+sH[f]+ul[f],x=g+m;d=u,u=c,c=l,l=a+b|0,a=s,s=o,o=i,i=b+x|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 zv=Promise.resolve(!0),ts=Promise.resolve(!1),hH=Promise.resolve(null),Pi=Promise.resolve();function Uv(e=1e4){return typeof requestIdleCallback=="function"?new Promise(t=>{requestIdleCallback(()=>t(),{timeout:e})}):cj(0)}var g0=Pi;function mH(e=void 0){return g0=g0.then(()=>Uv(e)),g0}function gH(e,t){return e.reduce((n,r)=>n.then(r),Promise.resolve(t))}var vH=/\./g,qk="abcdefghijklmnopqrstuvwxyz";function ic(e=10){for(var t="",n=0;n{var t=typeof e;return e!==null&&(t==="object"||t==="function")},v0=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(v0.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(v0.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(v0.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 za(e,t,n){if(Array.isArray(t)&&(t=t.join(".")),!t.includes(".")&&!t.includes("["))return e[t];if(!v1(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 ln(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 Yk(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 y0=0;function lr(){var e=Date.now();e=e+.01,e<=y0&&(e=y0+.01);var t=parseFloat(e.toFixed(2));return y0=t,t}function xt(e,t){if(!e)throw t||(t=""),new Error("ensureNotFalsy() is falsy: "+t);return e}var Qx={bufferSize:1,refCount:!0},hj="15.32.0",b0={},wH="6da4936d1425ff3a5c44c02342c6daf791d266be3ae8479b8ec59e261df41b93";function y1(e){return y1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y1(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&&zf(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,y1(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),zf(i,r)},qm(e)}var yn={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 _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 gj(e,t,n){return"RxError ("+t+`): +`+e+` +`+_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=Xx(r),s.parameters=o,s.rxdb=!0,s}vp(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=Xx(r),s.parameters=o,s.rxdb=!0,s}vp(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 Xx(e){return"https://rxdb.info/errors.html?console=errors#"+e}function vj(e){return` + You can find out more about this error here: `+Xx(e)+" "}function st(e,t){return new CH(e,yn.tunnelErrorMessage(e)+vj(e),t)}function ki(e,t){return new kH(e,yn.tunnelErrorMessage(e)+vj(e),t)}function Wv(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 st("COL20",{name:EH[e.status],document:e.documentId,writeError:e})}var Kf={preAddRxPlugin:[],preCreateRxDatabase:[],createRxDatabase:[],preCreateRxCollection:[],createRxCollection:[],createRxState:[],postDestroyRxCollection:[],postRemoveRxCollection:[],preCreateRxSchema:[],createRxSchema:[],preCreateRxQuery:[],prePrepareQuery:[],createRxDocument:[],postCreateRxDocument:[],preCreateRxStorageInstance:[],preStorageWrite:[],preMigrateDocument:[],postMigrateDocument:[],preDestroyRxDatabase:[],postRemoveRxDatabase:[],postCleanup:[],preReplicationMasterWrite:[],preReplicationMasterWriteDocumentsHandle:[]};function co(e,t){Kf[e].length>0&&Kf[e].forEach(n=>n(t))}function Hs(e,t){return Promise.all(Kf[e].map(n=>n(t)))}function ju(e,t){var n=t;n=n.replace(vH,".properties."),n="properties."+n,n=Bd(n);var r=za(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 st("DOC19",{args:{documentData:n,existingPrimary:i,newPrimary:r},schema:t});return n[e]=r,n}function Fi(e){return typeof e=="string"?e:e.key}function TH(e){var t=Fi(e.primaryKey),n=ju(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=za(t,r);if(typeof i>"u")throw st("DOC18",{args:{field:r,documentData:t}});return i}).join(n.separator)}function OH(e){var t=Vm(e,!0);return t}function jH(e){return["_deleted",e]}function Gv(e){e=nn(e);var t=Fi(e.primaryKey);e.properties=nn(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);ql(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:Yx,maximum:1e15,multipleOf:.01}},additionalProperties:!0,required:["lwt"]};function yj(e){var t=Object.keys(e.properties).filter(r=>e.properties[r].final),n=Fi(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=Fi(this.jsonSchema.primaryKey),this.finalFields=yj(this.jsonSchema)}var t=e.prototype;return t.validateChange=function(r,i){this.finalFields.forEach(o=>{if(!Km(r[o],i[o]))throw st("DOC9",{dataBefore:r,dataAfter:i,fieldName:o,schema:this.jsonSchema})})},t.getDocumentPrototype=function(){var r={},i=ju(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&&co("preCreateRxSchema",e);var r=Gv(e);r=OH(r),yn.deepFreezeWhenDevMode(r);var i=new bj(r,t);return co("createRxSchema",i),i}function Ln(e){return typeof e=="function"}function $H(e){return Ln(e==null?void 0:e.lift)}function ea(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 b1=function(e,t){return b1=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])},b1(e,t)};function oc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");b1(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function DH(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 Yl(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 Ql(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r1||l(h,g)})},m&&(i[h]=m(i[h])))}function l(h,m){try{c(r[h](m))}catch(g){f(o[0][3],g)}}function c(h){h.value instanceof au?Promise.resolve(h.value.v).then(u,d):f(o[0][2],h)}function u(h){l("next",h)}function d(h){l("throw",h)}function f(h,m){h(m),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 Lu=="function"?Lu(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 Ln(e==null?void 0:e.then)}function Jx(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 w0=Jx(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 w1(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Hv=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=Lu(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(Ln(u))try{u()}catch(g){o=g instanceof w0?g.errors:[g]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=Lu(d),h=f.next();!h.done;h=f.next()){var m=h.value;try{Qk(m)}catch(g){o=o??[],g instanceof w0?o=Ql(Ql([],Yl(o)),Yl(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new w0(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Qk(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)&&w1(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&w1(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),_j=Hv.EMPTY;function Cj(e){return e instanceof Hv||e&&"closed"in e&&Ln(e.remove)&&Ln(e.add)&&Ln(e.unsubscribe)}function Qk(e){Ln(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 Hv(function(){r.currentObservers=null,w1(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 li;return n.source=this,n},t.create=function(n,r){return new eE(n,r)},t}(li),eE=function(e){oc(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}(Pn);function tE(){for(var e=[],t=0;t0&&(u=new Iu({next:function(O){return k.next(O)},error:function(O){g=!0,E(),d=S0(b,i,O),k.error(O)},complete:function(){m=!0,E(),d=S0(b,s),k.complete()}}),el(y).subscribe(u))})(c)}}function S0(e,t){for(var n=[],r=2;r!!e.queryParams.limit,DV=e=>e.queryParams.limit===1,AV=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=iS(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=iS(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=iS(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:DV,5:AV,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=>{},oS=e=>{e.previousResults.unshift(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},sS=e=>{e.previousResults.push(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},aS=e=>{const t=e.previousResults.shift();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},lS=e=>{const t=e.previousResults.pop();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},rK=e=>{aS(e),sS(e)},iK=e=>{lS(e),oS(e)},oK=e=>{aS(e),oS(e)},sK=e=>{lS(e),sS(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:oS,insertLast:sS,removeFirstItem:aS,removeLastItem:lS,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 _0(e){return e.charCodeAt(0)-hK}function mK(e){return e?"1":"0"}function rE(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 lu="￿",cu=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=ju(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,h=u.map(x=>{var y=n[x],_=y?Object.keys(y):[],k={};if(!y||!_.length){var O=f?cu:lu;k={startKey:O,endKey:d?lu:cu,inclusiveStart:!0,inclusiveEnd:!0}}else _.forEach(R=>{if(cS.has(R)){var T=y[R],$=RK(R,T);k=Object.assign(k,$)}});return typeof k.startKey>"u"&&(k.startKey=cu),typeof k.endKey>"u"&&(k.endKey=lu),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}),m=h.map(x=>x.startKey),g=h.map(x=>x.endKey),E={index:u,startKeys:m,endKeys:g,inclusiveEnd:d,inclusiveStart:f,sortSatisfiedByIndex:!i&&a===u.filter(x=>!o.has(x)).join(","),selectorSatisfiedByIndex:EK(u,t.selector,m,g)},b=PK(e,t,E);(b>=l||t.index)&&(l=b,c=E)}),!c)throw st("SNH",{query:t});return c}var cS=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(([R,T])=>{if(!e.includes(R))return!0;var $=Object.entries(T).find(([L,M])=>!cS.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(R=>CK.has(R));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=[],h=new Set;for(var[m,g]of Object.entries(t)){if(!e.includes(m))return!1;var E=Object.keys(g).filter(R=>kK.has(R));if(E.length>1)return!1;var b=E[0];if(b&&h.add(m),b!=="$eq"){if(f.length>0)return!1;f.push(b)}}var x=0;for(var y of e){for(var _ of[a,h]){if(!_.has(y)&&_.size>0)return!1;_.delete(y)}var k=n[x],O=r[x];if(k!==O&&a.size>0&&h.size>0)return!1;x++}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=m0(n.startKeys,u=>u!==cu&&u!==lu);i(s*o);var a=m0(n.startKeys,u=>u!==lu&&u!==cu);i(a*o);var l=m0(n.startKeys,(u,d)=>u===n.endKeys[d]);i(l*o*1.5);var c=n.sortSatisfiedByIndex?5:0;return i(c),r}class Ku extends Error{}const TK=2147483647,OK=-2147483648,jK=Number.MAX_SAFE_INTEGER,LK=Number.MIN_SAFE_INTEGER,Jl=Symbol("missing"),Vj=Object.freeze(new Error("mingo: cycle detected while processing object/array")),IK="[object Object]",MK=/^\[object ([a-zA-Z0-9]+)\]$/,Kv=e=>{const t=FK(e);let n=0,r=t.length;for(;r;)n=(n<<5)-n^t.charCodeAt(--r);return n>>>0},Kj=new Set(["null","undefined","boolean","number","string","date","regexp"]),NK={null:0,undefined:0,number:1,string:2,object:3,array:4,boolean:5,date:6,regexp:7,function:8},Bo=(e,t)=>{e===Jl&&(e=void 0),t===Jl&&(t=void 0);const[n,r]=[e,t].map(i=>NK[Yf(i).toLowerCase()]);return n!==r?n-r:n===1||n===2||n===6?et?1:0:Ua(e,t)?0:et?1:0};function no(e,t){if(!e)throw new Ku(t)}const Yf=e=>MK.exec(Object.prototype.toString.call(e))[1],k0=e=>typeof e=="boolean",Vs=e=>typeof e=="string",ba=e=>!isNaN(e)&&typeof e=="number",Cr=Array.isArray,Qn=e=>{if(!e)return!1;const t=Object.getPrototypeOf(e);return(t===Object.prototype||t===null)&&IK===Object.prototype.toString.call(e)},qv=e=>e===Object(e),x1=e=>e instanceof Date,of=e=>e instanceof RegExp,qj=e=>typeof e=="function",ur=e=>e==null,Mu=(e,t)=>e.includes(t),Yj=(e,t)=>!Mu(e,t),$K=(e,t=!0)=>!!e||t&&e==="",qu=e=>ur(e)||Vs(e)&&!e||e instanceof Array&&e.length===0||Qn(e)&&Object.keys(e).length===0,iE=e=>e===Jl,_p=e=>e instanceof Array?e:[e],Na=(e,t)=>!!e&&Object.prototype.hasOwnProperty.call(e,t),uS=e=>typeof ArrayBuffer<"u"&&ArrayBuffer.isView(e),DK=[x1,of,uS],S1=(e,t)=>{if(ur(e))return e;if(t.has(e))throw Vj;const n=e.constructor;if(DK.some(r=>r(e)))return new n(e);try{if(t.add(e),Cr(e))return e.map(r=>S1(r,t));if(Qn(e)){const r={};for(const i in e)r[i]=S1(e[i],t);return r}}finally{t.delete(e)}return e},oE=e=>S1(e,new Set),AK=(e,t)=>Qn(e)&&Qn(t)||Cr(e)&&Cr(t);function _1(e,t,n){if(n=n||{flatten:!1},iE(e)||ur(e))return t;if(iE(t)||ur(t))return e;if(!AK(e,t)){if(n.skipValidation)return t||e;throw Error("mismatched types. must both be array or object")}if(n.skipValidation=!0,Cr(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=>Ua(e[s],r))||n.get(o).push(i):n.set(o,[i])}),n}function Qj(e,t=Kv){if(e.some(a=>a.length==0))return[];if(e.length===1)return Array.from(e);const n=zK(e.map((a,l)=>[l,a.length]),a=>a[1]),r=e[n[0][0]],i=sE(r,t),o=new Map,s=new Array;return i.forEach((a,l)=>{const c=a.map(h=>r[h]),u=c.map(h=>0),d=c.map(h=>[n[0][0],0]);let f=!1;for(let h=1;hE[x]);f=c.map((x,y)=>b.some((_,k)=>{const O=u[y];return Ua(x,_)&&(u[y]++,mh===e.length-1?[c[m],d[m]]:Jl).filter(h=>h!==Jl))}),s.sort((a,l)=>{const[c,[u,d]]=a,[f,[h,m]]=l,g=Bo(u,h);return g!==0?g:Bo(d,m)}).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 BK=e=>{let[t,n]=[Object.getPrototypeOf(e),Object.getOwnPropertyNames(e)],r=t;for(;!n.length&&t!==Object.prototype&&t!==Array.prototype;)r=t,n=Object.getOwnPropertyNames(t),t=Object.getPrototypeOf(t);const i={};return n.forEach(o=>i[o]=e[o]),[i,r]};function Ua(e,t){if(e===t||Object.is(e,t))return!0;const n=!!e&&e.constructor||e;if(e===null||t===null||e===void 0||t===void 0||n!==t.constructor||n===Function)return!1;if(n===Array||n===Object){const o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length||new Set([...o,...s]).size!=o.length)return!1;for(const a of o)if(!Ua(e[a],t[a]))return!1;return!0}const r=Object.getPrototypeOf(e);return(uS(e)||r!==Object.prototype&&r!==Array.prototype&&Object.prototype.hasOwnProperty.call(r,"toString"))&&e.toString()===t.toString()}const Zh=(e,t)=>{if(e===null)return"null";if(e===void 0)return"undefined";const n=e.constructor;switch(n){case RegExp:case Number:case Boolean:case Function:case Symbol:return e.toString();case String:return JSON.stringify(e);case Date:return e.toISOString()}if(uS(e))return n.name+"["+e.toString()+"]";if(t.has(e))throw Vj;try{if(t.add(e),Cr(e))return"["+e.map(s=>Zh(s,t)).join(",")+"]";if(n===Object)return"{"+Object.keys(e).sort().map(s=>s+":"+Zh(e[s],t)).join(",")+"}";const r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==Array.prototype&&Object.prototype.hasOwnProperty.call(r,"toString"))return n.name+"("+JSON.stringify(e.toString())+")";const[i,o]=BK(e);return n.name+Zh(i,t)}finally{t.delete(e)}},FK=e=>Zh(e,new Set);function Jj(e,t){return t=t||Kv,ur(e)?null:t(e).toString()}function zK(e,t,n=Bo){if(qu(e))return e;const r=new Array,i=new Array;for(let o=0;on(o[0],s[0])),Cp(i,r.map(o=>o[1]))}function UK(e,t,n=Kv){if(e.length<1)return new Map;const r=new Map,i=new Map;for(let o=0;oUa(u,a)):null;ur(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 E0=5e4;function Cp(e,...t){return e instanceof Array?t.reduce((n,r)=>{let i=Math.ceil(r.length/E0),o=0;for(;i-- >0;)Array.prototype.push.apply(n,r.slice(o,o+E0)),o+=E0;return n},e):t.filter(qv).reduce((n,r)=>(Object.assign(n,r),n),e)}function C1(e,t){return qv(e)?e[t]:void 0}function WK(e,t){if(t<1)return e;for(;t--&&e.length===1;)e=e[0];return e}function dS(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((h,m)=>{const g=i(m,f);return g!==void 0&&h.push(g),h},[]);break}else l=C1(l,u);if(l===void 0)break}return l}const o=Kj.has(Yf(e).toLowerCase())?e:i(e,t.split("."));return o instanceof Array&&(n!=null&&n.unwrapArray)?WK(o,r):o}function em(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=C1(e,Number(i)),a&&(l=em(l,o,n)),l=[l];else{l=[];for(const u of e)c=em(u,t,n),n!=null&&n.preserveMissing?(c===void 0&&(c=Jl),l.push(c)):c!==void 0&&l.push(c)}else{if(c=C1(e,i),a&&(c=em(c,o,n)),c===void 0)return;l=n!=null&&n.preserveKeys?{...e}:{},l[i]=c}return l}function k1(e){if(e instanceof Array)for(let t=e.length-1;t>=0;t--)e[t]===Jl?e.splice(t,1):k1(e[t]);else if(Qn(e))for(const t in e)Na(e,t)&&k1(e[t])}const aE=/^\d+$/;function Ym(e,t,n,r){const i=t.split("."),o=i[0],s=i.slice(1).join(".");if(i.length===1)(Qn(e)||Cr(e)&&aE.test(o))&&n(e,o);else{r!=null&&r.buildGraph&&ur(e[o])&&(e[o]={});const a=e[o];if(!a)return;const l=!!(i.length>1&&aE.test(i[1]));a instanceof Array&&(r!=null&&r.descendArray)&&!l?a.forEach(c=>Ym(c,s,n,r)):Ym(a,s,n,r)}}function GK(e,t,n){Ym(e,t,(r,i)=>{r[i]=qj(n)?n(r[i]):n},{buildGraph:!0})}function lE(e,t,n){Ym(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)Qn(o)&&delete o[i]}else Qn(r)&&delete r[i]},n)}const HK=/^\$[a-zA-Z0-9_]+$/;function Yu(e){return HK.test(e)}function Zj(e){if(Kj.has(Yf(e).toLowerCase()))return of(e)?{$regex:e}:{$eq:e};if(qv(e)){if(!Object.keys(e).some(Yu))return{$eq:e};if(Na(e,"$regex")){const n={...e};return n.$regex=new RegExp(e.$regex,e.$options),delete n.$options,n}}return e}var Fd=(e=>(e.CLONE_ALL="CLONE_ALL",e.CLONE_INPUT="CLONE_INPUT",e.CLONE_OUTPUT="CLONE_OUTPUT",e.CLONE_OFF="CLONE_OFF",e))(Fd||{});class Il{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 Il?new Il(t._opts,ur(t.root)?n:t.root,Object.assign({},t.local,r)):new Il(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?void 0:r.variables,n==null?void 0:n.variables)}),this}getOptions(){return Object.freeze({...this._opts,context:Zl.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?void 0:t.collation}get processingMode(){var t;return((t=this._opts)==null?void 0:t.processingMode)||"CLONE_OFF"}get useStrictMode(){var t;return(t=this._opts)==null?void 0:t.useStrictMode}get scriptEnabled(){var t;return(t=this._opts)==null?void 0:t.scriptEnabled}get useGlobalContext(){var t;return(t=this._opts)==null?void 0:t.useGlobalContext}get hashFunction(){var t;return(t=this._opts)==null?void 0:t.hashFunction}get collectionResolver(){var t;return(t=this._opts)==null?void 0:t.collectionResolver}get jsonSchemaValidator(){var t;return(t=this._opts)==null?void 0:t.jsonSchemaValidator}get variables(){var t;return(t=this._opts)==null?void 0:t.variables}get context(){var t;return(t=this._opts)==null?void 0:t.context}}function eL(e){return e instanceof Il?e.getOptions():Object.freeze({idKey:"_id",scriptEnabled:!0,useStrictMode:!0,useGlobalContext:!0,processingMode:"CLONE_OFF",...e,context:e!=null&&e.context?Zl.from(e==null?void 0:e.context):Zl.init({})})}var Nu=(e=>(e.ACCUMULATOR="accumulator",e.EXPRESSION="expression",e.PIPELINE="pipeline",e.PROJECTION="projection",e.QUERY="query",e.WINDOW="window",e))(Nu||{});class Zl{constructor(t){this.operators={accumulator:{},expression:{},pipeline:{},projection:{},query:{},window:{}};for(const[n,r]of Object.entries(t))this.addOperators(n,r)}static init(t={}){return new Zl(t)}static from(t){return new Zl(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("accumulator",t)}addExpressionOps(t){return this.addOperators("expression",t)}addQueryOps(t){return this.addOperators("query",t)}addPipelineOps(t){return this.addOperators("pipeline",t)}addProjectionOps(t){return this.addOperators("projection",t)}addWindowOps(t){return this.addOperators("window",t)}getOperator(t,n){return t in this.operators&&this.operators[t][n]||null}}const vl=Zl.init();function cE(e,t){for(const[n,r]of Object.entries(t)){no(qj(r)&&Yu(n),`'${n}' is not a valid operator`);const i=Ml(e,n,null);no(!i||r===i,`${n} already exists for '${e}' operators. Cannot change operator function once registered.`)}switch(e){case"accumulator":vl.addAccumulatorOps(t);break;case"expression":vl.addExpressionOps(t);break;case"pipeline":vl.addPipelineOps(t);break;case"projection":vl.addProjectionOps(t);break;case"query":vl.addQueryOps(t);break;case"window":vl.addWindowOps(t);break}}function Ml(e,t,n){const{context:r,useGlobalContext:i}=n||{},o=r?r.getOperator(e,t):null;return!o&&i?vl.getOperator(e,t):o}const uE={$$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)}},E1={$$KEEP(e,t,n){return e},$$PRUNE(e,t,n){},$$DESCEND(e,t,n){if(!Na(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)Qn(a)&&(a=dE(a,t,n.update(a))),ur(a)||s.push(a);r=s}else r=dE(o,t,n.update(o));ur(r)?delete e[i]:e[i]=r}return e}};function es(e,t,n,r){var o;const i=Il.init(r,e);if(n=n||"",Yu(n)){const s=Ml("expression",n,r);if(s)return s(e,t,i);const a=Ml("accumulator",n,r);if(a)return e instanceof Array||(e=es(e,t,null,i),t=null),no(e instanceof Array,`'${n}' target must be an array.`),a(e,t,i.update(null,i.local));throw new Ku(`operator '${n}' is not registered`)}if(Vs(t)&&t.length>0&&t[0]==="$"){if(Na(E1,t))return t;let s=i.root;const a=t.split(".");if(Na(uE,a[0]))s=uE[a[0]](e,null,i),t=t.slice(a[0].length+1);else if(a[0].slice(0,2)==="$$"){s=Object.assign({},i.variables,{this:e},(o=i.local)==null?void 0:o.variables);const l=a[0].slice(2);no(Na(s,l),`Use of undefined variable: ${l}`),t=t.slice(2)}else t=t.slice(1);return t===""?s:dS(s,t)}if(Cr(t))return t.map(s=>es(e,s,null,i));if(Qn(t)){const s={};for(const[a,l]of Object.entries(t))if(s[a]=es(e,l,a,i),["expression","accumulator"].some(c=>!!Ml(c,a,r)))return no(Object.keys(t).length===1,"Invalid aggregation expression '"+JSON.stringify(t)+"'"),s[a];return s}return t}function dE(e,t,n){const r=es(e,t,null,n);return Na(E1,r)?E1[r](e,t,n):r}function $u(e){return e instanceof fE?e:new fE(e)}function VK(...e){let t=0;return $u(()=>{for(;t{const i=r.next();if(i.done)throw R1;return i.value}}else if(t instanceof Array){const r=t,i=r.length;let o=0;n=()=>{if(o0?this.push(2,t):this}drop(t){return t>0?this.push(3,t):this}transform(t){const n=this;let r;return $u(()=>(r||(r=$u(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 QK{constructor(t,n){this.pipeline=t,this.options=eL(n)}stream(t){let n=$u(t);const r=this.options.processingMode;(r==Fd.CLONE_ALL||r==Fd.CLONE_INPUT)&&n.map(oE);const i=new Array;if(!qu(this.pipeline))for(const o of this.pipeline){const s=Object.keys(o),a=s[0],l=Ml(Nu.PIPELINE,a,this.options);no(s.length===1&&!!l,`invalid pipeline operator ${a}`),i.push(a),n=l(n,o[a],this.options)}return(r==Fd.CLONE_OUTPUT||r==Fd.CLONE_ALL&&Qj([["$group","$unwind"],i]).length)&&n.map(oE),n}run(t){return this.stream(t).value()}}class XK{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:(Qn(this.projection)&&this.operators.push({$project:this.projection}),this.result=$u(this.source).filter(this.predicate),this.operators.length>0&&(this.result=new QK(this.operators,this.options).stream(this.result)),this.result)}fetchAll(){const t=$u([...this.buffer]);return this.buffer=[],VK(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={...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 kp{constructor(t,n){this.condition=t,this.options=eL(n),this.compiled=[],this.compile()}compile(){no(Qn(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(Mu(["$and","$or","$nor","$expr","$jsonSchema"],n))this.processOperator(n,n,r);else{no(!Yu(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=Ml(Nu.QUERY,n,this.options);if(!i)throw new Ku(`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 JK=(e,t,n)=>{if(qu(t)||!Qn(t))return e;let r=Bo;const i=n.collation;return Qn(i)&&Vs(i.locale)&&(r=eq(i)),e.transform(o=>{const s=Object.keys(t);for(const a of s.reverse()){const l=UK(o,u=>dS(u,a),n.hashFunction),c=Array.from(l.keys()).sort(r);t[a]===-1&&c.reverse(),o=[],c.reduce((u,d)=>Cp(u,l.get(d)),o)}return o})},ZK={1:"base",2:"accent",3:"variant"};function eq(e){const t={sensitivity:ZK[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(!Vs(r)||!Vs(i))return Bo(r,i);const o=n.compare(r,i);return o<0?-1:o>0?1:0}}function Vr(e){const t=(n,r,i)=>{const o={unwrapArray:!0},s=Math.max(1,n.split(".").length-1);return a=>{const l=dS(a,n,o);return e(l,r,{...i,depth:s})}};return t.op="query",t}function tL(e,t,n){if(Ua(e,t)||ur(e)&&ur(t))return!0;if(e instanceof Array){const r=Ua.bind(null,t);return e.some(r)||Xj(e,n==null?void 0:n.depth).some(r)}return!1}function tq(e,t,n){return!tL(e,t,n)}function nL(e,t,n){return ur(e)?t.some(r=>r===null):Qj([_p(e),t],n==null?void 0:n.hashFunction).length>0}function nq(e,t,n){return!nL(e,t,n)}function rq(e,t,n){return Yv(e,t,(r,i)=>Bo(r,i)<0)}function iq(e,t,n){return Yv(e,t,(r,i)=>Bo(r,i)<=0)}function oq(e,t,n){return Yv(e,t,(r,i)=>Bo(r,i)>0)}function sq(e,t,n){return Yv(e,t,(r,i)=>Bo(r,i)>=0)}function aq(e,t,n){return _p(e).some(r=>t.length===2&&r%t[0]===t[1])}function lq(e,t,n){const r=_p(e),i=o=>Vs(o)&&$K(t.exec(o),n==null?void 0:n.useStrictMode);return r.some(i)||Xj(r,1).some(i)}function cq(e,t,n){return(t===!1||t===0)&&e===void 0||(t===!0||t===1)&&e!==void 0}function uq(e,t,n){if(!Cr(e)||!Cr(t)||!e.length||!t.length)return!1;let r=!0;for(const i of t){if(!r)break;Qn(i)&&Mu(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=>Ua(i,o))}return r}function dq(e,t,n){return Array.isArray(e)&&e.length===t}function fq(e){return Yu(e)&&["$and","$or","$nor"].indexOf(e)===-1}function rL(e,t,n){if(Cr(e)&&!qu(e)){let r=s=>s,i=t;Object.keys(t).every(fq)&&(i={temp:t},r=s=>({temp:s}));const o=new kp(i,n);for(let s=0,a=e.length;se===null,hE=e=>ba(e)&&e>=OK&&e<=TK&&e.toString().indexOf(".")===-1,mE=e=>ba(e)&&e>=LK&&e<=jK&&e.toString().indexOf(".")===-1,pq={array:Cr,bool:k0,boolean:k0,date:x1,decimal:ba,double:ba,int:hE,long:mE,number:ba,null:pE,object:Qn,regex:of,regexp:of,string:Vs,undefined:ur,function:e=>{throw new Ku("unsupported type key `function`.")},1:ba,2:Vs,3:Qn,4:Cr,6:ur,8:k0,9:x1,10:pE,11:of,16:hE,18:mE,19:ba};function gE(e,t,n){const r=pq[t];return r?r(e):!1}function hq(e,t,n){return Array.isArray(t)?t.findIndex(r=>gE(e,r))>=0:gE(e,t)}function Yv(e,t,n){return _p(e).some(r=>Yf(r)===Yf(t)&&n(r,t))}const vE=(e,t)=>{const n={};return e.split("").forEach((r,i)=>n[r]=t*(i+1)),n};({...vE("ABCDEFGHIKLM",1),...vE("NOPQRSTUVWXY",-1)});const yE={undefined:null,null:null,NaN:NaN,Infinity:new Error,"-Infinity":new Error};function zi(e,t=yE){const n=Object.assign({},yE,t),r=new Set(Object.keys(n));return(i,o,s)=>{const a=es(i,o,null,s);if(r.has(`${a}`)){const l=n[`${a}`];if(l instanceof Error)throw new Ku(`cannot apply $${e.name} to -inf, value must in (-inf,inf)`);return l}return e(a)}}zi(Math.acos,{Infinity:1/0,0:new Error});zi(Math.acosh,{Infinity:1/0,0:new Error});zi(Math.asin);zi(Math.asinh,{Infinity:1/0,"-Infinity":-1/0});zi(Math.atan);zi(Math.atanh,{1:1/0,"-1":-1/0});zi(Math.cos);zi(Math.cosh,{"-Infinity":1/0,Infinity:1/0});const mq=Math.PI/180;zi(e=>e*mq,{Infinity:1/0,"-Infinity":1/0});const gq=180/Math.PI;zi(e=>e*gq,{Infinity:1/0,"-Infinity":-1/0});zi(Math.sin);zi(Math.sinh,{"-Infinity":-1/0,Infinity:1/0});zi(Math.tan);const vq=(e,t,n)=>{if(qu(t))return e;let r=Object.keys(t),i=!1;iL(t,n);const o=n.idKey;if(Mu(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=Il.init(n);return e.map(a=>P1(a,t,s.update(a),r,i))};function P1(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&&Mu([0,!1],d)&&(a=!0),c===n.idKey&&qu(d))u=e[c];else if(Vs(d))u=es(e,d,c,n);else if(!Mu([1,!0],d))if(d instanceof Array)u=d.map(h=>{const m=es(e,h,null,n);return ur(m)?null:m});else if(Qn(d)){const h=d,m=Object.keys(d),g=m.length==1?m[0]:"",E=Ml(Nu.PROJECTION,g,n);if(E)g==="$slice"?_p(h[g]).every(ba)?(u=E(e,h[g],c,n),s=!0):u=es(e,h,c,n):u=E(e,h[g],c,n);else if(Yu(g))u=es(e,h[g],g,n);else if(Na(e,c)){iL(h,n);let b=e[c];b instanceof Array?u=b.map(x=>P1(x,h,n,m,!1)):(b=Qn(b)?b:e,u=P1(b,h,n,m,!1))}else u=es(e,d,null,n)}else{l.push(c);continue}const f=em(e,c,{preserveMissing:!0});f!==void 0&&_1(o,f,{flatten:!0}),Yj([0,1,!1,!0],d)&&(u===void 0?lE(o,c,{descendArray:!0}):GK(o,c,u))}if(k1(o),(s||a||i)&&(o=Cp({},e,o),l.length>0))for(const c of l)lE(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),no(!(n[0]&&n[1]),"Projection cannot have a mix of inclusion and exclusion.")}}const yq=(e,t,n)=>{no(Cr(t),"Invalid expression: $and expects value to be an Array.");const r=t.map(i=>new kp(i,n));return i=>r.every(o=>o.test(i))},oL=(e,t,n)=>{no(Cr(t),"Invalid expression. $or expects value to be an Array");const r=t.map(i=>new kp(i,n));return i=>r.some(o=>o.test(i))},bq=(e,t,n)=>{no(Cr(t),"Invalid expression. $nor expects value to be an array.");const r=oL("$or",t,n);return i=>!r(i)},wq=(e,t,n)=>{const r={};r[e]=Zj(t);const i=new kp(r,n);return o=>!i.test(o)},xq=Vr(tL),Sq=Vr(oq),_q=Vr(sq),Cq=Vr(nL),kq=Vr(rq),Eq=Vr(iq),Rq=Vr(tq),Pq=Vr(nq),Tq=Vr(aq),Oq=Vr(lq);Vr(uq);const jq=Vr(rL),Lq=Vr(dq),Iq=Vr(cq),Mq=Vr(hq);var bE=!1;function Nq(e){return bE||(cE(Nu.PIPELINE,{$sort:JK,$project:vq}),cE(Nu.QUERY,{$and:yq,$eq:xq,$elemMatch:jq,$exists:Iq,$gt:Sq,$gte:_q,$in:Cq,$lt:kq,$lte:Eq,$ne:Rq,$nin:Pq,$mod:Tq,$nor:bq,$not:wq,$or:oL,$regex:Oq,$size:Lq,$type:Mq}),bE=!0),new kp(e)}function Qm(e,t){var n=Fi(e.primaryKey);t=nn(t);var r=lo(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=Vf(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=>cS.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 st("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 Rd(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 $q(e,t){return!t.sort||t.sort.length===0?[e]:t.sort.map(n=>Object.keys(n)[0])}var Dq=new WeakMap;function Aq(e){return Gs(Dq,e,()=>{var t=e.collection,n=Qm(t.storageInstance.schema,lo(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=fS(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:$q(r,n),sortComparator:o,queryMatcher:a};return l})}function Bq(e,t){if(!e.collection.database.eventReduce)return{runFullQueryAgain:!0};var n=Aq(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 Fq=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 zq(){return new Fq}function wE(e,t){t.uncached=!0;var n=t.toString();e._map.delete(n)}function Uq(e){return e.refCount$.observers.length}var Wq=100,Gq=30*1e3,Hq=(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=>wE(r,d))}}},aL=Hq(Wq,Gq),R0=new WeakSet;function Vq(e){R0.has(e)||(R0.add(e),fH().then(()=>mH(200)).then(()=>{e.destroyed||e.cacheReplacementPolicy(e,e._queryCache),R0.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=xE(this);return Ns(this,"getCachedRxDocuments",n)}},{key:"getCachedRxDocument",get:function(){var n=xE(this);return Ns(this,"getCachedRxDocument",r=>n([r])[0])}}])}();function xE(e){var t=e.primaryPath,n=e.cacheItemByDocId,r=e.registry,i=yn.deepFreezeWhenDevMode,o=e.documentCreator,s=a=>{for(var l=new Array(a.length),c=[],u=0;u0&&r&&(e.tasks.add(()=>{for(var x=0;x{e.processTasks()})),l};return s}function cL(e,t){var n=e.getCachedRxDocuments;return n(t)}var Kq=typeof WeakRef=="function",qq=Kq?Yq:Qq;function Yq(e){return new WeakRef(e)}function Qq(e){return{deref(){return e}}}var SE=function(){function e(n,r,i){this.time=lr(),this.query=n,this.count=i,this.documents=cL(this.query.collection._docCache,r)}var t=e.prototype;return t.getValue=function(r){var i=this.query.op;if(i==="count")return this.count;if(i==="findOne"){var o=this.documents.length===0?null:this.documents[0];if(!o&&r)throw st("QU10",{collection:this.query.collection.name,query:this.query.mangoQuery,op:i});return o}else return i==="findByIds"?this.docsMap:this.documents.slice(0)},Ja(e,[{key:"docsData",get:function(){return Ns(this,"docsData",this.documents.map(n=>n._data))}},{key:"docsDataMap",get:function(){var n=new Map;return this.documents.forEach(r=>{n.set(r.primary,r._data)}),Ns(this,"docsDataMap",n)}},{key:"docsMap",get:function(){for(var n=new Map,r=this.documents,i=0;i{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=tY(this);return c.then(u=>(this._lastExecEnd=lr(),u))},t.exec=async function(r){if(r&&this.op!=="findOne")throw st("QU9",{collection:this.collection.name,query:this.mangoQuery,op:this.op});await _E(this);var i=xt(this._result);return i.getValue(r)},t.toString=function(){var r=Vm({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:Qm(this.collection.schema.jsonSchema,this.mangoQuery)};r.mangoQuery.selector._deleted={$eq:!1},r.mangoQuery.index&&r.mangoQuery.index.unshift("_deleted"),co("prePrepareQuery",r);var i=pS(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 Rd(this.asRxQuery,r=>r.incrementalRemove())},t.update=function(r){throw ln("update")},t.patch=function(r){return Rd(this.asRxQuery,i=>i.patch(r))},t.incrementalPatch=function(r){return Rd(this.asRxQuery,i=>i.incrementalPatch(r))},t.modify=function(r){return Rd(this.asRxQuery,i=>i.modify(r))},t.incrementalModify=function(r){return Rd(this.asRxQuery,i=>i.incrementalModify(r))},t.where=function(r){throw ln("query-builder")},t.sort=function(r){throw ln("query-builder")},t.skip=function(r){throw ln("query-builder")},t.limit=function(r){throw ln("query-builder")},Ja(e,[{key:"$",get:function(){if(!this._$){var n=this.collection.$.pipe(Wt(r=>!r.isLocal),Vv(null),us(()=>_E(this)),Vt(()=>this._result),rS(Qx),qf((r,i)=>!!(r&&r.time===xt(i).time)),Wt(r=>!!r),Vt(r=>xt(r).getValue()));this._$=MV(n,this.refCount$.pipe(Wt(()=>!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=Qm(this.collection.schema.jsonSchema,this.mangoQuery);return Ns(this,"queryMatcher",fS(n,r))}},{key:"asRxQuery",get:function(){return this}}])}();function tm(){return{selector:{}}}function Zq(e){return e.collection._queryCache.getByQuery(e)}function Nc(e,t,n,r){co("preCreateRxQuery",{op:e,queryObj:t,collection:n,other:r});var i=new uL(e,t,n,r);return i=Zq(i),Vq(n),i}function dL(e){var t=e.asRxQuery.collection._changeEventBuffer.getCounter();return e._latestChangeEvent>=t}async function _E(e){return e.collection.awaitBeforeReads.size>0&&await Promise.all(Array.from(e.collection.awaitBeforeReads).map(t=>t())),e.collection.database.destroyed||dL(e)?!1:(e._ensureEqualQueue=e._ensureEqualQueue.then(()=>eY(e)),e._ensureEqualQueue)}function eY(e){if(e._lastEnsureEqual=lr(),e.collection.database.destroyed||dL(e))return ts;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=Bq(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 pS(e,t){if(!t.sort)throw st("SNH",{query:t});var n=_K(e,t);return{query:t,queryPlan:n}}async function tY(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);ql(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 nY(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 rY="_rxdb_internal";async function Qv(e,t){var n=await e.findDocumentsById([t],!1),r=n[0];if(r)return r}async function Xv(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=Fi(e.schema.primaryKey),s=Mi(o,[t],r),a=s[0];return a}}function Qf(e){return Object.assign({},...e)}function Xm(e,t,n,r){if(r)throw r.status===409?st("CONFLICT",{collection:e.name,id:t,writeError:r,data:n}):r.status===422?st("VD2",{collection:e.name,id:t,writeError:r,data:n}):r}function iY(e,t,n,r,i,o,s){for(var a=!!e.schema.attachments,l=[],c=[],u=[],d=ic(10),f={id:d,events:[],checkpoint:null,context:i,startTime:lr(),endTime:0},h=f.events,m=[],g=[],E=[],b=n.size>0,x,y=r.length,_=function(){var O=r[k],R=O.document,T=O.previous,$=R[t],L=R._deleted,M=T&&T._deleted,F=void 0;b&&(F=n.get($));var z;if(F){var oe=F._rev;if(!T||T&&oe!==T._rev){var fe={isError:!0,status:409,documentId:$,writeRow:O,documentInDb:F};return u.push(fe),1}var H=a?P0(O):O;a&&(L?T&&Object.keys(T._attachments).forEach(Te=>{g.push({documentId:$,attachmentId:Te,digest:xt(T)._attachments[Te].digest})}):(Object.entries(R._attachments).find(([Te,ke])=>{var qe=T?T._attachments[Te]:void 0;return!qe&&!ke.data&&(z={documentId:$,documentInDb:F,isError:!0,status:510,writeRow:O,attachmentId:Te}),!0}),z||Object.entries(R._attachments).forEach(([Te,ke])=>{var qe=T?T._attachments[Te]:void 0;if(!qe)m.push({documentId:$,attachmentId:Te,attachmentData:ke,digest:ke.digest});else{var Re=H.document._attachments[Te].digest;ke.data&&qe.digest!==Re&&E.push({documentId:$,attachmentId:Te,attachmentData:ke,digest:ke.digest})}}))),z?u.push(z):(a?c.push(P0(H)):c.push(H),x=H);var V=null,le=null,Oe=null;if(M&&!L)Oe="INSERT",V=a?ns(R):R;else if(T&&!M&&!L)Oe="UPDATE",V=a?ns(R):R,le=T;else if(L)Oe="DELETE",V=xt(R),le=T;else throw st("SNH",{args:{writeRow:O}});var Ue={documentId:$,documentData:V,previousDocumentData:le,operation:Oe};h.push(Ue)}else{var K=!!L;if(a&&Object.entries(R._attachments).forEach(([Te,ke])=>{ke.data?m.push({documentId:$,attachmentId:Te,attachmentData:ke,digest:ke.digest}):(z={documentId:$,isError:!0,status:510,writeRow:O,attachmentId:Te},u.push(z))}),z||(a?l.push(P0(O)):l.push(O),x=O),!K){var Z={documentId:$,operation:"INSERT",documentData:a?ns(R):R,previousDocumentData:a&&T?ns(T):T};h.push(Z)}}},k=0;k{t._attachments[n]=sY(r)}),t}function Ep(e){return Object.assign({},e,{_meta:nn(e._meta)})}var fL=new WeakMap;function hS(e,t,n){yn.deepFreezeWhenDevMode(n);var r=Fi(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=lr(),u=0;ut.bulkWrite(l,s)).then(m=>{var g={error:[]},E=Mi(r,l,m);fL.set(g,E);var b=m.error.length===0?[]:m.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 x=b.map(y=>({previous:y.documentInDb,document:Object.assign({},y.writeRow.document,{_rev:Us(e.token,y.documentInDb)})}));return e.lockedRun(()=>t.bulkWrite(x,s)).then(y=>{ql(g.error,y.error);var _=Mi(r,x,y);return ql(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:Vu(),_rev:Ao(),_attachments:{}}),a=nn(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 aY(e){if(e.schema.keyCompression)throw st("UT5",{args:{params:e}});if(pL(e.schema))throw st("UT6",{args:{params:e}});if(e.schema.attachments&&e.schema.attachments.compression)throw st("UT7",{args:{params:e}})}function pL(e){return!!(e.encrypted&&e.encrypted.length>0||e.attachments&&e.attachments.encrypted)}function lY(e,t,n){var r=Fi(e.schema.primaryKey),i=n?n.lwt:Yx,o=n?n.id:"";return Qm(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=Fi(e.schema.primaryKey),i=pS(e.schema,lY(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 Mi(e,t,n){var r=fL.get(n);if(r)return r;var i=[];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=cY(a.map(d=>d.lastKnownDocumentState)),c=l;for(var u of a)try{c=await u.modifier(lo(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(Mi(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=Wv(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 CE(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 cY(e){var t=e[0],n=Fa(t._rev);return e.forEach(r=>{var i=Fa(r._rev);i>n&&(t=r,n=i)}),t}var Jv={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(Vt(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(Wt(t=>!t.isLocal),Wt(t=>t.documentId===this.primary),Vt(t=>Uj(t)),Vv(e.collection._docCache.getLatestDocumentData(this.primary)),qf((t,n)=>t._rev===n._rev),Vt(t=>this.collection._docCache.getCachedRxDocument(t)),rS(Qx))},get $$(){var e=this,t=e.collection.database.getReactivityFactory();return t.fromObservable(e.$,e.getLatest()._data,e.collection.database)},get$(e){if(yn.isDevMode()){if(e.includes(".item."))throw st("DOC1",{path:e});if(e===this.primaryPath)throw st("DOC2");if(this.collection.schema.finalFields.includes(e))throw st("DOC3",{path:e});var t=ju(this.collection.schema.jsonSchema,e);if(!t)throw st("DOC4",{path:e})}return this.$.pipe(Vt(n=>za(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=ju(this.collection.schema.jsonSchema,e),n=this.get(e);if(!n)return hH;if(!t)throw st("DOC5",{path:e});if(!t.ref)throw st("DOC6",{path:e,schemaObj:t});var r=this.collection.database.collections[t.ref];if(!r)throw st("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=za(this._data,e);if(typeof t!="object"||t===null||Array.isArray(t))return yn.deepFreezeWhenDevMode(t);var n=this,r=new Proxy(nn(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$$(Bd(e+"."+a))}else if(s==="$"){var l=o.slice(0,-1);return n.get$(Bd(e+"."+l))}else if(s==="_"){var c=o.slice(0,-1);return n.populate(Bd(e+"."+c))}else return n.get(Bd(e+"."+o))}});return r})},toJSON(e=!1){if(e)return yn.deepFreezeWhenDevMode(this._data);var t=nn(this._data);return delete t._rev,delete t._attachments,delete t._deleted,delete t._meta,yn.deepFreezeWhenDevMode(t)},toMutableJSON(e=!1){return lo(this.toJSON(e))},update(e){throw ln("update")},incrementalUpdate(e){throw ln("update")},updateCRDT(e){throw ln("crdt")},putAttachment(){throw ln("attachments")},getAttachment(){throw ln("attachments")},allAttachments(){throw ln("attachments")},get allAttachments$(){throw ln("attachments")},async modify(e,t){var n=this._data,r=await CE(e)(n);return this._saveData(r,n)},incrementalModify(e,t){return this.collection.incrementalWriteQueue.addWrite(this._data,CE(e)).then(n=>this.collection._docCache.getCachedRxDocument(n))},patch(e){var t=this._data,n=lo(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=nn(e),this._data._deleted)throw st("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 Xm(this.collection,this.primary,e,i),await this.collection._runHooks("post","save",e,this),this.collection._docCache.getCachedRxDocument(Mi(this.collection.schema.primaryPath,n,r)[0])},remove(){var e=this.collection;if(this.deleted)return Promise.reject(st("DOC13",{document:this,id:this.primary}));var t=nn(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 Xm(e,this.primary,t,o),Mi(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 st("DOC14")}};function gL(e=Jv){var t=function(r,i){this.collection=r,this._data=i,this._propertyCache=new Map,this.isInstanceOfRxDocument=!0};return t.prototype=e,t}function uY(e,t,n){var r=new e(t,n);return co("createRxDocument",r),r}function vL(e,t,n){return t._meta=Object.assign({},n._meta,t._meta),yn.isDevMode()&&e.schema.validateChange(n,t),e._runHooks("pre","save",t,n)}var Nl="collection",mS="storage-token",dY="rx-migration-status",fY="RxInternalDocument",gS=Gv({version:0,title:fY,primaryKey:{key:"id",fields:["context","key"],separator:"|"},type:"object",properties:{id:{type:"string",maxLength:200},key:{type:"string"},context:{type:"string",enum:[Nl,mS,dY,"OTHER"]},data:{type:"object",additionalProperties:!0}},indexes:[],required:["key","context","data"],additionalProperties:!1,sharding:{shards:1,mode:"collection"}});function Xf(e,t){return Za(gS,{key:e,context:t})}async function yL(e){var t=pS(e.schema,{selector:{context:Nl,_deleted:{$eq:!1}},sort:[{id:"asc"}],skip:0}),n=await e.query(t),r=n.documents;return r}var bL="storageToken",pY=Xf(bL,mS);async function hY(e){var t=ic(10),n=e.password?await e.hashFunction(JSON.stringify(e.password)):void 0,r={id:pY,context:mS,key:bL,data:{rxdbVersion:e.rxdbVersion,token:t,instanceToken:e.token,passwordHash:n},_deleted:!1,_meta:Vu(),_rev:Ao(),_attachments:{}},i=[{document:r}],o=await e.internalStore.bulkWrite(i,"internal-add-storage-token");if(!o.error[0])return Mi("id",i,o)[0];var s=xt(o.error[0]);if(s.isError&&Wv(s)){var a=s;if(!mY(a.documentInDb.data.rxdbVersion,e.rxdbVersion))throw st("DM5",{args:{database:e.name,databaseStateVersion:a.documentInDb.data.rxdbVersion,codeVersion:e.rxdbVersion}});if(n&&n!==a.documentInDb.data.passwordHash)throw st("DB1",{passwordHash:n,existingPasswordHash:a.documentInDb.data.passwordHash});var l=a.documentInDb;return xt(l)}throw s}function mY(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 gY(e,t,n){if(e.schema.version!==n.version)throw st("SNH",{schema:n,version:e.schema.version,name:e.name,collection:e,args:{storageCollectionName:t}});for(var r=Jm(e.name,e.schema.jsonSchema),i=Xf(r,Nl);;){var o=await Qv(e.database.internalStore,i),s=lo(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 Xv(e.database.internalStore,{previous:xt(o),document:s},"add-connected-storage-to-collection")}catch(l){if(!Wv(l))throw l}}}async function vY(e,t,n){if(e.schema.version!==n.version)throw st("SNH",{schema:n,version:e.schema.version,name:e.name,collection:e,args:{storageCollectionName:t}});for(var r=Jm(e.name,e.schema.jsonSchema),i=Xf(r,Nl);;){var o=await Qv(e.database.internalStore,i),s=lo(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 Xv(e.database.internalStore,{previous:xt(o),document:s},"remove-connected-storage-from-collection")}catch(l){if(!Wv(l))throw l}}}function Jm(e,t){return e+"-"+t.version}function wh(e,t){return t=nn(t),t=IH(e,t),typeof e.jsonSchema.primaryKey!="string"&&(t=PH(e.primaryPath,e.jsonSchema,t)),t._meta=Vu(),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=Ao()),t}async function yY(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(h=>c.push({collectionName:h.collectionName,isCollection:!1,schema:h.schema}))});var u=new Set;if(c=c.filter(f=>{var h=f.collectionName+"||"+f.schema.version;return u.has(h)?!1:(u.add(h),!0)}),await Promise.all(c.map(async f=>{var h=await e.createStorageInstance({collectionName:f.collectionName,databaseInstanceToken:n,databaseName:r,multiInstance:!1,options:{},schema:f.schema,password:o,devMode:yn.isDevMode()});await h.remove(),f.isCollection&&await Hs("postRemoveRxCollection",{storage:e,databaseName:r,collectionName:i})})),s){var d=l.map(f=>{var h=Ep(f);return h._deleted=!0,h._meta.lwt=lr(),h._rev=Us(n,f),{previous:f,document:h}});await t.bulkWrite(d,"rx-database-remove-collection-all")}}function Vi(e){if(e.destroyed)throw st("COL21",{collection:e.name,version:e.schema.version})}var bY=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(Wt(r=>r.collectionName===this.collection.name),Wt(r=>{var i=r.events[0];return!i.isLocal})).subscribe(r=>{this.tasks.add(()=>this._handleChangeEvents(r.events)),this.tasks.size<=1&&Uv().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):(ql(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 wY(e){return new bY(e)}var xY=new WeakMap;function SY(e){var t=e.schema.getDocumentPrototype(),n=kY(e),r=Jv,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 _Y(e){return Gs(xY,e,()=>gL(SY(e)))}function CY(e,t,n){var r=uY(t,e,yn.deepFreezeWhenDevMode(n));return e._runHooksSync("post","create",n,r),co("postCreateRxDocument",r),r}function kY(e){var t={};return Object.entries(e.methods).forEach(([n,r])=>{t[n]=r}),t}async function Zm(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 eg(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:Vu(),_rev:Ao()};for(i.id=Za(e.input.metaInstance.schema,i);!e.events.canceled.getValue();){if(r&&(i.checkpointData=Qf([r.checkpointData,i.checkpointData])),i._meta.lwt=lr(),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=Mi(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 EY(e){var t=await e.hashFunction([e.identifier,e.forkInstance.databaseName,e.forkInstance.collectionName].join("||"));return"rx_storage_replication_"+t}function kE(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:lr()}),_rev:n?r._rev:Ao()});return o._rev||(o._rev=Us(e,i)),o}function ga(e,t,n){var r=nn(e);return t||delete r._attachments,n||(delete r._meta,delete r._rev),r}function T1(e,t){return e.hasAttachments?t.map(n=>{var r=lo(n.document);return r.docData=ns(r.docData),{document:r,previous:n.previous}}):t}function O1(e){for(;;)if(e.underlyingPersistentStorage)e=e.underlyingPersistentStorage;else return e}var RY="RxReplicationProtocolMetaData";function PY(e,t){var n=TH(e),r={title:RY,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=Gv(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 tg(e,t,n,r){var i=t[e.primaryPath],o=n?Ep(n):{id:"",isCheckpoint:"0",itemId:i,docData:t,_attachments:{},_deleted:!1,_rev:Ao(),_meta:{lwt:0}};o.docData=t,r&&(o.isResolvedConflict=r),o._meta.lwt=lr(),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 TY(e){if(e.input.initialCheckpoint&&e.input.initialCheckpoint.downstream){var t=await Zm(e,"down");t||await eg(e,"down",e.input.initialCheckpoint.downstream)}var n=await e.input.hashFunction(e.input.identifier),r=e.input.replicationHandler,i=0,o=[];function s(m){e.stats.down.addNewTask=e.stats.down.addNewTask+1;var g={time:i++,task:m};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(us(async m=>(await Fn(e.events.active.up.pipe(Wt(g=>!g))),m))).subscribe(m=>{e.stats.down.masterChangeStreamEmit=e.stats.down.masterChangeStreamEmit+1,s(m)});Fn(e.events.canceled.pipe(Wt(m=>!!m))).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(()=>Zm(e,"down"));for(var m=await e.checkpointQueue,g=[];!e.events.canceled.getValue();){l=i++;var E=await r.masterChangesSince(m,e.input.pullBatchSize);if(E.documents.length===0||(m=Qf([m,E.checkpoint]),g.push(h(E.documents,m)),E.documents.length{if(b==="RESYNC")throw new Error("SNH");ql(g,b.documents),E=Qf([E,b.checkpoint])}),h(g,xt(E))}var d=Pi,f={docs:{}};function h(m,g){var E=e.primaryPath;return e.stats.down.persistFromMaster=e.stats.down.persistFromMaster+1,m.forEach(b=>{var x=b[E];f.docs[x]=b}),f.checkpoint=g,d=d.then(()=>{var b=f.docs;f.docs={};var x=f.checkpoint,y=Object.keys(b);if(e.events.canceled.getValue()||y.length===0)return Pi;var _=[],k={},O={},R=[];return Promise.all([e.input.forkInstance.findDocumentsById(y,!0),xL(e,y)]).then(([T,$])=>{var L=new Map;return T.forEach(M=>L.set(M[E],M)),Promise.all(y.map(async M=>{var F=L.get(M),z=F?ga(F,e.hasAttachments,!1):void 0,K=b[M],Z=$[M];Z&&F&&Z.metaDocument.isResolvedConflict===F._rev&&await e.streamQueue.up;var oe=!Z||!z?!1:await e.input.conflictHandler({realMasterState:Z.docData,newDocumentState:z},"downstream-check-if-equal-0").then(Oe=>Oe.isEqual);if(!oe&&Z&&Z.docData._rev&&F&&F._meta[e.input.identifier]&&Fa(F._rev)===F._meta[e.input.identifier]&&(oe=!0),F&&Z&&oe===!1||F&&!Z)return Pi;var fe=z?await e.input.conflictHandler({realMasterState:K,newDocumentState:z},"downstream-check-if-equal-1").then(Oe=>Oe.isEqual):!1;if(z&&fe)return(!Z||oe===!1)&&R.push(await tg(e,z,Z?Z.metaDocument:void 0)),Pi;var H=Object.assign({},K,F?{_meta:nn(F._meta),_attachments:e.hasAttachments&&K._attachments?K._attachments:{},_rev:Ao()}:{_meta:{lwt:lr()},_rev:Ao(),_attachments:e.hasAttachments&&K._attachments?K._attachments:{}});if(K._rev){var V=F?Fa(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 le={previous:F,document:H};le.document._rev=le.document._rev?le.document._rev:Us(n,le.previous),_.push(le),k[M]=le,O[M]=await tg(e,K,Z?Z.metaDocument:void 0)}))}).then(async()=>{if(_.length>0)return e.input.forkInstance.bulkWrite(_,await e.downstreamBulkWriteFlag).then(T=>{var $=Mi(e.primaryPath,_,T);$.forEach(L=>{var M=L[E];e.events.processed.down.next(k[M]),R.push(O[M])}),T.error.forEach(L=>{L.status!==409&&e.events.error.next(st("RC_PULL",{writeError:L}))})})}).then(()=>{if(R.length>0)return e.input.metaInstance.bulkWrite(T1(e,R),"replication-down-write-meta").then(T=>{T.error.forEach($=>{e.events.error.next(st("RC_PULL",{id:$.documentId,writeError:$}))})})}).then(()=>{eg(e,"down",x)})}).catch(b=>e.events.error.next(b)),d}}var SL=function(e,t){var n=ns(e.newDocumentState),r=ns(e.realMasterState);return Km(n,r)?Promise.resolve({isEqual:!0}):Promise.resolve({isEqual:!1,documentData:e.realMasterState})};async function OY(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:nn(n._meta),_rev:Ao(),_attachments:nn(n._attachments)});return o._meta.lwt=lr(),o._rev=Us(await e.checkpointKey,n),{resolvedDoc:o,output:i}}}async function j1(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 jY(e){if(e.input.initialCheckpoint&&e.input.initialCheckpoint.upstream){var t=await Zm(e,"up");t||await eg(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=ts,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()});Fn(e.events.canceled.pipe(Wt(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(()=>Zm(e,"up"));for(var f=await e.checkpointQueue,h=new Set,m=async function(){i=r++,h.size>3&&await Promise.race(Array.from(h));var b=await hL(e.input.forkInstance,e.input.pushBatchSize,f);if(b.documents.length===0)return 1;f=Qf([f,b.checkpoint]);var x=d(b.documents,xt(f));h.add(x),x.catch().then(()=>h.delete(x))};!e.events.canceled.getValue()&&!await m(););var g=await Promise.all(h),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=[],h={};o.length>0;){var m=xt(o.shift());m.timeE.documentData)),h=Qf([h,m.task.checkpoint]))}var g=f.length===0?ts:d(f,h);return g.then(()=>{o.length===0?e.events.active.up.next(!1):u()})})}function d(f,h){return e.stats.up.persistToMaster=e.stats.up.persistToMaster+1,f.forEach(m=>{var g=m[e.primaryPath];a.docs[g]=m}),a.checkpoint=h,s=s.then(async()=>{if(e.events.canceled.getValue())return!1;var m=a.docs;a.docs={};var g=a.checkpoint,E=Object.keys(m);if(E.length===0)return!1;var b=await xL(e,E),x={},y=[],_={},k={};if(await Promise.all(E.map(async fe=>{var H=m[fe];k[fe]=H;var V=ga(H,e.hasAttachments,!!e.input.keepMeta),le=b[fe];le&&le.metaDocument.isResolvedConflict!==H._rev&&(await e.input.conflictHandler({realMasterState:le.docData,newDocumentState:V},"upstream-check-if-equal")).isEqual||le&&le.docData._rev&&Fa(H._rev)===H._meta[e.input.identifier]||(y.push(fe),x[fe]={assumedMasterState:le?le.docData:void 0,newDocumentState:V},_[fe]=await tg(e,V,le?le.metaDocument:void 0))})),y.length===0)return!1;var O=Object.values(x),R=new Set,T={},$=Y7(O,e.input.pushBatchSize);await Promise.all($.map(async fe=>{e.hasAttachments&&await Promise.all(fe.map(async V=>{V.newDocumentState=await j1(e.primaryPath,e.input.forkInstance,lo(V.newDocumentState),V.assumedMasterState)}));var H=await n.masterWrite(fe);H.forEach(V=>{var le=V[e.primaryPath];R.add(le),T[le]=V})}));var L=[];if(y.forEach(fe=>{R.has(fe)||(e.events.processed.up.next(x[fe]),L.push(_[fe]))}),e.events.canceled.getValue())return!1;L.length>0&&await e.input.metaInstance.bulkWrite(T1(e,L),"replication-up-write-meta");var M=!1;if(R.size>0){e.stats.up.persistToMasterHadConflicts=e.stats.up.persistToMasterHadConflicts+1;var F=[],z={};if(await Promise.all(Object.entries(T).map(([fe,H])=>{var V=x[fe],le={newDocumentState:V.newDocumentState,assumedMasterState:V.assumedMasterState,realMasterState:H};return OY(e,le,k[fe]).then(async Oe=>{if(Oe){e.events.resolvedConflicts.next({input:le,output:Oe.output}),F.push({previous:k[fe],document:Oe.resolvedDoc});var Ue=b[fe];z[fe]=await tg(e,xt(H),Ue?Ue.metaDocument:void 0,Oe.resolvedDoc._rev)}})})),F.length>0){M=!0,e.stats.up.persistToMasterConflictWrites=e.stats.up.persistToMasterConflictWrites+1;var K=await e.input.forkInstance.bulkWrite(F,"replication-up-write-conflict"),Z=[],oe=Mi(e.primaryPath,F,K);oe.forEach(fe=>{var H=fe[e.primaryPath];Z.push(z[H])}),Z.length>0&&await e.input.metaInstance.bulkWrite(T1(e,Z),"replication-up-write-conflict-meta")}}return eg(e,"up",g),M}).catch(m=>(e.events.error.next(m),!1)),s}}function LY(e){e=nn(e),e.forkInstance=O1(e.forkInstance),e.metaInstance=O1(e.metaInstance);var t=EY(e),n={primaryPath:Fi(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 Pn,up:new Pn},resolvedConflicts:new Pn,error:new Pn},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:Pi,up:Pi},checkpointQueue:Pi,lastCheckpointDoc:{}};return TY(n),jY(n),n}function T0(e){return Fn(zj([e.firstSyncDone.down.pipe(Wt(t=>!!t)),e.firstSyncDone.up.pipe(Wt(t=>!!t))])).then(()=>{})}function EE(e){return Promise.all([e.streamQueue.up,e.streamQueue.down,e.checkpointQueue])}function IY(e,t,n,r=!1){e=O1(e);var i=!!e.schema.attachments,o=Fi(e.schema.primaryKey),s={masterChangeStream$:e.changeStream().pipe(us(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 j1(o,e,lo(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 j1(o,e,lo(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=[],h=[];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?h.push({previous:b,document:kE(n,i,r,E.newDocumentState,b)}):f.push(ga(b,i,r)):h.push({document:kE(n,i,r,E.newDocumentState)})})),h.length>0){var m=await e.bulkWrite(h,"replication-master-write");m.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 MY(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"],RE=!1,kL=function(){function e(n,r,i,o,s={},a={},l={},c={},u={},d=aL,f={},h=SL){this.storageInstance={},this.timeouts=new Set,this.incrementalWriteQueue={},this.awaitBeforeReads=new Set,this._incrementalUpsertQueues=new Map,this.synced=!1,this.hooks={},this._subs=[],this._docCache={},this._queryCache=zq(),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=h,NY(this.asRxCollection)}var t=e.prototype;return t.prepare=async function(){this.storageInstance=hS(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(Wt(l=>l.collectionName===this.name));this.$=r.pipe(us(l=>l.events)),this.checkpoint$=r.pipe(Vt(l=>l.checkpoint)),this._changeEventBuffer=wY(this.asRxCollection);var i;this._docCache=new lL(this.schema.primaryPath,this.database.eventBulks$.pipe(Wt(l=>l.collectionName===this.name&&!l.events[0].isLocal),Vt(l=>l.events)),l=>(i||(i=_Y(this.asRxCollection)),CY(this.asRxCollection,i,l)));var o=this.database.internalStore.changeStream().pipe(Wt(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=yn.deepFreezeWhenDevMode,h=0;h{this.conflictHandler(l.input,l.context).then(c=>{this.storageInstance.resolveConflictResultionTask({id:l.id,output:c})})})),Pi},t.cleanup=function(r){throw Vi(this),ln("cleanup")},t.migrationNeeded=function(){throw ln("migration-schema")},t.getMigrationState=function(){throw ln("migration-schema")},t.startMigration=function(r=10){return Vi(this),this.getMigrationState().startMigration(r)},t.migratePromise=function(r=10){return this.getMigrationState().migratePromise(r)},t.insert=async function(r){Vi(this);var i=await this.bulkInsert([r]),o=i.error[0];Xm(this,r[this.schema.primaryPath],r,o);var s=xt(i.success[0]);return s},t.bulkInsert=async function(r){if(Vi(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=wh(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;m.set(E[i],E)}),await Promise.all(h.success.map(g=>this._runHooks("post","insert",m.get(g.primary),g)))}return h},t.bulkRemove=async function(r){Vi(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(h=>{var m=h.toMutableJSON(!0);s.push(m),a.set(h.primary,m)}),await Promise.all(s.map(h=>{var m=h[this.schema.primaryPath];return this._runHooks("pre","remove",h,o.get(m))}));var l=s.map(h=>{var m=nn(h);return m._deleted=!0,{previous:h,document:m}}),c=await this.storageInstance.bulkWrite(l,"rx-collection-bulk-remove"),u=Mi(this.schema.primaryPath,l,c),d=u.map(h=>h[i]);await Promise.all(d.map(h=>this._runHooks("post","remove",a.get(h),o.get(h))));var f=d.map(h=>Ws(o,h));return{success:f,error:c.error}},t.bulkUpsert=async function(r){Vi(this);var i=[],o=new Map;r.forEach(c=>{var u=wh(this.schema,c),d=u[this.schema.primaryPath];if(!d)throw st("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),h=this._docCache.getCachedRxDocuments([f])[0],m=await h.incrementalModify(()=>d);a.push(m)}})),{error:l,success:a}},t.upsert=async function(r){Vi(this);var i=await this.bulkUpsert([r]);return Xm(this.asRxCollection,r[this.schema.primaryPath],r,i.error[0]),i.success[0]},t.incrementalUpsert=function(r){Vi(this);var i=wh(this.schema,r),o=i[this.schema.primaryPath];if(!o)throw st("COL4",{data:r});var s=this._incrementalUpsertQueues.get(o);return s||(s=Pi),s=s.then(()=>DY(this,o,i)).then(a=>a.inserted?a.doc:$Y(a.doc,i)),this._incrementalUpsertQueues.set(o,s),s},t.find=function(r){if(Vi(this),typeof r=="string")throw st("COL5",{queryObj:r});r||(r=tm());var i=Nc("find",r,this);return i},t.findOne=function(r){if(Vi(this),typeof r=="number"||Array.isArray(r))throw ki("COL6",{queryObj:r});var i;if(typeof r=="string")i=Nc("findOne",{selector:{[this.schema.primaryPath]:r},limit:1},this);else{if(r||(r=tm()),r.limit)throw st("QU6");r=nn(r),r.limit=1,i=Nc("findOne",r,this)}return i},t.count=function(r){Vi(this),r||(r=tm());var i=Nc("count",r,this);return i},t.findByIds=function(r){Vi(this);var i={selector:{[this.schema.primaryPath]:{$in:r.slice(0)}}},o=Nc("findByIds",i,this);return o},t.exportJSON=function(){throw ln("json-dump")},t.importJSON=function(r){throw ln("json-dump")},t.insertCRDT=function(r){throw ln("crdt")},t.addPipeline=function(r){throw ln("pipeline")},t.addHook=function(r,i,o,s=!1){if(typeof o!="function")throw ki("COL7",{key:i,when:r});if(!_L.includes(r))throw ki("COL8",{key:i,when:r});if(!CL.includes(i))throw st("COL9",{key:i});if(r==="post"&&i==="create"&&s===!0)throw st("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 Pi;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?ts:(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],Hs("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(Wt(n=>n.operation==="INSERT"))}},{key:"update$",get:function(){return this.$.pipe(Wt(n=>n.operation==="UPDATE"))}},{key:"remove$",get:function(){return this.$.pipe(Wt(n=>n.operation==="DELETE"))}},{key:"asRxCollection",get:function(){return this}}])}();function NY(e){if(!RE){RE=!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 $Y(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 AY({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 h={databaseInstanceToken:e.token,databaseName:e.name,collectionName:t,schema:n.jsonSchema,options:r,multiInstance:e.multiInstance,password:e.password,devMode:yn.isDevMode()};return co("preCreateRxStorageInstance",h),yY(e,h).then(m=>{var g=new kL(e,t,n,m,r,i,a,l,c,d,s,f);return g.prepare().then(()=>{Object.entries(s).forEach(([b,x])=>{Object.defineProperty(g,b,{get:()=>x.bind(g)})});var E=Pi;return o&&g.schema.version!==0&&(E=g.migratePromise()),E}).then(()=>(co("createRxCollection",{collection:g,creator:{name:t,schema:n,storageInstance:m,instanceCreationOptions:r,migrationStrategies:i,methods:a,attachments:l,options:c,cacheReplacementPolicy:d,localDocuments:u,statics:s}}),g)).catch(E=>m.close().then(()=>Promise.reject(E)))})}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,FY(this)},0))}clear(){this.map.clear()}}function FY(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=ts,this.storageTokenDocument=ts,this.emittedEventBulkIds=new vS(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=h,this.reactivity=m,this.name!=="pseudoInstance"&&(this.internalStore=hS(this.asRxDatabase,u,gS),this.storageTokenDocument=hY(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 st("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 Qv(this.internalStore,Xf(Jm(r,i),Nl));if(!o)throw st("SNH",{name:r,schema:i});var s=Ep(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,h=d.schema;i[f]=h;var m=NH(h,this.hashFunction);if(o[f]=m,this.collections[u])throw st("DB3",{name:u});var g=Jm(u,h),E={id:Xf(g,Nl),key:g,context:Nl,data:{name:f,schemaHash:await m.hash,schema:m.jsonSchema,version:m.version,connectedStorages:[]},_deleted:!1,_meta:Vu(),_rev:Ao(),_attachments:{}};s.push({document:E});var b=Object.assign({},d,{name:f,schema:m,database:this}),x=nn(d);x.database=this,x.name=u,co("preCreateRxCollection",x),b.conflictHandler=x.conflictHandler,a[f]=b}));var l=await this.internalStore.bulkWrite(s,"rx-database-add-collection");await HY(this),await Promise.all(l.error.map(async u=>{if(u.status!==409)throw st("DB12",{database:this.name,writeError:u});var d=xt(u.documentInDb),f=d.data.name,h=o[f];if(d.data.schemaHash!==await h.hash)throw st("DB6",{database:this.name,collection:f,previousSchemaHash:d.data.schemaHash,schemaHash:await h.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 AY(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 ln("json-dump")},t.addState=function(r){throw ln("state")},t.importJSON=function(r){throw ln("json-dump")},t.backup=function(r){throw ln("backup")},t.leaderElector=function(){throw ln("leader-election")},t.isLeader=function(){throw ln("leader-election")},t.waitForLeadership=function(){throw ln("leader-election")},t.migrationStates=function(){throw ln("migration-schema")},t.destroy=async function(){return this.destroyed||(this.destroyed=!0,await Hs("preDestroyRxDatabase",this),this.eventBulks$.complete(),this._subs.map(r=>r.unsubscribe()),this.name==="pseudoInstance")?ts: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(()=>ng.delete(this.storage.name+"|"+this.name)).then(()=>!0)},t.remove=function(){return this.destroy().then(()=>WY(this.name,this.storage,this.password))},Ja(e,[{key:"$",get:function(){return this.observable$}},{key:"asRxDatabase",get:function(){return this}}])}();function zY(e,t){var n=t.name+"|"+e;if(ng.has(n))throw st("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:rY,schema:gS,options:r,multiInstance:i,password:o,devMode:yn.isDevMode()});return s}function UY({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}){co("preCreateRxDatabase",{storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i,eventReduce:o,ignoreDuplicate:s,options:a,localDocuments:u}),s||zY(n,e),ng.add(e.name+"|"+n);var h=ic(10);return PL(h,e,n,t,i,r).catch(m=>{throw ng.delete(e.name+"|"+n),m}).then(m=>{var g=new yS(n,h,e,t,r,i,o,a,m,d,l,c,f);return Hs("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 WY(e,t,n){var r=ic(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 Hs("postRemoveRxDatabase",{databaseName:e,storage:t}),await i.remove(),a}function GY(e){return e instanceof yS}async function HY(e){if(await e.storageToken,e.startupErrors[0])throw e.startupErrors[0]}var VY={RxSchema:bj.prototype,RxDocument:Jv,RxQuery:uL.prototype,RxCollection:kL.prototype,RxDatabase:yS.prototype},j0=new Set,PE=new Set;function Qu(e){if(co("preAddRxPlugin",{plugin:e,plugins:j0}),!j0.has(e)){{if(PE.has(e.name))throw st("PL3",{name:e.name,plugin:e});j0.add(e),PE.add(e.name)}if(!e.rxdb)throw ki("PL1",{plugin:e});e.init&&e.init(),e.prototypes&&Object.entries(e.prototypes).forEach(([t,n])=>n(VY[t])),e.overwritable&&Object.assign(yn,e.overwritable),e.hooks&&Object.entries(e.hooks).forEach(([t,n])=>{n.after&&Kf[t].push(n.after),n.before&&Kf[t].unshift(n.before)})}}function KY(e){return e&&typeof e.then=="function"}Promise.resolve(!1);var qY=Promise.resolve(!0),$s=Promise.resolve();function Rl(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function YY(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Rp(){return Math.random().toString(36).substring(2)}var L0=0;function Pp(){var e=Date.now()*1e3;return e<=L0&&(e=L0+1),L0=e,e}function QY(){return typeof navigator<"u"&&typeof navigator.locks<"u"&&typeof navigator.locks.request=="function"}var XY=Pp,JY="native";function ZY(e){var t={time:Pp(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function eQ(e){e.bc.close(),e.subFns=[]}function tQ(e,t){try{return e.bc.postMessage(t,!1),$s}catch(n){return Promise.reject(n)}}function nQ(e,t){e.messagesCallback=t}function rQ(){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 iQ(){return 150}var oQ={create:ZY,close:eQ,onMessage:nQ,postMessage:tQ,canBeUsed:rQ,type:JY,averageResponseTime:iQ,microSeconds:XY};function bS(){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 sQ=Pp,aQ="pubkey.broadcast-channel-0-",Ks="messages",Zv={durability:"relaxed"},lQ="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 wS(e){e.commit&&e.commit()}function cQ(e){var t=TL(),n=aQ+e,r=t.open(n);return r.onupgradeneeded=function(i){var o=i.target.result;o.createObjectStore(Ks,{keyPath:"id",autoIncrement:!0})},new Promise(function(i,o){r.onerror=function(s){return o(s)},r.onsuccess=function(){i(r.result)}})}function uQ(e,t,n){var r=Date.now(),i={uuid:t,time:r,data:n},o=e.transaction([Ks],"readwrite",Zv);return new Promise(function(s,a){o.oncomplete=function(){return s()},o.onerror=function(c){return a(c)};var l=o.objectStore(Ks);l.add(i),wS(o)})}function dQ(e,t){var n=e.transaction(Ks,"readonly",Zv),r=n.objectStore(Ks),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 gQ(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 vQ(e){e.closed=!0,e.db.close()}function yQ(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return uQ(e.db,e.uuid,t)}).then(function(){YY(0,10)===0&&hQ(e)}),e.writeBlockPromise}function bQ(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,jL(e)}function wQ(){return!!TL()}function xQ(e){return e.idb.fallbackInterval*2}var SQ={create:mQ,close:vQ,onMessage:bQ,postMessage:yQ,canBeUsed:wQ,type:lQ,averageResponseTime:xQ,microSeconds:sQ},_Q=Pp,CQ="pubkey.broadcastChannel-",kQ="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 CQ+e}function EQ(e,t){return new Promise(function(n){Rl().then(function(){var r=IL(e.channelName),i={token:Rp(),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 RQ(e,t){var n=IL(e),r=function(o){o.key===n&&t(JSON.parse(o.newValue))};return window.addEventListener("storage",r),r}function PQ(e){window.removeEventListener("storage",e)}function TQ(e,t){if(t=bS(t),!ML())throw new Error("BroadcastChannel: localstorage cannot be used");var n=Rp(),r=new vS(t.localstorage.removeTimeout),i={channelName:e,uuid:n,eMIs:r};return i.listener=RQ(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 LE(e,t,n){e._addEL[t].push(n),HQ(e)}function IE(e,t,n){e._addEL[t]=e._addEL[t].filter(function(r){return r!==n}),VQ(e)}function HQ(e){if(!e._iL&&AL(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 VQ(e){if(e._iL&&!AL(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}function KQ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var BL={exports:{}},Nn=BL.exports={},Yo,Qo;function I1(){throw new Error("setTimeout has not been defined")}function M1(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Yo=setTimeout:Yo=I1}catch{Yo=I1}try{typeof clearTimeout=="function"?Qo=clearTimeout:Qo=M1}catch{Qo=M1}})();function FL(e){if(Yo===setTimeout)return setTimeout(e,0);if((Yo===I1||!Yo)&&setTimeout)return Yo=setTimeout,setTimeout(e,0);try{return Yo(e,0)}catch{try{return Yo.call(null,e,0)}catch{return Yo.call(this,e,0)}}}function qQ(e){if(Qo===clearTimeout)return clearTimeout(e);if((Qo===M1||!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=[],uu=!1,Pl,nm=-1;function YQ(){!uu||!Pl||(uu=!1,Pl.length?Ps=Pl.concat(Ps):nm=-1,Ps.length&&zL())}function zL(){if(!uu){var e=FL(YQ);uu=!0;for(var t=Ps.length;t;){for(Pl=Ps,Ps=[];++nm1)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"),$l(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=Rp(),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 Rl(0,!0);if(this.isDead)return Rl(0,!1);if(this._aplQC>1)return this._aplQ;var r=function(){if(n.isLeader)return qY;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 $l(n,"apply").then(function(){return Promise.race([Rl(c),a.then(function(){return Promise.reject(new Error)})])}).then(function(){return $l(n,"apply")}).then(function(){return Promise.race([Rl(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=iX(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,$l(this,"death")}};function iX(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 Rl(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 oX(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 sX(e,t){if(e._leaderElector)throw new Error("BroadcastChannel already has a leader-elector");t=oX(t,e);var n=QY()?new GL(e,t):new HL(e,t);return e._befC.push(function(){return n.die()}),e._leaderElector=n,n}var rg=new Map;function VL(e,t,n,r){var i=rg.get(t);return i||(i={bc:new SS(["RxDB:",e,n].join("|")),refs:new Set},rg.set(t,i)),i.refs.add(r),i.bc}function N1(e,t){var n=rg.get(e);if(n&&(n.refs.delete(t),n.refs.size===0))return rg.delete(e),n.bc.close()}function aX(e,t,n,r){if(t.multiInstance){var i=VL(e,t.databaseInstanceToken,n.databaseName,n),o=new Pn,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 N1(t.databaseInstanceToken,n),u()};var d=n.remove.bind(n);n.remove=async function(){return l=!0,c.unsubscribe(),i.removeEventListener("message",s),await N1(t.databaseInstanceToken,n),d()}}}var KL={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(xr,function(){var n=function(p,w){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,I){P.__proto__=I}||function(P,I){for(var N in I)Object.prototype.hasOwnProperty.call(I,N)&&(P[N]=I[N])})(p,w)},r=function(){return(r=Object.assign||function(p){for(var w,P=1,I=arguments.length;P"u"||o.Promise||(o.Promise=Promise);var c=Object.getPrototypeOf,u={}.hasOwnProperty;function d(p,w){return u.call(p,w)}function f(p,w){typeof w=="function"&&(w=w(c(p))),(typeof Reflect>"u"?s:Reflect.ownKeys)(w).forEach(function(P){m(p,P,w[P])})}var h=Object.defineProperty;function m(p,w,P,I){h(p,w,l(P&&d(P,"get")&&typeof P.get=="function"?{get:P.get,set:P.set,configurable:!0}:{value:P,configurable:!0,writable:!0},I))}function g(p){return{from:function(w){return p.prototype=Object.create(w.prototype),m(p.prototype,"constructor",p),{extend:f.bind(null,p.prototype)}}}}var E=Object.getOwnPropertyDescriptor,b=[].slice;function x(p,w,P){return b.call(p,w,P)}function y(p,w){return w(p)}function _(p){if(!p)throw new Error("Assertion Failed")}function k(p){o.setImmediate?setImmediate(p):setTimeout(p,0)}function O(p,w){if(typeof w=="string"&&d(p,w))return p[w];if(!w)return p;if(typeof w!="string"){for(var P=[],I=0,N=w.length;I"u"?[]:function(){var p=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[p,c(p),p];var w=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[w,c(w),p]}(),pe=yo[0],Hi=yo[1],yo=yo[2],Hi=Hi&&Hi.then,Fe=pe&&pe.constructor,it=!!yo,et=function(p,w){qt.push([p,w]),Ye&&(queueMicrotask(tl),Ye=!1)},je=!0,Ye=!0,kt=[],Kt=[],Xe=ot,_t={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ze,pgp:!1,env:{},finalize:Ze},Le=_t,qt=[],Tn=0,pr=[];function We(p){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var w=this._PSD=Le;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&&kr(this,this._value))}this._state=null,this._value=null,++w.ref,function P(I,N){try{N(function(B){if(I._state===null){if(B===I)throw new TypeError("A promise cannot be resolved with itself.");var G=I._lib&&fi();B&&typeof B.then=="function"?P(I,function(Y,ie){B instanceof We?B._then(Y,ie):B.then(Y,ie)}):(I._state=!0,I._value=B,vo(I)),G&&pi()}},kr.bind(null,I))}catch(B){kr(I,B)}}(this,p)}var Wi={get:function(){var p=Le,w=te;function P(I,N){var B=this,G=!p.global&&(p!==Le||w!==te),Y=G&&!Qe(),ie=new We(function(ne,ce){di(B,new ui(Je(I,p,G,Y),Je(N,p,G,Y),ne,ce,p))});return this._consoleTask&&(ie._consoleTask=this._consoleTask),ie}return P.prototype=q,P},set:function(p){m(this,"then",p&&p.prototype===q?Wi:{get:function(){return p},set:Wi.set})}};function ui(p,w,P,I,N){this.onFulfilled=typeof p=="function"?p:null,this.onRejected=typeof w=="function"?w:null,this.resolve=P,this.reject=I,this.psd=N}function kr(p,w){var P,I;Kt.push(w),p._state===null&&(P=p._lib&&fi(),w=Xe(w),p._state=!1,p._value=w,I=p,kt.some(function(N){return N._value===I._value})||kt.push(I),vo(p),P&&pi())}function vo(p){var w=p._listeners;p._listeners=[];for(var P=0,I=w.length;P.",fn="String expected.",Yr=[],Er="__dbnames",Gi="readonly",mi="readwrite";function Wn(p,w){return p?w?function(){return p.apply(this,arguments)&&w.apply(this,arguments)}:p:w}var Rr={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function gi(p){return typeof p!="string"||/\./.test(p)?function(w){return w}:function(w){return w[p]===void 0&&p in w&&delete(w=z(w))[p],w}}function ms(){throw Pe.Type()}function Lt(p,w){try{var P=Et(p),I=Et(w);if(P!==I)return P==="Array"?1:I==="Array"?-1:P==="binary"?1:I==="binary"?-1:P==="string"?1:I==="string"?-1:P==="Date"?1:I!=="Date"?NaN:-1;switch(P){case"number":case"Date":case"string":return wbe+Se&&ve(be+ue)})})}var ye=Wo(P)&&P.limit===1/0&&(typeof p!="function"||p===bo)&&{index:P.index,range:P.range};return ve(0).then(function(){if(0=ue})).length!==0?(ce.forEach(function(ve){de.push(function(){var ye=se,be=ve._cfg.dbschema;$p(X,ye,ae),$p(X,be,ae),se=X._dbSchema=be;var Se=fc(ye,be);Se.add.forEach(function(Ke){pc(ae,Ke[0],Ke[1].primKey,Ke[1].indexes)}),Se.change.forEach(function(Ke){if(Ke.recreate)throw new Pe.Upgrade("Not yet support for changing primary key");var Me=ae.objectStore(Ke.name);Ke.add.forEach(function(Tt){return sa(Me,Tt)}),Ke.change.forEach(function(Tt){Me.deleteIndex(Tt.name),sa(Me,Tt)}),Ke.del.forEach(function(Tt){return Me.deleteIndex(Tt)})});var $e=ve._cfg.contentUpgrade;if($e&&ve._cfg.version>ue){_n(X,ae),re._memoizedTables={};var Ve=T(be);Se.del.forEach(function(Ke){Ve[Ke]=ye[Ke]}),bi(X,[X.Transaction.prototype]),Hn(X,[X.Transaction.prototype],s(Ve),Ve),re.schema=Ve;var De,Ge=Oe($e);return Ge&&He(),Se=We.follow(function(){var Ke;(De=$e(re))&&Ge&&(Ke=Qe.bind(null,null),De.then(Ke,Ke))}),De&&typeof De.then=="function"?We.resolve(De):Se.then(function(){return De})}}),de.push(function(ye){var be,Se,$e=ve._cfg.dbschema;be=$e,Se=ye,[].slice.call(Se.db.objectStoreNames).forEach(function(Ve){return be[Ve]==null&&Se.db.deleteObjectStore(Ve)}),bi(X,[X.Transaction.prototype]),Hn(X,[X.Transaction.prototype],X._storeNames,X._dbSchema),re.schema=X._dbSchema}),de.push(function(ye){X.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(X.idbdb.version/10)===ve._cfg.version?(X.idbdb.deleteObjectStore("$meta"),delete X._dbSchema.$meta,X._storeNames=X._storeNames.filter(function(be){return be!=="$meta"})):ye.objectStore("$meta").put(ve._cfg.version,"version"))})}),function ve(){return de.length?We.resolve(de.shift()(re.idbtrans)).then(ve):We.resolve()}().then(function(){sd(se,ae)})):We.resolve();var X,ue,re,ae,de,se}).catch(G)):(s(N).forEach(function(ce){pc(P,ce,N[ce].primKey,N[ce].indexes)}),_n(p,P),void We.follow(function(){return p.on.populate.fire(B)}).catch(G));var ie,ne})}function oa(p,w){sd(p._dbSchema,w),w.db.version%10!=0||w.objectStoreNames.contains("$meta")||w.db.createObjectStore("$meta").add(Math.ceil(w.db.version/10-1),"version");var P=ys(0,p.idbdb,w);$p(p,p._dbSchema,w);for(var I=0,N=fc(P,p._dbSchema).change;IMath.pow(2,62)?0:se.oldVersion,X=se<1,p.idbdb=de.result,B&&oa(p,ce),Np(p,se/10,ce,re))},re),de.onsuccess=At(function(){ce=null;var se,ve,ye,be,Se,$e=p.idbdb=de.result,Ve=x($e.objectStoreNames);if(0"u"?We.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(ue){function re(){return indexedDB.databases().finally(ue)}ie=setInterval(re,100),re()}).finally(function(){return clearInterval(ie)}):Promise.resolve()).then(Y)]).then(function(){return G(),w.onReadyBeingFired=[],We.resolve(dy(function(){return p.on.ready.fire(p.vip)})).then(function ue(){if(0w.limit?ue.length=w.limit:p.length===w.limit&&ue.length=ve.limit&&(!ve.values||$e.req.values)&&xM($e.req.query.range,ve.query.range)}),!1,ye,be];case"count":return Se=be.find(function($e){return e_($e.req.query.range,ve.query.range)}),[Se,!!Se,ye,be]}}(w,P,"query",B),ce=ne[0],X=ne[1],ue=ne[2],re=ne[3];return ce&&X?ce.obsSet=B.obsSet:(X=I.query(B).then(function(ae){var de=ae.result;if(ce&&(ce.res=de),G){for(var se=0,ve=de.length;se{var s=(async()=>{var a=nn(n);a.autoOpen=!1;var l=new D1(i,a),c={[ig]:pX(r),[cX]:"++sequence, id",[$E]:"id"};return l.version(1).stores(c),await l.open(),{dexieDb:l,dexieTable:l[ig],dexieAttachmentsTable:l[$E],booleanIndexes:hX(r)}})();return DE.set(i,o),rm.set(o,0),s});return o}async function dX(e){var t=await e,n=rm.get(e),r=n-1;r===0?(t.dexieDb.close(),rm.delete(e)):rm.set(e,r)}var A1="__";function Xu(e){var t=e.split(".");if(t.length>1)return t.map(r=>Xu(r)).join(".");if(e.startsWith("|")){var n=e.substring(1);return A1+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(A1)){var n=e.substring(A1.length);return"|"+n}else return e}function fX(e,t){if(!t)return t;var n=nn(t);return n=B1(n),e.forEach(r=>{var i=za(t,r),o=i?"1":"0",s=Xu(r);pj(n,s,o)}),n}function QL(e,t){return t&&(t=nn(t),t=F1(t),e.forEach(n=>{var r=za(t,n),i=r==="1";pj(t,n,i)}),t)}function B1(e){if(!e||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(n=>B1(n));if(typeof e=="object"){var t={};return Object.entries(e).forEach(([n,r])=>{typeof r=="object"&&(r=B1(r)),t[Xu(n)]=r}),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"||Array.isArray(e))&&(r=F1(r)),t[YL(n)]=r}),t}}function pX(e){var t=[],n=Fi(e.primaryKey);t.push([n]),t.push(["_deleted",n]),e.indexes&&e.indexes.forEach(o=>{var s=Vf(o);t.push(s)}),t.push(["_meta.lwt",n]),t.push(["_meta.lwt"]),t=t.map(o=>o.map(s=>Xu(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 AE(e,t){var n=await e,r=await n.dexieTable.bulkGet(t);return r.map(i=>QL(n.booleanIndexes,i))}function xh(e,t){return e+"||"+t}function hX(e){var t=new Set,n=[];return e.indexes?(e.indexes.forEach(r=>{var i=Vf(r);i.forEach(o=>{if(!t.has(o)){t.add(o);var s=ju(e,o);s.type==="boolean"&&n.push(o)}})}),n.push("_deleted"),Q7(n)):n}function BE(e){return e===cu?-1/0:e}function FE(e,t,n){if(e.includes(t)){var r=n===lu||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 FE(e,l,s)}).map(BE),i=t.endKeys.map((s,a)=>{var l=t.index[a];return FE(e,l,s)}).map(BE),o=n.bound(r,i,!t.inclusiveStart,!t.inclusiveEnd);return o}async function zE(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=fS(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 h=>{var m=h.idbtrans,g=m.objectStore(ig),E,b;b="["+u.map(y=>Xu(y)).join("+")+"]",E=g.index(b);var x=E.openCursor(c);await new Promise(y=>{x.onsuccess=function(_){var k=_.target.result;if(k){var O=QL(n.booleanIndexes,k.value);(!l||l(O))&&d.push(O),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 mX(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(ig),u,d;d="["+i.map(h=>Xu(h)).join("+")+"]",u=c.index(d);var f=u.count(o);s=await new Promise((h,m)=>{f.onsuccess=function(){h(f.result)},f.onerror=g=>m(g)})}),s}var gX=lr(),I0=!1,vX=function(){function e(n,r,i,o,s,a,l,c){this.changes$=new Pn,this.instanceId=gX++,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=Fi(this.schema.primaryKey)}var t=e.prototype;return t.bulkWrite=async function(r,i){dl(this),!I0&&(!b0.premium||typeof b0.premium!="string"||await lj(b0.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(` +`)),I0=!0,r.forEach(u=>{if(!u.document._rev||u.previous&&!u.previous._rev)throw st("SNH",{args:{row:u}})});var o=await this.internals,s={error:[]};this.devMode&&(r=r.map(u=>{var d=Ep(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 AE(this.internals,a);d.forEach(m=>{var g=m;return g&&u.set(g[this.primaryPath],g),g}),l=iY(this,this.primaryPath,u,r,i),s.error=l.errors;var f=[];l.bulkInsertDocs.forEach(m=>{f.push(m.document)}),l.bulkUpdateDocs.forEach(m=>{f.push(m.document)}),f=f.map(m=>fX(o.booleanIndexes,m)),f.length>0&&await o.dexieTable.bulkPut(f);var h=[];l.attachmentsAdd.forEach(m=>{h.push({id:xh(m.documentId,m.attachmentId),data:m.attachmentData.data})}),l.attachmentsUpdate.forEach(m=>{h.push({id:xh(m.documentId,m.attachmentId),data:m.attachmentData.data})}),await o.dexieAttachmentsTable.bulkPut(h),await o.dexieAttachmentsTable.bulkDelete(l.attachmentsRemove.map(m=>xh(m.documentId,m.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=lr(),this.changes$.next(l.eventBulk)}return s},t.findDocumentsById=async function(r,i){dl(this);var o=await this.internals,s=[];return await o.dexieDb.transaction("r",o.dexieTable,async()=>{var a=await AE(this.internals,r);a.forEach(l=>{l&&(!l._deleted||i)&&s.push(l)})}),s},t.query=function(r){return dl(this),zE(this,r)},t.count=async function(r){if(r.queryPlan.selectorSatisfiedByIndex){var i=await mX(this,r);return{count:i,mode:"fast"}}else{var o=await zE(this,r);return{count:o.documents.length,mode:"slow"}}},t.changeStream=function(){return dl(this),this.changes$.asObservable()},t.cleanup=async function(r){dl(this);var i=await this.internals;return await i.dexieDb.transaction("rw",i.dexieTable,async()=>{var o=lr()-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){dl(this);var s=await this.internals,a=xh(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(){dl(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 dX(this.internals)})(),this.closed)},t.conflictResultionTasks=function(){return new Pn},t.resolveConflictResultionTask=async function(r){},e}();async function yX(e,t,n){var r=uX(t.databaseName,t.collectionName,n,t.schema),i=new vX(e,t.databaseName,t.collectionName,t.schema,r,t.options,n,t.devMode);return await aX(qL,t,i),Promise.resolve(i)}function dl(e){if(e.closed)throw new Error("RxStorageInstanceDexie is closed "+e.databaseName+"-"+e.collectionName)}var bX=function(){function e(n){this.name=qL,this.rxdbVersion=hj,this.settings=n}var t=e.prototype;return t.createStorageInstance=function(r){return aY(r),yX(this,r,this.settings)},e}();function wX(e={}){var t=new bX(e);return t}var _S={minimumDeletedTime:1e3*60*60*24*31,minimumCollectionAge:1e3*60,runEach:1e3*60*5,awaitReplicationsInSync:!0,waitForLeadership:!0},JL=new WeakMap,xX=new WeakMap;function UE(e){return Gs(xX,e,()=>sX(e))}function SX(){var e=VL(this.storage.name,this.token,this.name,this),t=this.destroy.bind(this);this.destroy=function(){return N1(this.token,this),t()};var n=UE(e);return n||(n=UE(e),JL.set(this,n)),this.leaderElector=()=>n,n}function _X(){return this.multiInstance?this.leaderElector().isLeader:!0}function CX(){return this.multiInstance?this.leaderElector().awaitLeadership().then(()=>!0):zv}function kX(e){var t=JL.get(e);t&&t.die()}var EX=!0,RX={RxDatabase:e=>{e.leaderElector=SX,e.isLeader=_X,e.waitForLeadership=CX}},CS={name:"leader-election",rxdb:EX,prototypes:RX,hooks:{preDestroyRxDatabase:{after:kX}}},WE=e=>Promise.resolve(e);function GE(e,t){if(e==="_deleted")return t;t=nn(t);var n=!!t._deleted;return t[e]=n,delete t._deleted,t}function M0(e,t,n){return n.map(r=>{var i=nn(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 HE(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 kS=new WeakMap,PX=function(){function e(n,r,i,o,s,a,l,c){this.subs=[],this.subjects={received:new Pn,sent:new Pn,error:new Pn,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 Pn,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("-")),h=PY(this.collection.schema.jsonSchema,pL(this.collection.schema.jsonSchema));return{collectionName:f,schema:h}})();var u=Gs(kS,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:WE,i=this.push&&this.push.modifier?this.push.modifier:WE,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:yn.isDevMode()}),gY(this.collection,s.collectionName,s.schema)]);this.metaInstance=a,this.internalReplicationState=LY({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(Wt(l=>!!this.pull),us(async l=>{if(l==="RESYNC")return l;var c=nn(l);return c.documents=M0(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(m){var f=st("RC_PULL",{checkpoint:l,errors:Vf(m).map(g=>Yk(g)),direction:"pull"});this.subjects.error.next(f),await HE(this.collection,xt(this.retryTime))}if(this.isStopped())return{checkpoint:null,documents:[]};var h=nn(d);return h.documents=M0(this.collection,this.deletedField,h.documents),h.documents=await Promise.all(h.documents.map(m=>r(m))),h},masterWrite:async l=>{if(!this.push)return[];var c=!1;await Hs("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=GE(this.deletedField,g.newDocumentState),g.assumedMasterState&&(g.assumedMasterState=GE(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 st("RC_PUSH_NO_AR",{pushRows:l,direction:"push",args:{result:f}});c=!0}catch(g){var h=g.rxdb?g:st("RC_PUSH",{pushRows:l,errors:Vf(g).map(E=>Yk(E)),direction:"push"});this.subjects.error.next(h),await HE(this.collection,xt(this.retryTime))}if(this.isStopped())return[];await Hs("preReplicationMasterWriteDocumentsHandle",{result:f,collection:this.collection});var m=M0(this.collection,this.deletedField,xt(f));return m}}}),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 T0(this.internalReplicationState),await EE(this.internalReplicationState),await this.cancel()),this.callOnStart()}},t.isStopped=function(){return!!this.subjects.canceled.getValue()},t.awaitInitialReplication=async function(){return await this.startPromise,T0(xt(this.internalReplicationState))},t.awaitInSync=async function(){await this.startPromise,await T0(xt(this.internalReplicationState));for(var r=2;r>0;)r--,await this.collection.database.requestIdlePromise(),await EE(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 ts;var r=this.onCancel.map(i=>pH(i()));return this.internalReplicationState&&await MY(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 vY(this.collection,r.collectionName,r.schema)},e}();function TX({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(Qu(CS),!r&&!i)throw st("UT3",{collection:t.name,args:{replicationIdentifier:e}});var c=new PX(e,t,n,r,i,o,s,l);return OX(a,c),c}function OX(e,t){var n=e&&t.collection.database.multiInstance,r=n?t.collection.database.waitForLeadership():zv;return r.then(()=>{t.isStopped()||t.autoStart&&t.start()})}var N0=zv;async function jX(e){var t=e.database,n=Object.assign({},_S,t.cleanupPolicy?t.cleanupPolicy:{});await ZL(e,n),!e.destroyed&&(await eI(e,n),await LX(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=kS.get(e);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(e.destroyed)return;N0=N0.then(async()=>e.destroyed?!0:(await n.requestIdlePromise(),r.cleanup(t.minimumDeletedTime))),i=await N0}await Hs("postCleanup",{collectionName:e.name,databaseName:n.name})}async function LX(e,t){for(;!e.destroyed;){if(await e.promiseWait(t.runEach),e.destroyed)return;await eI(e,t)}}var $0=zv;async function IX(e){var t=e.collection,n=t.database,r=Object.assign({},_S,n.cleanupPolicy?n.cleanupPolicy:{});await ZL(t,r),!t.destroyed&&(await tI(e,r),await MX(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=kS.get(n);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(n.destroyed)return;$0=$0.then(async()=>n.destroyed?!0:(await r.requestIdlePromise(),e._cleanup())),i=await $0}}async function MX(e,t){for(var n=e.collection;!n.destroyed;){if(await n.promiseWait(t.runEach),n.destroyed)return;await tI(e,t)}}var NX={name:"cleanup",rxdb:!0,prototypes:{RxCollection:e=>{e.cleanup=async function(t){var n=Object.assign({},_S,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);await Hs("postCleanup",{collectionName:this.name,databaseName:this.database.name})}}},hooks:{createRxCollection:{after:e=>{jX(e.collection)}},createRxState:{after:e=>{IX(e.state)}}}},$X=["__proto__","constructor","prototype"];function zd(e,t){Object.keys(t).forEach(n=>{$X.includes(n)||(typeof e[n]>"u"?e[n]=t[n]:af(t[n])?zd(e[n],t[n]):e[n]=t[n])})}function af(e){return e.toString()==="[object Object]"}var ey=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 ki("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 ki("MQ2");var o,s,a;if(typeof arguments[0]=="function")this._ensurePath("elemMatch"),s=this._path,o=arguments[0];else if(af(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]&&af(arguments[1]))s=arguments[0],a=arguments[1];else throw ki("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;sVE(this.options,d,r[d])),this}throw ki("MQ3",{args:arguments})},t.merge=function(r){if(!r)return this;if(!KE(r))throw ki("MQ4",{source:r});return r instanceof e?(r._conditions&&zd(this._conditions,r._conditions),r._fields&&(this._fields||(this._fields={}),zd(this._fields,r._fields)),r.options&&(this.options||(this.options={}),zd(this.options,r.options)),r._distinct&&(this._distinct=r._distinct),this):(zd(this._conditions,r),this)},t.find=function(r){return KE(r)&&this.merge(r),this},t._ensurePath=function(r){if(!this._path)throw st("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){ey.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){ey.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 st("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 VE(e,t,n){if(Array.isArray(e.sort))throw ki("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+"]"),ki("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 AX(e,t,n){if(e.sort=e.sort||[],!Array.isArray(e.sort))throw ki("MQ8",{opts:e,field:t,value:n});e.sort.push([t,n])}function KE(e){return e instanceof ey||af(e)}function BX(e,t){return new ey(e,t)}var qE="queryBuilderPath";function FX(e,t,n){var r=BX(lo(e.mangoQuery),e.other[qE]);r[t](n);var i=r.toJSON();return Nc(e.op,i.query,e.collection,{...e.other,[qE]:i.path})}function D0(e,t){e[t]=function(n){if(yn.isDevMode()&&this.op==="findByIds")throw st("QU17",{collection:this.collection.name,query:this.mangoQuery});return FX(this,t,n)}}var zX={name:"query-builder",rxdb:!0,prototypes:{RxQuery(e){["where","equals","eq","or","nor","and","mod","exists","elemMatch","sort"].forEach(t=>{D0(e,t)}),nI.forEach(t=>{D0(e,t)}),rI.forEach(t=>{D0(e,t)})}}},UX=gL(),WX=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 vp(t,e),t}(UX),lf={get isLocal(){return!0},get allAttachments$(){throw st("LD1",{document:this})},get primaryPath(){return"id"},get primary(){return this.id},get $(){var e=this,t=Ws(z1,this.parent);return e.parent.$.pipe(Wt(n=>n.documentId===this.primary),Wt(n=>n.isLocal),Vt(n=>Uj(n)),Vv(t.docCache.getLatestDocumentData(this.primary)),qf((n,r)=>n._rev===r._rev),Vt(n=>t.docCache.getCachedRxDocument(n)),rS(Qx))},get $$(){var e=this,t=A0(e),n=t.getReactivityFactory();return n.fromObservable(e.$,e.getLatest()._data,t)},get deleted$$(){var e=this,t=A0(e),n=t.getReactivityFactory();return n.fromObservable(e.deleted$,e.getLatest().deleted,t)},getLatest(){var e=Ws(z1,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 ki("LD2",{objPath:e});var t=za(this._data,e);return t=yn.deepFreezeWhenDevMode(t),t}},get$(e){if(e="data."+e,yn.isDevMode()){if(e.includes(".item."))throw st("LD3",{objPath:e});if(e===this.primaryPath)throw st("LD4")}return this.$.pipe(Vt(t=>t._data),Vt(t=>za(t,e)),qf())},get$$(e){var t=A0(this),n=t.getReactivityFactory();return n.fromObservable(this.get$(e),this.getLatest().get(e),t)},async incrementalModify(e){var t=await cf(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 cf(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=Mi(this.collection.schema.primaryPath,r,i)[0];e=nn(e),e._rev=o._rev})},async remove(){var e=await cf(this.parent),t=nn(this._data);return t._deleted=!0,Xv(e.storageInstance,{previous:this._data,document:t},"local-document-remove").then(n=>e.docCache.getCachedRxDocument(n))}},YE=!1,GX=()=>{if(!YE){YE=!0;var e=Jv,t=Object.getOwnPropertyNames(e);t.forEach(r=>{var i=Object.getOwnPropertyDescriptor(lf,r);if(!i){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(lf,r,o)}});var n=r=>()=>{throw st("LD6",{functionName:r})};["populate","update","putAttachment","getAttachment","allAttachments"].forEach(r=>lf[r]=n(r))}};function HX(e,t){GX();var n=new WX(e.id,e,t);return Object.setPrototypeOf(n,lf),n.prototype=lf,n}function A0(e){var t=e.parent;return GY(t)?t:t.database}var og=new WeakMap,z1=new WeakMap;function QE(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=hS(t,i,oI);var o=new lL("id",t.eventBulks$.pipe(Wt(u=>{var d=!1;return(n===""&&!u.collectionName||n!==""&&u.collectionName===n)&&(d=!0),d&&u.events[0].isLocal}),Vt(u=>u.events)),u=>HX(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,h=e.database?e.name:void 0,m=0;mn.storageInstance.close())}async function JE(e,t,n){var r=ic(10),i=await iI(r,e,t,n,{},!1);await i.remove()}function VX(e){return"plugin-local-documents-"+e}var oI=Gv({title:"RxLocalDocument",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:128},data:{type:"object",additionalProperties:!0}},required:["id","data"]});async function ZE(e,t){var n=await cf(this),r={id:e,data:t,_deleted:!1,_meta:Vu(),_rev:Ao(),_attachments:{}};return Xv(n.storageInstance,{document:r},"local-document-insert").then(i=>n.docCache.getCachedRxDocument(i))}function eR(e,t){return this.getLocal(e).then(n=>{if(n)return n.incrementalModify(()=>t);var r=this.insertLocal(e,t);return r})}async function tR(e){var t=await cf(this),n=t.docCache,r=n.getLatestDocumentDataIfExists(e);return r?Promise.resolve(n.getCachedRxDocument(r)):Qv(t.storageInstance,e).then(i=>i?t.docCache.getCachedRxDocument(i):null)}function nR(e){return this.$.pipe(Vv(null),us(async t=>{if(t)return{changeEvent:t};var n=await this.getLocal(e);return{doc:n}}),us(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}}),Wt(t=>t.use),Vt(t=>t.doc))}var KX={name:"local-documents",rxdb:!0,prototypes:{RxCollection:e=>{e.insertLocal=ZE,e.upsertLocal=eR,e.getLocal=tR,e.getLocal$=nR},RxDatabase:e=>{e.insertLocal=ZE,e.upsertLocal=eR,e.getLocal=tR,e.getLocal$=nR}},hooks:{createRxDatabase:{before:e=>{e.creator.localDocuments&&QE(e.database)}},createRxCollection:{before:e=>{e.creator.localDocuments&&QE(e.collection)}},preDestroyRxDatabase:{after:e=>XE(e)},postDestroyRxCollection:{after:e=>XE(e)},postRemoveRxDatabase:{after:e=>JE(e.storage,e.databaseName,"")},postRemoveRxCollection:{after:e=>JE(e.storage,e.databaseName,e.collectionName)}},overwritable:{}};async function qX(e,t,n){var r=await e([t,n].join("|"))>await e([n,t].join("|"));return r}function B0(e,t,n){var r=n.id,i=Fn(e.response$.pipe(Wt(o=>o.peer===t),Wt(o=>o.response.id===r),Vt(o=>o.response)));return e.send(t,n),i}const YX="modulepreload",QX=function(e){return"/"+e},rR={},XX=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=QX(a),a in rR)return;rR[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":YX,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 Sh(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,h){if(!a[f]){if(!s[f]){var m=typeof Sh=="function"&&Sh;if(!h&&m)return m(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 x=s[f][1][b];return c(x||b)},E,E.exports,o,s,a,l)}return a[f].exports}for(var u=typeof Sh=="function"&&Sh,d=0;d>16,L[M++]=255&k>>8,L[M++]=255&k;return $===2&&(k=g[_.charCodeAt(O)]<<2|g[_.charCodeAt(O+1)]>>4,L[M++]=255&k),$===1&&(k=g[_.charCodeAt(O)]<<10|g[_.charCodeAt(O+1)]<<4|g[_.charCodeAt(O+2)]>>2,L[M++]=255&k>>8,L[M++]=255&k),L}function d(_){return m[63&_>>18]+m[63&_>>12]+m[63&_>>6]+m[63&_]}function f(_,k,O){for(var R,T=[],$=k;$M?M:L+$));return R===1?(k=_[O-1],T.push(m[k>>2]+m[63&k<<4]+"==")):R===2&&(k=(_[O-2]<<8)+_[O-1],T.push(m[k>>10]+m[63&k>>4]+m[63&k<<2]+"=")),T.join("")}a.byteLength=function(_){var k=l(_),O=k[0],R=k[1];return 3*(O+R)/4-R},a.toByteArray=u,a.fromByteArray=h;for(var m=[],g=[],E=typeof Uint8Array>"u"?Array:Uint8Array,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x=0,y=b.length;xS)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function m(S,j,A){return h(S),0>=S||j===void 0?u(S):typeof A=="string"?u(S).fill(j,A):u(S).fill(j)}function g(S){return h(S),u(0>S?0:0|_(S))}function E(S,j){if((typeof j!="string"||j==="")&&(j="utf8"),!d.isEncoding(j))throw new TypeError("Unknown encoding: "+j);var A=0|k(S,j),q=u(A),J=q.write(S,j);return J!==A&&(q=q.slice(0,J)),q}function b(S){for(var j=0>S.length?0:0|_(S.length),A=u(j),q=0;qj||S.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|S}function k(S,j){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 A=S.length,q=2>>1;case"base64":return ot(S).length;default:if(J)return q?-1:Pt(S).length;j=(""+j).toLowerCase(),J=!0}}function O(S,j,A){var q=!1;if((j===void 0||0>j)&&(j=0),j>this.length||((A===void 0||A>this.length)&&(A=this.length),0>=A)||(A>>>=0,j>>>=0,A<=j))return"";for(S||(S="utf8");;)switch(S){case"hex":return Oe(this,j,A);case"utf8":case"utf-8":return fe(this,j,A);case"ascii":return V(this,j,A);case"latin1":case"binary":return le(this,j,A);case"base64":return oe(this,j,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ue(this,j,A);default:if(q)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),q=!0}}function R(S,j,A){var q=S[j];S[j]=S[A],S[A]=q}function T(S,j,A,q,J){if(S.length===0)return-1;if(typeof A=="string"?(q=A,A=0):2147483647A&&(A=-2147483648),A=+A,me(A)&&(A=J?0:S.length-1),0>A&&(A=S.length+A),A>=S.length){if(J)return-1;A=S.length-1}else if(0>A)if(J)A=0;else return-1;if(typeof j=="string"&&(j=d.from(j,q)),d.isBuffer(j))return j.length===0?-1:$(S,j,A,q,J);if(typeof j=="number")return j&=255,typeof Uint8Array.prototype.indexOf=="function"?J?Uint8Array.prototype.indexOf.call(S,j,A):Uint8Array.prototype.lastIndexOf.call(S,j,A):$(S,[j],A,q,J);throw new TypeError("val must be string, number or Buffer")}function $(S,j,A,q,J){function pe(Xe,_t){return Fe===1?Xe[_t]:Xe.readUInt16BE(_t*Fe)}var Fe=1,it=S.length,et=j.length;if(q!==void 0&&(q=(q+"").toLowerCase(),q==="ucs2"||q==="ucs-2"||q==="utf16le"||q==="utf-16le")){if(2>S.length||2>j.length)return-1;Fe=2,it/=2,et/=2,A/=2}var je;if(J){var Ye=-1;for(je=A;jeit&&(A=it-et),je=A;0<=je;je--){for(var kt=!0,Kt=0;KtJ&&(q=J)):q=J;var pe=j.length;q>pe/2&&(q=pe/2);for(var Fe,it=0;itpe&&(Fe=pe):it===2?(et=S[J+1],(192&et)==128&&(kt=(31&pe)<<6|63&et,127kt||57343kt&&(Fe=kt)))}Fe===null?(Fe=65533,it=1):65535>>10),Fe=56320|1023&Fe),q.push(Fe),J+=it}return H(q)}function H(S){var j=S.length;if(j<=4096)return l.apply(String,S);for(var A="",q=0;qj)&&(j=0),(!A||0>A||A>q)&&(A=q);for(var J="",pe=j;peS)throw new RangeError("offset is not uint");if(S+j>A)throw new RangeError("Trying to access beyond buffer length")}function ke(S,j,A,q,J,pe){if(!d.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(j>J||jS.length)throw new RangeError("Index out of range")}function qe(S,j,A,q){if(A+q>S.length)throw new RangeError("Index out of range");if(0>A)throw new RangeError("Index out of range")}function Re(S,j,A,q,J){return j=+j,A>>>=0,J||qe(S,j,A,4),Be.write(S,j,A,q,23,4),A+4}function tt(S,j,A,q,J){return j=+j,A>>>=0,J||qe(S,j,A,8),Be.write(S,j,A,q,52,8),A+8}function at(S){if(S=S.split("=")[0],S=S.trim().replace(W,""),2>S.length)return"";for(;S.length%4!=0;)S+="=";return S}function Pe(S){return 16>S?"0"+S.toString(16):S.toString(16)}function Pt(S,j){j=j||1/0;for(var A,q=S.length,J=null,pe=[],Fe=0;FeA){if(!J){if(56319A){-1<(j-=3)&&pe.push(239,191,189),J=A;continue}A=(J-55296<<10|A-56320)+65536}else J&&-1<(j-=3)&&pe.push(239,191,189);if(J=null,128>A){if(0>(j-=1))break;pe.push(A)}else if(2048>A){if(0>(j-=2))break;pe.push(192|A>>6,128|63&A)}else if(65536>A){if(0>(j-=3))break;pe.push(224|A>>12,128|63&A>>6,128|63&A)}else if(1114112>A){if(0>(j-=4))break;pe.push(240|A>>18,128|63&A>>12,128|63&A>>6,128|63&A)}else throw new Error("Invalid code point")}return pe}function ct(S){for(var j=[],A=0;A(j-=2));++Fe)A=S.charCodeAt(Fe),q=A>>8,J=A%256,pe.push(J),pe.push(q);return pe}function ot(S){return _e.toByteArray(at(S))}function nt(S,j,A,q){for(var J=0;J=j.length||J>=S.length);++J)j[J+A]=S[J];return J}function ee(S,j){return S instanceof j||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===j.name}function me(S){return S!==S}var _e=o("base64-js"),Be=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,j,A){return f(S,j,A)},d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array,d.alloc=function(S,j,A){return m(S,j,A)},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,j){if(ee(S,Uint8Array)&&(S=d.from(S,S.offset,S.byteLength)),ee(j,Uint8Array)&&(j=d.from(j,j.offset,j.byteLength)),!d.isBuffer(S)||!d.isBuffer(j))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===j)return 0;for(var A=S.length,q=j.length,J=0,pe=c(A,q);Jj&&(S+=" ... "),""},d.prototype.compare=function(S,j,A,q,J){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(j===void 0&&(j=0),A===void 0&&(A=S?S.length:0),q===void 0&&(q=0),J===void 0&&(J=this.length),0>j||A>S.length||0>q||J>this.length)throw new RangeError("out of range index");if(q>=J&&j>=A)return 0;if(q>=J)return-1;if(j>=A)return 1;if(j>>>=0,A>>>=0,q>>>=0,J>>>=0,this===S)return 0;for(var pe=J-q,Fe=A-j,it=c(pe,Fe),et=this.slice(q,J),je=S.slice(j,A),Ye=0;Ye>>=0,isFinite(A)?(A>>>=0,q===void 0&&(q="utf8")):(q=A,A=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var J=this.length-j;if((A===void 0||A>J)&&(A=J),0A||0>j)||j>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,j,A);case"utf8":case"utf-8":return M(this,S,j,A);case"ascii":return F(this,S,j,A);case"latin1":case"binary":return z(this,S,j,A);case"base64":return K(this,S,j,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,S,j,A);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,j){var A=this.length;S=~~S,j=j===void 0?A:~~j,0>S?(S+=A,0>S&&(S=0)):S>A&&(S=A),0>j?(j+=A,0>j&&(j=0)):j>A&&(j=A),j>>=0,j>>>=0,A||Te(S,j,this.length);for(var q=this[S],J=1,pe=0;++pe>>=0,j>>>=0,A||Te(S,j,this.length);for(var q=this[S+--j],J=1;0>>=0,j||Te(S,1,this.length),this[S]},d.prototype.readUInt16LE=function(S,j){return S>>>=0,j||Te(S,2,this.length),this[S]|this[S+1]<<8},d.prototype.readUInt16BE=function(S,j){return S>>>=0,j||Te(S,2,this.length),this[S]<<8|this[S+1]},d.prototype.readUInt32LE=function(S,j){return S>>>=0,j||Te(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+16777216*this[S+3]},d.prototype.readUInt32BE=function(S,j){return S>>>=0,j||Te(S,4,this.length),16777216*this[S]+(this[S+1]<<16|this[S+2]<<8|this[S+3])},d.prototype.readIntLE=function(S,j,A){S>>>=0,j>>>=0,A||Te(S,j,this.length);for(var q=this[S],J=1,pe=0;++pe=J&&(q-=i(2,8*j)),q},d.prototype.readIntBE=function(S,j,A){S>>>=0,j>>>=0,A||Te(S,j,this.length);for(var q=j,J=1,pe=this[S+--q];0=J&&(pe-=i(2,8*j)),pe},d.prototype.readInt8=function(S,j){return S>>>=0,j||Te(S,1,this.length),128&this[S]?-1*(255-this[S]+1):this[S]},d.prototype.readInt16LE=function(S,j){S>>>=0,j||Te(S,2,this.length);var A=this[S]|this[S+1]<<8;return 32768&A?4294901760|A:A},d.prototype.readInt16BE=function(S,j){S>>>=0,j||Te(S,2,this.length);var A=this[S+1]|this[S]<<8;return 32768&A?4294901760|A:A},d.prototype.readInt32LE=function(S,j){return S>>>=0,j||Te(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},d.prototype.readInt32BE=function(S,j){return S>>>=0,j||Te(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},d.prototype.readFloatLE=function(S,j){return S>>>=0,j||Te(S,4,this.length),Be.read(this,S,!0,23,4)},d.prototype.readFloatBE=function(S,j){return S>>>=0,j||Te(S,4,this.length),Be.read(this,S,!1,23,4)},d.prototype.readDoubleLE=function(S,j){return S>>>=0,j||Te(S,8,this.length),Be.read(this,S,!0,52,8)},d.prototype.readDoubleBE=function(S,j){return S>>>=0,j||Te(S,8,this.length),Be.read(this,S,!1,52,8)},d.prototype.writeUIntLE=function(S,j,A,q){if(S=+S,j>>>=0,A>>>=0,!q){var J=i(2,8*A)-1;ke(this,S,j,A,J,0)}var pe=1,Fe=0;for(this[j]=255&S;++Fe>>=0,A>>>=0,!q){var J=i(2,8*A)-1;ke(this,S,j,A,J,0)}var pe=A-1,Fe=1;for(this[j+pe]=255&S;0<=--pe&&(Fe*=256);)this[j+pe]=255&S/Fe;return j+A},d.prototype.writeUInt8=function(S,j,A){return S=+S,j>>>=0,A||ke(this,S,j,1,255,0),this[j]=255&S,j+1},d.prototype.writeUInt16LE=function(S,j,A){return S=+S,j>>>=0,A||ke(this,S,j,2,65535,0),this[j]=255&S,this[j+1]=S>>>8,j+2},d.prototype.writeUInt16BE=function(S,j,A){return S=+S,j>>>=0,A||ke(this,S,j,2,65535,0),this[j]=S>>>8,this[j+1]=255&S,j+2},d.prototype.writeUInt32LE=function(S,j,A){return S=+S,j>>>=0,A||ke(this,S,j,4,4294967295,0),this[j+3]=S>>>24,this[j+2]=S>>>16,this[j+1]=S>>>8,this[j]=255&S,j+4},d.prototype.writeUInt32BE=function(S,j,A){return S=+S,j>>>=0,A||ke(this,S,j,4,4294967295,0),this[j]=S>>>24,this[j+1]=S>>>16,this[j+2]=S>>>8,this[j+3]=255&S,j+4},d.prototype.writeIntLE=function(S,j,A,q){if(S=+S,j>>>=0,!q){var J=i(2,8*A-1);ke(this,S,j,A,J-1,-J)}var pe=0,Fe=1,it=0;for(this[j]=255&S;++peS&&it===0&&this[j+pe-1]!==0&&(it=1),this[j+pe]=255&(S/Fe>>0)-it;return j+A},d.prototype.writeIntBE=function(S,j,A,q){if(S=+S,j>>>=0,!q){var J=i(2,8*A-1);ke(this,S,j,A,J-1,-J)}var pe=A-1,Fe=1,it=0;for(this[j+pe]=255&S;0<=--pe&&(Fe*=256);)0>S&&it===0&&this[j+pe+1]!==0&&(it=1),this[j+pe]=255&(S/Fe>>0)-it;return j+A},d.prototype.writeInt8=function(S,j,A){return S=+S,j>>>=0,A||ke(this,S,j,1,127,-128),0>S&&(S=255+S+1),this[j]=255&S,j+1},d.prototype.writeInt16LE=function(S,j,A){return S=+S,j>>>=0,A||ke(this,S,j,2,32767,-32768),this[j]=255&S,this[j+1]=S>>>8,j+2},d.prototype.writeInt16BE=function(S,j,A){return S=+S,j>>>=0,A||ke(this,S,j,2,32767,-32768),this[j]=S>>>8,this[j+1]=255&S,j+2},d.prototype.writeInt32LE=function(S,j,A){return S=+S,j>>>=0,A||ke(this,S,j,4,2147483647,-2147483648),this[j]=255&S,this[j+1]=S>>>8,this[j+2]=S>>>16,this[j+3]=S>>>24,j+4},d.prototype.writeInt32BE=function(S,j,A){return S=+S,j>>>=0,A||ke(this,S,j,4,2147483647,-2147483648),0>S&&(S=4294967295+S+1),this[j]=S>>>24,this[j+1]=S>>>16,this[j+2]=S>>>8,this[j+3]=255&S,j+4},d.prototype.writeFloatLE=function(S,j,A){return Re(this,S,j,!0,A)},d.prototype.writeFloatBE=function(S,j,A){return Re(this,S,j,!1,A)},d.prototype.writeDoubleLE=function(S,j,A){return tt(this,S,j,!0,A)},d.prototype.writeDoubleBE=function(S,j,A){return tt(this,S,j,!1,A)},d.prototype.copy=function(S,j,A,q){if(!d.isBuffer(S))throw new TypeError("argument should be a Buffer");if(A||(A=0),q||q===0||(q=this.length),j>=S.length&&(j=S.length),j||(j=0),0j)throw new RangeError("targetStart out of bounds");if(0>A||A>=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-jJ||q==="latin1")&&(S=J)}}else typeof S=="number"&&(S&=255);if(0>j||this.length>>=0,A=A===void 0?this.length:A>>>0,S||(S=0);var pe;if(typeof S=="number")for(pe=j;pe{g==="%%"||(h++,g==="%c"&&(m=h))}),d.splice(m,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,x=b-(h||b);E.diff=x,E.prev=h,E.curr=b,h=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,O)=>{if(k==="%%")return"%";y++;const R=l.formatters[O];if(typeof R=="function"){const T=g[y];k=R.call(E,T),g.splice(y,1),y--}return k}),l.formatArgs.call(E,g),(E.log||l.log).apply(E,g)}let h,m=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:()=>m===null?l.enabled(d):m,set:g=>{m=g}}),typeof l.init=="function"&&l.init(f),f}function c(d,f){const h=l(this.namespace+(typeof f>"u"?":":f)+d);return h.log=this.log,h}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 h=(typeof d=="string"?d:"").split(/[\s,]+/),m=h.length;for(f=0;f{l[d]=a[d]}),l.names=[],l.skips=[],l.formatters={},l.selectColor=function(d){let f=0;for(let h=0;hK&&!oe.warned){oe.warned=!0;var fe=new Error("Possible EventEmitter memory leak detected. "+oe.length+" "+(M+" listeners added. Use emitter.setMaxListeners() to increase limit"));fe.name="MaxListenersExceededWarning",fe.emitter=L,fe.type=M,fe.count=oe.length,a(fe)}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 h(L,M,F){var z={fired:!1,wrapFn:void 0,target:L,type:M,listener:F},K=f.bind(z);return K.listener=F,z.wrapFn=K,K}function m(L,M,F){var z=L._events;if(z===void 0)return[];var K=z[M];return K===void 0?[]:typeof K=="function"?F?[K.listener||K]:[K]:F?x(K):E(K,K.length)}function g(L){var M=this._events;if(M!==void 0){var F=M[L];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}function E(L,M){for(var F=Array(M),z=0;zL||T(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||T(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 M=[],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,oe||M)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(L){var M,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 h,m,g=8*f-d-1,E=(1<>1,x=-7,y=u?f-1:0,_=u?-1:1,k=l[c+y];for(y+=_,h=k&(1<<-x)-1,k>>=-x,x+=g;0>=-x,x+=d;0>1,O=f===23?i(2,-24)-i(2,-77):0,R=d?0:h-1,T=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,m=_):(m=n(x(c)/b),1>c*(E=i(2,-m))&&(m--,E*=2),c+=1<=m+k?O/E:O*i(2,1-k),2<=c*E&&(m++,E/=2),m+k>=_?(g=0,m=_):1<=m+k?(g=(c*E-1)*i(2,f),m+=k):(g=c*i(2,k-1)*i(2,f),m=0));8<=f;l[u+R]=255&g,R+=T,g/=256,f-=8);for(m=m<=1.5*m?"s":"")}s.exports=function(f,h){h=h||{};var m=typeof f;if(m=="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 xr>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:xr)},{}],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 h=c.allocUnsafe(d);if(0"u"?typeof self>"u"?typeof window>"u"?{}:window:self:xr)},{_process:12,"safe-buffer":30}],15:[function(o,s){function a(m,g){m.prototype=Object.create(g.prototype),m.prototype.constructor=m,m.__proto__=g}function l(m,g,E){function b(y,_,k){return typeof g=="string"?g:g(y,_,k)}E||(E=Error);var x=function(y){function _(k,O,R){return y.call(this,b(k,O,R))||this}return a(_,y),_}(E);x.prototype.name=E.name,x.prototype.code=m,h[m]=x}function c(m,g){if(Array.isArray(m)){var E=m.length;return m=m.map(function(b){return b+""}),2m.length)&&(E=m.length),m.substring(E-g.length,E)===g}function f(m,g,E){return typeof E!="number"&&(E=0),!(E+g.length>m.length)&&m.indexOf(g,E)!==-1}var h={};l("ERR_INVALID_OPT_VALUE",function(m,g){return'The value "'+g+'" is invalid for option "'+m+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(m,g,E){var b;typeof g=="string"&&u(g,"not ")?(b="must not be",g=g.replace(/^not /,"")):b="must be";var x;if(d(m," argument"))x="The ".concat(m," ").concat(b," ").concat(c(g,"type"));else{var y=f(m,".")?"property":"argument";x='The "'.concat(m,'" ').concat(y," ").concat(b," ").concat(c(g,"type"))}return x+=". Received type ".concat(typeof E),x},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(m){return"The "+m+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(m){return"Cannot call "+m+" 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(m){return"Unknown encoding: "+m},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),s.exports.codes=h},{}],16:[function(o,s){(function(a){(function(){function l(b){return this instanceof l?(f.call(this,b),h.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 x=[];for(var y in b)x.push(y);return x};s.exports=l;var f=o("./_stream_readable"),h=o("./_stream_writable");o("inherits")(l,f);for(var m,g=d(h.prototype),E=0;E>>1,W|=W>>>2,W|=W>>>4,W|=W>>>8,W|=W>>>16,W++),W}function x(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 j=S.decoder.end();j&&j.length&&(S.buffer.push(j),S.length+=S.objectMode?1:j.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 O(W,S){S.readingMore||(S.readingMore=!0,a.nextTick(R,W,S))}function R(W,S){for(;!S.reading&&!S.ended&&(S.length=S.length?(j=S.decoder?S.buffer.join(""):S.buffer.length===1?S.buffer.first():S.buffer.concat(S.length),S.buffer.clear()):j=S.buffer.consume(W,S.decoder),j}function Z(W){var S=W._readableState;V("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,a.nextTick(oe,S,W))}function oe(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 j=S._writableState;(!j||j.autoDestroy&&j.finished)&&S.destroy()}}function fe(W,S){for(var j=0,A=W.length;j=S.highWaterMark)||S.ended))return V("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?Z(this):_(this),null;if(W=x(W,S),W===0&&S.ended)return S.length===0&&Z(this),null;var A=S.needReadable;V("need readable",A),(S.length===0||S.length-W"u"?typeof self>"u"?typeof window>"u"?{}:window:self:xr)},{"../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,x){var y=this._transformState;y.transforming=!1;var _=y.writecb;if(_===null)return this.emit("error",new h);y.writechunk=null,y.writecb=null,x!=null&&this.push(x),_(b);var k=this._readableState;k.reading=!1,(k.needReadable||k.length"u"?typeof self>"u"?typeof window>"u"?{}:window:self:xr)},{"../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(T,$,L){return $ in T?Object.defineProperty(T,$,{value:L,enumerable:!0,configurable:!0,writable:!0}):T[$]=L,T}function c(T,$){return{value:T,done:$}}function u(T){var $=T[g];if($!==null){var L=T[k].read();L!==null&&(T[y]=null,T[g]=null,T[E]=null,$(c(L,!1)))}}function d(T){a.nextTick(u,T)}function f(T,$){return function(L,M){T.then(function(){return $[x]?void L(c(void 0,!0)):void $[_](L,M)},M)}}var h,m=o("./end-of-stream"),g=Symbol("lastResolve"),E=Symbol("lastReject"),b=Symbol("error"),x=Symbol("ended"),y=Symbol("lastPromise"),_=Symbol("handlePromise"),k=Symbol("stream"),O=Object.getPrototypeOf(function(){}),R=Object.setPrototypeOf((h={get stream(){return this[k]},next:function(){var T=this,$=this[b];if($!==null)return Promise.reject($);if(this[x])return Promise.resolve(c(void 0,!0));if(this[k].destroyed)return new Promise(function(z,K){a.nextTick(function(){T[b]?K(T[b]):z(c(void 0,!0))})});var L,M=this[y];if(M)L=new Promise(f(M,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(h,Symbol.asyncIterator,function(){return this}),l(h,"return",function(){var T=this;return new Promise(function($,L){T[k].destroy(null,function(M){return M?void L(M):void $(c(void 0,!0))})})}),h),O);s.exports=function(T){var $,L=Object.create(R,($={},l($,k,{value:T,writable:!0}),l($,g,{value:null,writable:!0}),l($,E,{value:null,writable:!0}),l($,b,{value:null,writable:!0}),l($,x,{value:T._readableState.endEmitted,writable:!0}),l($,_,{value:function(M,F){var z=L[k].read();z?(L[y]=null,L[g]=null,L[E]=null,M(c(z,!1))):(L[g]=M,L[E]=F)},writable:!0}),$));return L[y]=null,m(T,function(M){if(M&&M.code!=="ERR_STREAM_PREMATURE_CLOSE"){var F=L[E];return F!==null&&(L[y]=null,L[g]=null,L[E]=null,F(M)),void(L[b]=M)}var z=L[g];z!==null&&(L[y]=null,L[g]=null,L[E]=null,z(c(void 0,!0))),L[x]=!0}),T.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 O=Object.getOwnPropertySymbols(y);_&&(O=O.filter(function(R){return Object.getOwnPropertyDescriptor(y,R).enumerable})),k.push.apply(k,O)}return k}function l(y){for(var _,k=1;k>>0),O=this.head,R=0;O;)h(O.data,k,R),R+=O.data.length,O=O.next;return k}},{key:"consume",value:function(_,k){var O;return _T.length?T.length:_;if(R+=$===T.length?T:T.slice(0,_),_-=$,_===0){$===T.length?(++O,this.head=k.next?k.next:this.tail=null):(this.head=k,k.data=T.slice($));break}++O}return this.length-=O,R}},{key:"_getBuffer",value:function(_){var k=g.allocUnsafe(_),O=this.head,R=1;for(O.data.copy(k),_-=O.data.length;O=O.next;){var T=O.data,$=_>T.length?T.length:_;if(T.copy(k,k.length-_,0,$),_-=$,_===0){$===T.length?(++R,this.head=O.next?O.next:this.tail=null):(this.head=O,O.data=T.slice($));break}++R}return this.length-=R,k}},{key:x,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 h=this,m=this._readableState&&this._readableState.destroyed,g=this._writableState&&this._writableState.destroyed;return m||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?h._writableState?h._writableState.errorEmitted?a.nextTick(c,h):(h._writableState.errorEmitted=!0,a.nextTick(l,h,E)):a.nextTick(l,h,E):f?(a.nextTick(c,h),f(E)):a.nextTick(c,h)}),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 h=d._readableState,m=d._writableState;h&&h.autoDestroy||m&&m.autoDestroy?d.destroy(f):d.emit("error",f)}}}).call(this)}).call(this,o("_process"))},{_process:12}],24:[function(o,s){function a(f){var h=!1;return function(){if(!h){h=!0;for(var m=arguments.length,g=Array(m),E=0;Ey.length)throw new E("streams");var O,R=y.map(function(T,$){var L=$h){var m=f?d:"highWaterMark";throw new l(m,h)}return n(h)}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,h){for(var m in f)h[m]=f[m]}function c(f,h,m){return d(f,h,m)}/*! 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,h,m){if(typeof f=="number")throw new TypeError("Argument must not be a number");return d(f,h,m)},c.alloc=function(f,h,m){if(typeof f!="number")throw new TypeError("Argument must be a number");var g=d(f);return h===void 0?g.fill(0):typeof m=="string"?g.fill(h,m):g.fill(h),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(R){if(!R)return"utf8";for(var T;;)switch(R){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 R;default:if(T)return;R=(""+R).toLowerCase(),T=!0}}function c(R){var T=l(R);if(typeof T!="string"&&(k.isEncoding===O||!O(R)))throw new Error("Unknown encoding: "+R);return T||R}function u(R){this.encoding=c(R);var T;switch(this.encoding){case"utf16le":this.text=g,this.end=E,T=4;break;case"utf8":this.fillLast=m,T=4;break;case"base64":this.text=b,this.end=x,T=3;break;default:return this.write=y,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=k.allocUnsafe(T)}function d(R){return 127>=R?0:R>>5==6?2:R>>4==14?3:R>>3==30?4:R>>6==2?-1:-2}function f(R,T,$){var L=T.length-1;if(L<$)return 0;var M=d(T[L]);return 0<=M?(0=L)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1],$.slice(0,-1)}return $}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=R[R.length-1],R.toString("utf16le",T,R.length-1)}function E(R){var T=R&&R.length?this.write(R):"";if(this.lastNeed){var $=this.lastTotal-this.lastNeed;return T+this.lastChar.toString("utf16le",0,$)}return T}function b(R,T){var $=(R.length-T)%3;return $==0?R.toString("base64",T):(this.lastNeed=3-$,this.lastTotal=3,$==1?this.lastChar[0]=R[R.length-1]:(this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1]),R.toString("base64",T,R.length-$))}function x(R){var T=R&&R.length?this.write(R):"";return this.lastNeed?T+this.lastChar.toString("base64",0,3-this.lastNeed):T}function y(R){return R.toString(this.encoding)}function _(R){return R&&R.length?this.write(R):""}var k=o("safe-buffer").Buffer,O=k.isEncoding||function(R){switch(R=""+R,R&&R.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(R){if(R.length===0)return"";var T,$;if(this.lastNeed){if(T=this.fillLast(R),T===void 0)return"";$=this.lastNeed,this.lastNeed=0}else $=0;return $"u"?typeof self>"u"?typeof window>"u"?{}:window:self:xr)},{}],"/":[function(o,s){function a(x){return x.replace(/a=ice-options:trickle\s\n/g,"")}function l(x){console.warn(x)}/*! simple-peer. MIT License. Feross Aboukhadijeh */const c=o("debug")("simple-peer"),u=o("get-browser-rtc"),d=o("randombytes"),f=o("readable-stream"),h=o("queue-microtask"),m=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 m(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(m(_,"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(m(_,"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 m(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(m(_,"ERR_SET_REMOTE_DESCRIPTION"))}),y.sdp||y.candidate||y.renegotiate||y.transceiverRequest||this.destroy(m(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(m(k,"ERR_ADD_ICE_CANDIDATE"))})}send(y){if(!this.destroying){if(this.destroyed)throw m(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(y)}}addTransceiver(y,_){if(!this.destroying){if(this.destroyed)throw m(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(m(k,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:y,init:_}})}}addStream(y){if(!this.destroying){if(this.destroyed)throw m(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 m(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const k=this._senderMap.get(y)||new Map;let O=k.get(_);if(!O)O=this._pc.addTrack(y,_),k.set(_,O),this._senderMap.set(y,k),this._needsNegotiation();else throw O.removed?m(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):m(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 m(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const O=this._senderMap.get(y),R=O?O.get(k):null;if(!R)throw m(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");_&&this._senderMap.set(_,O),R.replaceTrack==null?this.destroy(m(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):R.replaceTrack(_)}removeTrack(y,_){if(this.destroying)return;if(this.destroyed)throw m(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const k=this._senderMap.get(y),O=k?k.get(_):null;if(!O)throw m(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{O.removed=!0,this._pc.removeTrack(O)}catch(R){R.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(O):this.destroy(m(R,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(y){if(!this.destroying){if(this.destroyed)throw m(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,h(()=>{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 m(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)),h(()=>{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(m(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 O=k.error instanceof Error?k.error:new Error(`Datachannel error: ${k.message} ${k.filename}:${k.lineno}:${k.colno}`);this.destroy(m(O,"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(m(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(y)}catch(O){return this.destroy(m(O,"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(m(k,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(y=>{this.destroy(m(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(m(k,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(y=>{this.destroy(m(y,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(m(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(m(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),y==="closed"&&this.destroy(m(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(y){const _=k=>(Object.prototype.toString.call(k.values)==="[object Array]"&&k.values.forEach(O=>{Object.assign(k,O)}),k);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(k=>{const O=[];k.forEach(R=>{O.push(_(R))}),y(null,O)},k=>y(k)):0{if(this.destroyed)return;const O=[];k.result().forEach(R=>{const T={};R.names().forEach($=>{T[$]=R.stat($)}),T.id=R.id,T.type=R.type,T.timestamp=R.timestamp,O.push(_(T))}),y(null,O)},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 O={},R={},T={};let $=!1;k.forEach(M=>{(M.type==="remotecandidate"||M.type==="remote-candidate")&&(O[M.id]=M),(M.type==="localcandidate"||M.type==="local-candidate")&&(R[M.id]=M),(M.type==="candidatepair"||M.type==="candidate-pair")&&(T[M.id]=M)});const L=M=>{$=!0;let F=R[M.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 M.googLocalAddress=="string"&&(F=M.googLocalAddress.split(":"),this.localAddress=F[0],this.localPort=+F[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let z=O[M.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 M.googRemoteAddress=="string"&&(z=M.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(M=>{M.type==="transport"&&M.selectedCandidatePairId&&L(T[M.selectedCandidatePairId]),(M.type==="googCandidatePair"&&M.googActiveConnection==="true"||(M.type==="candidatepair"||M.type==="candidate-pair")&&M.selected)&&L(M)}),!$&&(!Object.keys(T).length||Object.keys(R).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(m(F,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const M=this._cb;this._cb=null,M(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(_),h(()=>{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 JX=sI.exports;const ZX=Ga(JX);var eJ=ZX;function F0(e,t){e.send(JSON.stringify(t))}var aI="signaling.rxdb.info",iR="wss://"+aI+"/",oR=!1,tJ=1e3*60*2;function nJ({signalingServerUrl:e,wrtc:t,config:n,webSocketConstructor:r}){rJ(),e=e||iR,r=r||WebSocket,e.includes(aI)&&!oR&&(oR=!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 "+iR,"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 Pn,a=new Pn,l=new Pn,c=new Pn,u=new Pn,d=new Map,f=!1,h,m=void 0;g(),(async()=>{for(;await cj(tJ/2),!f;)m&&F0(m,{type:"ping"})})();function g(){f||(m=new r(e),m.onclose=()=>g(),m.onopen=()=>{xt(m).onmessage=b=>{var x=JSON.parse(b.data);switch(x.type){case"init":h=x.yourPeerId,F0(xt(m),{type:"join",room:o.topic});break;case"joined":var y=function(k){var O=!1,R=new eJ({initiator:k>h,wrtc:t,config:n,trickle:!0});R.id=ic(10),d.set(k,R),R.on("signal",T=>{F0(xt(m),{type:"signal",senderPeerId:h,receiverPeerId:k,room:o.topic,data:T})}),R.on("data",T=>{T=JSON.parse(T.toString()),T.result?c.next({peer:R,response:T}):l.next({peer:R,message:T})}),R.on("error",T=>{u.next(st("RC_WEBRTC_PEER",{error:T})),R.destroy(),O||(O=!0,a.next(R))}),R.on("connect",()=>{s.next(R)}),R.on("close",()=>{O||(O=!0,a.next(R)),y(k)})};x.otherPeerIds.forEach(k=>{k===h||d.has(k)||y(k)});break;case"signal":var _=Ws(d,x.senderPeerId);_.signal(x.data);break}}})}var E={error$:u,connect$:s,disconnect$:a,message$:l,response$:c,async send(b,x){await b.send(JSON.stringify(x))},destroy(){return f=!0,xt(m).close(),u.complete(),s.complete(),a.complete(),l.complete(),c.complete(),Pi}};return E};return i}function rJ(){if(typeof Ro>"u"||typeof Ro.nextTick!="function")throw st("RC7")}async function iJ(e){var t=e.collection;Qu(CS),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=ic(10);function i(){var l=n++;return t.database.token+"|"+r+"|"+l}var o=await t.database.storageToken,s=new oJ(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(Wt(l=>l.message.method==="token")).subscribe(l=>{s.connectionHandler.send(l.peer,{id:l.message.id,result:o})}));var a=s.connectionHandler.connect$.pipe(Wt(()=>!s.canceled)).subscribe(async l=>{if(e.isPeerValid){var c=await e.isPeerValid(l);if(!c)return}var u;try{var d=await B0(s.connectionHandler,l,{id:i(),method:"token",params:[]});u=d.result}catch(b){s.error$.next(st("RC_WEBRTC_PEER",{error:b}));return}var f=await qX(t.database.hashFunction,o,u),h;if(f){var m=s.masterReplicationHandler,g=m.masterChangeStream$.subscribe(b=>{var x={id:"masterChangeStream$",result:b};s.connectionHandler.send(l,x)});s.subs.push(g,s.connectionHandler.disconnect$.pipe(Wt(b=>b===l)).subscribe(()=>g.unsubscribe()));var E=s.connectionHandler.message$.pipe(Wt(b=>b.peer===l),Wt(b=>b.message.method!=="token")).subscribe(async b=>{var{peer:x,message:y}=b,_=m[y.method].bind(m),k=await _(...y.params),O={id:y.id,result:k};s.connectionHandler.send(x,O)});s.subs.push(E)}else h=TX({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 x=await B0(s.connectionHandler,l,{method:"masterChangesSince",params:[b,xt(e.pull).batchSize],id:i()});return x.result},stream$:s.connectionHandler.response$.pipe(Wt(b=>b.response.id==="masterChangeStream$"),Vt(b=>b.response.result))}):void 0,push:e.push?Object.assign({},e.push,{async handler(b){var x=await B0(s.connectionHandler,l,{method:"masterWrite",params:[b],id:i()});return x.result}}):void 0});s.addPeer(l,h)});return s.subs.push(a),s}var oJ=function(){function e(n,r,i){this.peerStates$=new ks(new Map),this.canceled=!1,this.subs=[],this.error$=new Pn,this.collection=n,this.options=r,this.connectionHandler=i,this.collection.onDestroy.push(()=>this.cancel()),this.masterReplicationHandler=IY(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 Fn(this.peerStates$.pipe(Wt(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}();Qu(NX);Qu(zX);Qu(CS);Qu(KX);function sJ(e){return Promise.all(e.character_traits.map(t=>t.split(/[[\]]/)).map(async([t,n])=>{const r=await an.character_traits.findOne(t.trim()).exec();return Object.assign({},r==null?void 0:r.toMutableJSON(),{parameter:n==null?void 0:n.trim()})}))}const aJ={expand:async function(){const e=await an.getLocal("gbdata_meta"),[t,n]=await Promise.all([this.populate("character_plays").then(i=>i.map(o=>o.toMutableJSON())),sJ(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")})}},lJ={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"]},cJ={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"]},uJ={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"]},dJ={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"]},fJ={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"]}}},an=await UY({name:"gb_playbook",localDocuments:!0,storage:wX()});await an.addCollections({guilds:{schema:cJ},models:{schema:lJ,methods:aJ},character_plays:{schema:uJ},character_traits:{schema:dJ},game_state:{schema:fJ,localDocuments:!0}});const pJ={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 ES(e,t){return iJ({collection:an.game_state,connectionHandlerCreator:nJ({signalingServerUrl:e,config:pJ}),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({}),hJ=e=>{const t=C.useMemo(()=>an.getLocal$("settings"),[]);return C.useEffect(()=>{if(!t)return;const n=t.subscribe(r=>{if(!r){an==null||an.upsertLocal("settings",cI).catch(console.error);return}});return()=>n.unsubscribe()},[t]),v.jsx(lI.Provider,{value:{setting$:t},children:e.children})},ci=()=>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"},RS=C.createContext(null),hs=e=>{const t=C.useContext(RS);return v.jsx(Px,{container:t,children:e.children})},mJ=It.forwardRef((e,t)=>v.jsx(yF,{position:"static",className:"no-print",children:v.jsxs(_F,{variant:"dense",children:[v.jsx(tn,{ref:t,sx:{display:"flex",flexDirection:"row",width:"100%"}}),v.jsx(Fo,{size:"small",color:"inherit",onClick:e.onClick,children:v.jsx(EO,{})})]})})),sR=It.forwardRef((e,t)=>{const{href:n,...r}=e;return v.jsx(ST,{ref:t,to:n,...r,role:void 0})}),gJ=wx({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:sR}},MuiButtonBase:{defaultProps:{LinkComponent:sR}}}}),_h=e=>v.jsx(OA,{to:e.to,style:{textDecoration:"inherit",color:"inherit"},onClick:e.onClick,children:({isActive:t})=>v.jsx(rz,{selected:t,children:e.children})}),vJ=()=>{const[e,t]=C.useState(null),[n,r]=C.useState(!1);return v.jsxs(Cz,{theme:gJ,children:[v.jsx(sW,{}),v.jsxs("div",{className:"App",children:[v.jsx(mJ,{ref:i=>t(i),onClick:()=>r(!0)}),v.jsx(yJ,{drawer:n,setDrawer:r}),v.jsx(RS.Provider,{value:e,children:v.jsx(ex,{})})]})]})};function yJ(e){const{drawer:t,setDrawer:n}=e,{setting$:r}=ci(),[i,o]=C.useState(),[s,a]=C.useState();return C.useEffect(()=>{const l=r==null?void 0:r.pipe(Vt(u=>u==null?void 0:u.toJSON().data.gamePlayRoute)).subscribe(u=>o(u)),c=r==null?void 0:r.pipe(Vt(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(ef,{children:[v.jsxs(So,{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(Ct,{variant:"h6",fontFamily:"Comfortaa",children:"GB Playbook"})})]}),v.jsx(Lo,{}),v.jsx(_h,{to:i??"/game",onClick:()=>n(!1),children:v.jsx(Ss,{children:"Game Play"})}),v.jsx(_h,{to:s??"/library",onClick:()=>n(!1),children:v.jsx(Ss,{children:"Library"})}),v.jsx(_h,{to:"/print",onClick:()=>n(!1),children:v.jsx(Ss,{children:"Card Printer"})}),v.jsx(_h,{to:"/settings",onClick:()=>n(!1),children:v.jsx(Ss,{children:"Settings"})}),v.jsx("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"1em"},children:v.jsx(So,{disablePadding:!0,children:v.jsx(Eo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://github.com/cleech/GBPlaybook/blob/pwa/README.md",children:"About"})})})]}),v.jsx(Lo,{}),v.jsxs(ef,{children:[v.jsx(So,{children:v.jsx(Ss,{children:"Rules Documents:"})}),v.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[v.jsx(So,{disablePadding:!0,children:v.jsx(Eo,{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(So,{disablePadding:!0,children:v.jsx(Eo,{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(So,{disablePadding:!0,children:v.jsx(Eo,{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(ef,{children:[v.jsx(So,{children:v.jsx(Ss,{children:"Community Links:"})}),v.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[v.jsx(So,{disablePadding:!0,children:v.jsx(Eo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://steamforged.com/pages/guild-ball",children:"Steamforged Games"})}),v.jsx(So,{disablePadding:!0,children:v.jsx(Eo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://discord.gg/fvpFSfm976",children:"Guild Ball Community Project"})}),v.jsx(So,{disablePadding:!0,children:v.jsx(Eo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://www.longshanks.org/systems/guildball/",children:"Longshanks"})})]})]})]})}const bJ=zn(v.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),wJ=zn([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=zn([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"),PS=zn(v.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),sc=zn(v.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),xJ=zn(v.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),SJ=zn(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"),_J=zn(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"),CJ=new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1});function im(e){return e===0?1:e*im(e-1)}function kJ(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=>im(r)/(im(l)*im(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 aR(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(Gf,{size:"small",variant:"contained",children:[v.jsx(vn,{onClick:i=>{i.stopPropagation(),r(t-1)&&n(t-1)},children:v.jsx(xJ,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(vn,{disabled:!0,size:"small",children:v.jsx(Ct,{variant:"body2",color:"text.primary",children:t})}),v.jsx(vn,{onClick:i=>{i.stopPropagation(),r(t+1)&&n(t+1)},children:v.jsx(bJ,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function EJ(){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(wJ,{})}),v.jsxs(Fv,{open:n,anchorEl:e,onClose:()=>{t(null)},children:[v.jsx(Ct,{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(Ct,{children:"Target Number :"}),v.jsx(aR,{value:r,setValue:i,clamp:c=>c>1&&c<7}),v.jsx(Ct,{children:"Dice Pool :"}),v.jsx(aR,{value:o,setValue:s,clamp:c=>c>0}),v.jsx(Ct,{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(Ct,{sx:{textDecoration:"underline"},children:"Hits"}),v.jsx(Ct,{sx:{textDecoration:"underline"},children:"Chance"}),kJ(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:CJ.format(c)})]},u))]})]})]})}const RJ={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 sg{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||RJ,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{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},lR=e=>e==null?"":""+e,PJ=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},TJ=/###/g,cR=e=>e&&e.indexOf("###")>-1?e.replace(TJ,"."):e,uR=e=>!e||typeof e=="string",uf=(e,t,n)=>{const r=typeof t!="string"?t:t.split(".");let i=0;for(;i{const{obj:r,k:i}=uf(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],s=t.slice(0,t.length-1),a=uf(e,s,Object);for(;a.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=uf(e,s,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},OJ=(e,t,n,r)=>{const{obj:i,k:o}=uf(e,t,Object);i[o]=i[o]||[],i[o].push(n)},ag=(e,t)=>{const{obj:n,k:r}=uf(e,t);if(n)return n[r]},jJ=(e,t,n)=>{const r=ag(e,n);return r!==void 0?r:ag(t,n)},dI=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):dI(e[r],t[r],n):e[r]=t[r]);return e},_c=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var LJ={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const IJ=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>LJ[t]):e;class MJ{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 NJ=[" ",",","?","!",";"],$J=new MJ(20),DJ=(e,t,n)=>{t=t||"",n=n||"";const r=NJ.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=$J.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},U1=function(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&&le&&e.indexOf("_")>0?e.replace("_","-"):e;class fR extends ty{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=ag(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:U1(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),dR(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=ag(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?dI(l,r,o):l={...l,...r},dR(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 pR={};class cg extends ty{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),PJ(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=rs.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 h=d&&d.usedKey||s,m=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,x=!this.i18nFormat||this.i18nFormat.handleAsObject;if(x&&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(h,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=_?[]:{},O=_?m:h;for(const R in f)if(Object.prototype.hasOwnProperty.call(f,R)){const T=`${O}${o}${R}`;k[R]=this.translate(T,{...n,joinArrays:!1,ns:a}),k[R]===T&&(k[R]=f[R])}f=k}}else if(x&&typeof b=="string"&&Array.isArray(f))f=f.join(b),f&&(f=this.extendTranslation(f,t,n,r));else{let _=!1,k=!1;const O=n.count!==void 0&&typeof n.count!="string",R=cg.hasDefaultValue(n),T=O?this.pluralResolver.getSuffix(c,n.count,n):"",$=n.ordinal&&O?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",L=O&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),M=L&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${T}`]||n[`defaultValue${$}`]||n.defaultValue;!this.isValidLookup(f)&&R&&(_=!0,f=M),this.isValidLookup(f)||(k=!0,f=s);const z=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:f,K=R&&M!==f&&this.options.updateMissing;if(k||_||K){if(this.logger.log(K?"updateKey":"missingKey",c,l,s,K?M: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 oe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&oe&&oe[0])for(let H=0;H{const Oe=R&&le!==f?le:z;this.options.missingKeyHandler?this.options.missingKeyHandler(H,l,V,Oe,K,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(H,l,V,Oe,K,n),this.emit("missingKey",H,l,V,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?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(le=>{fe([H],s+le,n[`defaultValue${le}`]||M)})}):fe(Z,s,M))}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||i.usedLng,r),c){const f=t.match(this.interpolator.nestingRegexp),h=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",h=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),m=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,!pR[`${g[0]}-${E}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(pR[`${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 x=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(x,u,b,E,n);else{let _;f&&(_=this.pluralResolver.getSuffix(b,n.count,n));const k=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(x.push(u+_),n.ordinal&&_.indexOf(O)===0&&x.push(u+_.replace(O,this.options.pluralSeparator)),h&&x.push(u+k)),m){const R=`${u}${this.options.contextSeparator}${n.context}`;x.push(R),f&&(x.push(R+_),n.ordinal&&_.indexOf(O)===0&&x.push(R+_.replace(O,this.options.pluralSeparator)),h&&x.push(R+k))}}let y;for(;y=x.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}}const z0=e=>e.charAt(0).toUpperCase()+e.slice(1);class hR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=rs.create("languageUtils")}getScriptPartFromCode(t){if(t=lg(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=lg(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]=z0(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]=z0(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=z0(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 AJ=[{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}],BJ={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const FJ=["v1","v2","v3"],zJ=["v4"],mR={zero:0,one:1,two:2,few:3,many:4,other:5},UJ=()=>{const e={};return AJ.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:BJ[t.fc]}})}),e};class WJ{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=rs.create("pluralResolver"),(!this.options.compatibilityJSON||zJ.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=UJ(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=lg(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const s=new Intl.PluralRules(r,{type:i});return this.pluralRulesCache[o]=s,s}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)=>mR[i]-mR[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!FJ.includes(this.options.compatibilityJSON)}}const gR=function(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=jJ(e,t,n);return!o&&i&&typeof n=="string"&&(o=U1(e,n,r),o===void 0&&(o=U1(t,n,r))),o},U0=e=>e.replace(/\$/g,"$$$$");class GJ{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=rs.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:h,nestingSuffix:m,nestingSuffixEscaped:g,nestingOptionsSeparator:E,maxReplaces:b,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:IJ,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?_c(o):s||"{{",this.suffix=a?_c(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?_c(f):h||_c("$t("),this.nestingSuffix=m?_c(m):g||_c(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=b||1e3,this.alwaysFormat=x!==void 0?x:!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||{},c=h=>{if(h.indexOf(this.formatSeparator)<0){const b=gR(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,r,{...i,...n,interpolationkey:h}):b}const m=h.split(this.formatSeparator),g=m.shift().trim(),E=m.join(this.formatSeparator).trim();return this.format(gR(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure),E,r,{...i,...n,interpolationkey:g})};this.resetRegExp();const u=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>U0(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?U0(this.escape(h)):U0(h)}].forEach(h=>{for(a=0;o=h.regex.exec(t);){const m=o[1].trim();if(s=c(m),s===void 0)if(typeof u=="function"){const E=u(t,o,i);s=typeof E=="string"?E:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))s="";else if(d){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=lR(s));const g=h.safeValue(s);if(t=t.replace(o[0],g),d?(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;const 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 h=f.match(/'/g),m=f.match(/"/g);(h&&h.length%2===0&&!m||m.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=lR(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}}const HJ=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}},Cc=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=r+JSON.stringify(o);let a=t[s];return a||(a=e(lg(r),i),t[s]=a),a(n)}};class VJ{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=rs.create("formatter"),this.options=t,this.formats={number:Cc((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:Cc((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:Cc((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:Cc((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:Cc((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()]=Cc(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(l=>l.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,l)=>{const{formatName:c,formatOptions:u}=HJ(l);if(this.formats[c]){let d=a;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},h=f.locale||f.lng||i.locale||i.lng||r;d=this.formats[c](a,h,{...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)}}const KJ=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class qJ extends ty{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=rs.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),!n&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(l=>{OJ(l.loaded,[o],s),KJ(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)}}}const vR=()=>({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:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),yR=e=>(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),Ch=()=>{},YJ=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Jf extends ty{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=yR(t),this.services={},this.logger=rs,this.modules={external:[]},YJ(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=vR();this.options={...i,...this.options,...yR(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);const o=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?rs.init(o(this.modules.logger),this.options):rs.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=VJ);const d=new hR(this.options);this.store=new fR(this.options.resources,this.options);const f=this.services;f.logger=rs,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new WJ(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 GJ(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new qJ(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(h){for(var m=arguments.length,g=new Array(m>1?m-1:0),E=1;E1?m-1:0),E=1;E{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ch),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=Pd(),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]:Ch;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=Pd();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Ch),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=Pd();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}${m}`):h=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,i.t(h,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===0||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=Pd();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=Pd();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 hR(vR());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 Jf(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ch;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Jf(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 fR(this.store.data,i),o.services.resourceStore=o.store),o.translator=new cg(o.services,i),o.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u{console!=null&&console.warn&&(Dl(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},bR={},W1=(...e)=>{Dl(e[0])&&bR[e[0]]||(Dl(e[0])&&(bR[e[0]]=new Date),QJ(...e))},pI=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},wR=(e,t,n)=>{e.loadNamespaces(t,pI(e,n))},xR=(e,t,n,r)=>{Dl(n)&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,pI(e,r))},XJ=(e,t,n={})=>!t.languages||!t.languages.length?(W1("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{var o;if(((o=n.bindI18n)==null?void 0:o.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),Dl=e=>typeof e=="string",JJ=e=>typeof e=="object"&&e!==null,ZJ=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,eZ={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},tZ=e=>eZ[e],nZ=e=>e.replace(ZJ,tZ);let G1={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:nZ};const rZ=(e={})=>{G1={...G1,...e}},iZ=()=>G1;let hI;const oZ=e=>{hI=e},sZ=()=>hI,aZ={type:"3rdParty",init(e){rZ(e.options.react),oZ(e)}},lZ=C.createContext();class cZ{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]??=!0})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const uZ=(e,t)=>{const n=C.useRef();return C.useEffect(()=>{n.current=e},[e,t]),n.current},mI=(e,t,n,r)=>e.getFixedT(t,n,r),dZ=(e,t,n,r)=>C.useCallback(mI(e,t,n,r),[e,t,n,r]),fZ=(e,t={})=>{var _,k,O,R;const{i18n:n}=t,{i18n:r,defaultNS:i}=C.useContext(lZ)||{},o=n||r||sZ();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new cZ),!o){W1("You will need to pass in an i18next instance by using initReactI18next");const T=(L,M)=>Dl(M)?M:JJ(M)&&Dl(M.defaultValue)?M.defaultValue:Array.isArray(L)?L[L.length-1]:L,$=[T,{},!1];return $.t=T,$.i18n={},$.ready=!1,$}(_=o.options.react)!=null&&_.wait&&W1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...iZ(),...o.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let c=i||((k=o.options)==null?void 0:k.defaultNS);c=Dl(c)?[c]:c||["translation"],(R=(O=o.reportNamespaces).addUsedNamespaces)==null||R.call(O,c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(T=>XJ(T,o,s)),d=dZ(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),f=()=>d,h=()=>mI(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),[m,g]=C.useState(f);let E=c.join();t.lng&&(E=`${t.lng}${E}`);const b=uZ(E),x=C.useRef(!0);C.useEffect(()=>{const{bindI18n:T,bindI18nStore:$}=s;x.current=!0,!u&&!a&&(t.lng?xR(o,t.lng,c,()=>{x.current&&g(h)}):wR(o,c,()=>{x.current&&g(h)})),u&&b&&b!==E&&x.current&&g(h);const L=()=>{x.current&&g(h)};return T&&(o==null||o.on(T,L)),$&&(o==null||o.store.on($,L)),()=>{x.current=!1,o&&(T==null||T.split(" ").forEach(M=>o.off(M,L))),$&&o&&$.split(" ").forEach(M=>o.store.off(M,L))}},[o,E]),C.useEffect(()=>{x.current&&u&&g(f)},[o,l,u]);const y=[m,o,u];if(y.t=m,y.i18n=o,y.ready=u,u||!u&&!a)return y;throw new Promise(T=>{t.lng?xR(o,t.lng,c,()=>T()):wR(o,c,()=>T())})},{slice:pZ,forEach:hZ}=[];function mZ(e){return hZ.call(pZ.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const SR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,gZ=(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(!SR.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!SR.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},_R={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=gZ(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 Td=null;const CR=()=>{if(Td!==null)return Td;try{Td=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Td=!1}return Td};var bZ={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&CR())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&CR()&&window.localStorage.setItem(n,e)}};let Od=null;const kR=()=>{if(Od!==null)return Od;try{Od=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Od=!1}return Od};var wZ={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&kR())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&kR()&&window.sessionStorage.setItem(n,e)}},xZ={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}},SZ={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}},_Z={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}},CZ={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 kZ(){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=mZ(n,this.options||{},kZ()),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(vZ),this.addDetector(yZ),this.addDetector(bZ),this.addDetector(wZ),this.addDetector(xZ),this.addDetector(SZ),this.addDetector(_Z),this.addDetector(CZ)}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";fr.use(gI).use(aZ).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}),ER="gbdata_meta";let W0=!1;async function EZ(e,t,n){if(W0){console.error("concurent reloads");return}console.log(`loading ${e}`),W0=!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 an.getLocal(ER);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([an.guilds.find().exec().then(a=>an.guilds.bulkRemove(a.map(l=>l.name))).then(()=>an.guilds.bulkInsert(n.Guilds)).then(a=>{if(a.error.length!==0)throw"error loading Guilds"}).catch(console.error),an.models.find().exec().then(a=>an.models.bulkRemove(a.map(l=>l.id))).then(()=>an.models.bulkInsert(n.Models)).then(a=>{if(a.error.length!==0)throw"error loading Models"}).catch(console.error),an.character_plays.find().exec().then(a=>an.character_plays.bulkRemove(a.map(l=>l.name))).then(()=>an.character_plays.bulkInsert(n["Character Plays"])).then(a=>{if(a.error.length!==0)throw"error loading Character Plays"}).catch(console.error),an.character_traits.find().exec().then(a=>an.character_traits.bulkRemove(a.map(l=>l.name))).then(()=>an.character_traits.bulkInsert(n["Character Traits"])).then(a=>{if(a.error.length!==0)throw"error loading Character Traits"}).catch(console.error)]).then(()=>an.upsertLocal(ER,{version:o,filename:e,sha256:i})).then(()=>console.log("database re-load complete :|")).catch(console.error)}finally{W0=!1}}const RZ=({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}=ci(),[u,d]=C.useState(),[f,h]=C.useState(),[m,g]=C.useState(),[E,b]=C.useState();return C.useEffect(()=>{const x=c==null?void 0:c.subscribe(y=>{const{dataSet:_,language:k,mostRecentErrata:O}=(y==null?void 0:y.toJSON().data)??{};d(_??null),k=="auto"?b(fr.resolvedLanguage??null):b(k??null),h(O??null)});return()=>{x==null||x.unsubscribe()}},[c]),C.useEffect(()=>{if(u===void 0||f===void 0)return;let x=!1;return(async()=>{var $;const _=await PZ();if(x)return;n(_);const k=_.datafiles[0].filename;let O;if(u&&f===k)O=u;else{O=k;const L=await(an==null?void 0:an.getLocal("settings"));if(x)return;L==null||L.incrementalPatch({dataSet:O,mostRecentErrata:k})}const R=_.datafiles.find(L=>L.filename===O),T=R.version;s(T),E&&(($=R.translations)!=null&&$[E])&&(console.log(`using translated data set (${E})`),O=R.translations[E].filename),g(O)})(),()=>{x=!0}},[u,E,f]),C.useEffect(()=>{if(!m||!t)return;let x=!1;return(async()=>{const _=await RR(m);x||(l(void 0),await EZ(m,t,_).then(()=>l(an)),i(await RR("gameplans.json")))})(),()=>{x=!0}},[o,m,t]),v.jsx(vI.Provider,{value:{version:o,manifest:t,gameplans:r,gbdb:a},children:e})},PZ=async()=>await fetch("data/manifest.json",{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(t){return t.json()}),RR=async e=>await fetch(`data/${e}`,{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(n){return n.json()}),Kr=()=>C.useContext(vI);function na(){const{gbdb:e}=Kr(),[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 TZ(e,t=!1){const n=t?yI:C.useEffect,r=C.useRef(e);return n(()=>{r.current=e}),r}const OZ=()=>{};function jZ(e){C.useEffect(()=>{typeof e=="function"&&e()},[])}const LZ={attributes:!0,characterData:!0,childList:!0,subtree:!0};function ny(e,t=LZ){const[n,r]=C.useState(null);return C.useEffect(()=>{if(n){const o=new MutationObserver(e);return o.observe(n,t),()=>{o.disconnect()}}return OZ},[n,e,t]),[C.useCallback(o=>{r(o)},[])]}function IZ(e){C.useEffect(()=>e,[])}function MZ(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),jZ(()=>{n.current=!0}),IZ(()=>{n.current=!1})}const bI=globalThis||void 0||self;function NZ(e){const t=TZ(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=NZ(n);(o?yI:C.useEffect)(()=>typeof e<"u"&&i?(e.addEventListener(t,s,r),()=>{e.removeEventListener(t,s,r)}):()=>{},[t,r])}function $Z(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 AZ=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}},BZ=[void 0,null,null],FZ=({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(AZ(i))})},[i]);return C.useLayoutEffect(()=>{a()},[a]),$Z(()=>{a()},t,!0),DZ(()=>{a()},e,!0),typeof window>"u"?(console.warn("useDimensionsRef: window is undefined."),BZ):[s,n,i]},zZ="/assets/playbook-symbol-defs-Dz3QsL1K.svg",UZ="/assets/gb-symbol-defs-DvUA8_44.svg";function Ni(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:`${UZ}#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:`${zZ}#pbicon-${i}`})})}function WZ(e){const{gbdb:t}=Kr(),[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 go(e,t){const{gbdb:n}=Kr(),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 GZ(e,t){return e.reduce((n,r)=>t(n)>=t(r)?n:r)}function HZ({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 GZ(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]=FZ(),r=go(async a=>{var c;if(!n)return;const l=await a.guilds.count().exec();return((c=HZ(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(VZ,{size:r,pickTeam:s}),v.jsx(Lo,{}),v.jsx(e,{size:r,update$:o})]})}const VZ=It.memo(e=>{const{pickTeam:t,size:n}=e,r=WZ(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(H1,{g:o,pickTeam:t,size:n},s))})});function H1(e){const{g:t,pickTeam:n,size:r}=e;return v.jsxs(vn,{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(Ni,{icon:t.icon,className:"dark",style:{flexShrink:0,filter:"drop-shadow(0 0 0.03em black)",...t.style||{}}})}),v.jsx(Ct,{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:{}},KZ=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")},qZ=KZ,YZ=Array.prototype.concat,QZ=Array.prototype.slice,PR=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+")"};Ti.to.keyword=function(e){return RI[e.slice(0,3)]};function $a(e,t,n){return Math.min(Math.max(t,e),n)}function kh(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var JZ=_I.exports;const Zf=CI,PI={};for(const e of Object.keys(Zf))PI[Zf[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 ZZ(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(Zf)){const o=Zf[i],s=ZZ(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 ug=TI;function eee(){const e={},t=Object.keys(ug);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function lee(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{$c[e]={},Object.defineProperty($c[e],"channels",{value:V1[e].channels}),Object.defineProperty($c[e],"labels",{value:V1[e].labels});const t=oee(e);Object.keys(t).forEach(r=>{const i=t[r];$c[e][r]=lee(i),$c[e][r].raw=aee(i)})});var cee=$c;const Dc=JZ,Ei=cee,OI=["keyword","gray","hex"],K1={};for(const e of Object.keys(Ei))K1[[...Ei[e].labels].sort().join("")]=e;const dg={};function Zn(e,t){if(!(this instanceof Zn))return new Zn(e,t);if(t&&t in OI&&(t=null),t&&!(t in Ei))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 Zn)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const i=Dc.get(e);if(i===null)throw new Error("Unable to parse color from string: "+e);this.model=i.model,r=Ei[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=Ei[this.model].channels;const i=Array.prototype.slice.call(e,0,r);this.color=q1(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 K1))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=K1[o];const{labels:s}=Ei[this.model],a=[];for(n=0;n(e%360+360)%360),saturationl:Cn("hsl",1,Vn(100)),lightness:Cn("hsl",2,Vn(100)),saturationv:Cn("hsv",1,Vn(100)),value:Cn("hsv",2,Vn(100)),chroma:Cn("hcg",1,Vn(100)),gray:Cn("hcg",2,Vn(100)),white:Cn("hwb",1,Vn(100)),wblack:Cn("hwb",2,Vn(100)),cyan:Cn("cmyk",0,Vn(100)),magenta:Cn("cmyk",1,Vn(100)),yellow:Cn("cmyk",2,Vn(100)),black:Cn("cmyk",3,Vn(100)),x:Cn("xyz",0,Vn(95.047)),y:Cn("xyz",1,Vn(100)),z:Cn("xyz",2,Vn(108.833)),l:Cn("lab",0,Vn(100)),a:Cn("lab",1),b:Cn("lab",2),keyword(e){return e!==void 0?new Zn(e):Ei[this.model].keyword(this.color)},hex(e){return e!==void 0?new Zn(e):Dc.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new Zn(e);const t=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),Dc.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 Zn.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 Zn.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(Ei)){if(OI.includes(e))continue;const{channels:t}=Ei[e];Zn.prototype[e]=function(...n){return this.model===e?new Zn(this):n.length>0?new Zn(n,e):new Zn([...fee(Ei[this.model][e].raw(this.color)),this.valpha],e)},Zn[e]=function(...n){let r=n[0];return typeof r=="number"&&(r=q1(n,t)),new Zn(r,e)}}function uee(e,t){return Number(e.toFixed(t))}function dee(e){return function(t){return uee(t,e)}}function Cn(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(dg[r]||(dg[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 Vn(e){return function(t){return Math.max(0,Math.min(e,t))}}function fee(e){return Array.isArray(e)?e:[e]}function q1(e,t){for(let n=0;n{const{version:e}=Kr();return v.jsxs(Ct,{sx:{position:"absolute",bottom:0,right:0,color:"text.disabled"},children:["[",e,"]"]})},hee=/^(?:[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 tp(e){return typeof e=="string"&&hee.test(e)}function fg(e){if(!tp(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 rr=[];for(var H0=0;H0<256;++H0)rr.push((H0+256).toString(16).slice(1));function mee(e,t=0){return(rr[e[t+0]]+rr[e[t+1]]+rr[e[t+2]]+rr[e[t+3]]+"-"+rr[e[t+4]]+rr[e[t+5]]+"-"+rr[e[t+6]]+rr[e[t+7]]+"-"+rr[e[t+8]]+rr[e[t+9]]+"-"+rr[e[t+10]]+rr[e[t+11]]+rr[e[t+12]]+rr[e[t+13]]+rr[e[t+14]]+rr[e[t+15]]).toLowerCase()}var Eh,gee=new Uint8Array(16);function vee(){if(!Eh&&(Eh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Eh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Eh(gee)}var yee=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const TR={randomUUID:yee};function jI(e,t,n){if(TR.randomUUID&&!t&&!e)return TR.randomUUID();e=e||{};var r=e.random||(e.rng||vee)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,mee(r)}const Op="wss://gbplaybook-webrtc-server.onrender.com";let Ts;function TS(e){return e.game_state.find().exec().then(t=>e.game_state.bulkRemove(t.map(n=>n._id))).catch(console.error)}let V0=!1;function ry(e){return async(...t)=>{if(V0)throw"concurent network change";V0=!0;try{await e(...t)}finally{V0=!1}}}const bee=ry(async(e,t)=>{try{const n=await Tee();console.log(`# join code is ${n}`),t(n);const{uid:r,oid:i,gid:o}=await jee();await TS(e),console.log("# starting new network game"),Ts=await ES(Op,o),await e.game_state.insertLocal("network",{uid:r,oid:i,gid:o})}finally{jp()}}),wee=ry(async(e,t)=>{try{const{uid:n,oid:r,gid:i}=await Oee(t);await TS(e),console.log("# joining a network game"),Ts=await ES(Op,i),await e.game_state.insertLocal("network",{uid:n,oid:r,gid:i})}finally{jp()}}),xee=ry(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 ES(Op,n))}),See=ry(async e=>{console.log("# leaving a network game"),await(Ts==null?void 0:Ts.cancel().catch(console.error).finally(()=>{Ts=void 0})),await TS(e).catch(console.error),await e.game_state.getLocal("network").then(t=>t==null?void 0:t.remove()).catch(console.error)});function OS({allowNew:e=!1}){const{gbdb:t}=Kr(),[n,r]=C.useState(!1),{active:i}=na();C.useEffect(()=>{t&&i&&!Ts&&xee(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(_J,{})}),v.jsxs(hW,{open:n,onClose:()=>r(!1),children:[v.jsx(kW,{children:"Network Game Setup"}),v.jsx(xW,{children:v.jsx(Pee,{allowNew:e,close:()=>{r(!1)}})})]})]})}const _ee=e=>{const{setActiveStep:t}=e;return v.jsxs(tn,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[v.jsx(vn,{variant:"contained",onClick:()=>t("Start"),children:"Start a Game"}),v.jsx(vn,{variant:"contained",onClick:()=>t("Join"),children:"Join a Game"})]})},Cee=e=>{const{setActiveStep:t}=e,{gbdb:n}=Kr(),[r,i]=C.useState();return C.useEffect(()=>{n&&bee(n,i).then(()=>{t("Ready")}).catch(o=>{console.error(o),t("New")})},[n,t]),v.jsxs(tn,{sx:{display:"flex",flexDirection:"column",gap:"1em",alignItems:"center"},children:[v.jsx(Ct,{children:"Share this join code:"}),v.jsx(Ct,{variant:"h3",children:r==null?void 0:r.toString().padStart(4,"0")}),v.jsx(Ct,{children:"Waiting for opponent to connect."}),v.jsx(vn,{variant:"contained",onClick:()=>{jp(),e.setActiveStep("New")},children:"Cancel"})]})},kee=e=>{const{setActiveStep:t}=e,{gbdb:n}=Kr(),[r,i]=C.useState(),[o,s]=C.useState(!1);if(n)return v.jsxs(tn,{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(vn,{variant:"contained",disabled:!r||o,onClick:()=>{s(!0),wee(n,r??0).then(()=>t("Ready")).then(()=>s(!1)).catch(a=>{console.error(a),t("New")})},children:"Join a Game"}),v.jsx(vn,{variant:"contained",onClick:()=>{jp(),s(!1),t("New")},children:"Cancel"})]})},Eee=e=>{const{setActiveStep:t}=e,{gbdb:n}=Kr(),r=qa(),{setting$:i}=ci();if(n)return v.jsxs(Hm,{spacing:2,alignItems:"center",children:[v.jsx(Ct,{variant:"h6",children:"Connected"}),v.jsxs(Hm,{direction:"row",spacing:2,children:[v.jsx(vn,{variant:"contained",onClick:()=>See(n).then(()=>t("New")).then(()=>i&&Fn(i)).then(o=>o==null?void 0:o.incrementalPatch({gamePlayRoute:void 0})).then(()=>{r("/",{})}).catch(console.error),children:"Leave Game"}),v.jsx(vn,{color:"success",variant:"contained",onClick:()=>{var o;(o=e.close)==null||o.call(e)},children:"Continue"})]})]})},Ree=()=>v.jsx(Ct,{children:"Network Games must be started from the inital guild selection screen."});function Pee({allowNew:e=!1,close:t}){const{active:n}=na(),[r,i]=C.useState(e?"New":"Block");return C.useEffect(()=>{n&&i("Ready")},[n]),C.useEffect(()=>()=>{jp()},[]),v.jsxs(tn,{children:[r==="New"&&v.jsx(_ee,{setActiveStep:i}),r==="Start"&&v.jsx(Cee,{setActiveStep:i}),r==="Join"&&v.jsx(kee,{setActiveStep:i}),r==="Ready"&&v.jsx(Eee,{setActiveStep:i,close:t}),r==="Block"&&v.jsx(Ree,{})]})}let en;function Tee(){return new Promise((e,t)=>{en=new WebSocket(Op),en.onopen=()=>{en==null||en.send(JSON.stringify({type:"handshake-begin"}))},en.onclose=()=>{t("socket closed")},en.onerror=n=>{t(n)},en.onmessage=n=>{const r=JSON.parse(n.data);switch(r.type){case"handshake-response":en&&(en.onmessage=null),e(r.code);break}}})}function Oee(e){return new Promise((t,n)=>{if(!e){n("Invalid Arguments (id undefined)");return}en=new WebSocket(Op),en.onopen=()=>{en==null||en.send(JSON.stringify({type:"handshake-join",code:e}))},en.onclose=()=>{n("socket closed")},en.onerror=r=>{n(r)},en.onmessage=r=>{const i=JSON.parse(r.data);switch(i.type){case"handshake-complete":{const o=i.yourId;if(!tp(o)){n(`invalid uID ${o}`);return}const s=i.otherId;if(!tp(s)){n(`invalid oID ${s}`);return}const a=fg(o),l=fg(s),c=a.map((d,f)=>d^l[f]),u=jI({random:c});t({uid:o,oid:s,gid:u})}break}}})}function jee(){return new Promise((e,t)=>{if((en==null?void 0:en.readyState)!==1){t("socket closed");return}en.onclose=()=>{t("socket closed")},en.onerror=n=>{t(n)},en.onmessage=n=>{const r=JSON.parse(n.data);switch(r.type){case"handshake-complete":{const i=r.yourId;if(!tp(i)){t(`invalid uID ${i}`);return}const o=r.otherId;if(!tp(o)){t(`invalid oID ${o}`);return}const s=fg(i),a=fg(o),l=s.map((u,d)=>u^a[d]),c=jI({random:l});e({uid:i,oid:o,gid:c})}break}}})}function jp(){en==null||en.close(),en=void 0}function iy(){return lp()}var jS={},Lee=uo;Object.defineProperty(jS,"__esModule",{value:!0});var LI=jS.default=void 0,Iee=Lee(ps()),Mee=v;LI=jS.default=(0,Iee.default)((0,Mee.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");function Nee(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}=iy(),{active:i}=na(),[o,s]=C.useState(),[a,l]=C.useState(),[c,u]=C.useState(!1),{dest:d,onAction:f,...h}=e;return C.useEffect(()=>{const m=n==null?void 0:n.pipe(Vt(E=>E==null?void 0:E.navigateTo)).subscribe(E=>s(E)),g=r==null?void 0:r.pipe(Vt(E=>E==null?void 0:E.navigateTo)).subscribe(E=>l(E));return()=>{m==null||m.unsubscribe(),g==null||g.unsubscribe()}},[n,r]),C.useEffect(()=>{const m=async()=>{await Fn(n).then(g=>{g==null||g.incrementalPatch({navigateTo:void 0}).catch(console.error)}),i||await Fn(r).then(g=>{g==null||g.incrementalPatch({navigateTo:void 0}).catch(console.error)}),t(Nee(d))};o==d&&a===d&&m()},[n,r,d,o,a,i,t,f]),C.useEffect(()=>{u(a===d)},[d,a]),v.jsx(OW,{className:c?"fabAnimate":void 0,...h,color:"secondary",onClick:()=>{f==null||f(),Fn(n).then(m=>{m==null||m.incrementalPatch({navigateTo:d}).catch(console.error)}),i||Fn(r).then(m=>{m==null||m.incrementalPatch({navigateTo:d}).catch(console.error)})},children:v.jsx(LI,{fontSize:"large",sx:{zIndex:10}})})}function OR({team:e,size:t}){const n=go(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:ep(n.shadow??n.darkColor??n.color).darken(.25).desaturate(.25).string()},children:[v.jsx(Ni,{icon:e,fontSize:t,style:{color:"rgba(0, 0, 0, 60%)",flexShrink:0}}),v.jsx(Ct,{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 $ee(e){const[t,n]=C.useState("P1"),[r,i]=C.useState(),[o,s]=C.useState(),[a,l]=C.useState(!1),c=Bi(),{active:u}=na(),{gameState1$:d,gameState2$:f}=iy(),[h,m]=C.useState();C.useEffect(()=>{i(void 0),n("P1");const x=d==null?void 0:d.subscribe(y=>m(y));return()=>x==null?void 0:x.unsubscribe()},[d]);const[g,E]=C.useState();C.useEffect(()=>{s(void 0),n("P1");const x=f==null?void 0:f.subscribe(y=>E(y));return()=>x==null?void 0:x.unsubscribe()},[f]),C.useEffect(()=>{const x=h==null?void 0:h.get$("guild").subscribe(y=>i(y));return()=>x==null?void 0:x.unsubscribe()},[h]),C.useEffect(()=>{const x=g==null?void 0:g.get$("guild").subscribe(y=>s(y));return()=>x==null?void 0:x.unsubscribe()},[g]);const b=C.useCallback(async x=>{x&&(t==="P1"?(await(h==null?void 0:h.incrementalPatch({guild:x,roster:[]}).catch(console.error)),n(!o&&!u?"P2":"GO")):t==="P2"&&(await(g==null?void 0:g.incrementalPatch({guild:x,roster:[]}).catch(console.error)),n(r?"GO":"P1")))},[t,r,o,h,g,u]);return C.useEffect(()=>{const x=e.update$.subscribe(y=>b(y));return()=>x.unsubscribe()},[e.update$,b]),v.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",margin:"5px",gap:"5px"},children:[v.jsx(vn,{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(OR,{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(Ct,{variant:"caption",children:"vs"}),v.jsx(II,{dest:"Draft",disabled:!r||!o,onAction:()=>l(!0),sx:{m:"0 15px"}}),v.jsx(Ct,{variant:"caption",children:a?"(waiting)":" "})]}),v.jsx(vn,{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(OR,{team:o,size:e.size}):"P2"})]})}function Dee(){return v.jsxs(tn,{sx:{width:"100%",height:"100%",position:"relative"},children:[v.jsx(hs,{children:v.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between"},children:[v.jsx(Xa,{separator:v.jsx(sc,{fontSize:"small"}),children:v.jsx(Fo,{size:"small",disabled:!0,children:v.jsx(PS,{sx:{color:"text.secondary"}})})}),v.jsx(OS,{allowNew:!0})]})}),v.jsx(SI,{Controller:$ee}),v.jsx(ac,{})]})}var pg={exports:{}};pg.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]",h="[object Number]",m="[object Object]",g="[object Promise]",E="[object RegExp]",b="[object Set]",x="[object String]",y="[object Symbol]",_="[object WeakMap]",k="[object ArrayBuffer]",O="[object DataView]",R="[object Float32Array]",T="[object Float64Array]",$="[object Int8Array]",L="[object Int16Array]",M="[object Int32Array]",F="[object Uint8Array]",z="[object Uint8ClampedArray]",K="[object Uint16Array]",Z="[object Uint32Array]",oe=/[\\^$.*+?()[\]{}|]/g,fe=/\w*$/,H=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,le={};le[o]=le[s]=le[k]=le[O]=le[a]=le[l]=le[R]=le[T]=le[$]=le[L]=le[M]=le[f]=le[h]=le[m]=le[E]=le[b]=le[x]=le[y]=le[F]=le[z]=le[K]=le[Z]=!0,le[c]=le[u]=le[_]=!1;var Oe=typeof xr=="object"&&xr&&xr.Object===Object&&xr,Ue=typeof self=="object"&&self&&self.Object===Object&&self,Te=Oe||Ue||Function("return this")(),ke=t&&!t.nodeType&&t,qe=ke&&!0&&e&&!e.nodeType&&e,Re=qe&&qe.exports===ke;function tt(U,he){return U.set(he[0],he[1]),U}function at(U,he){return U.add(he),U}function Pe(U,he){for(var Ce=-1,ut=U?U.length:0;++Ce-1}function ht(U,he){var Ce=this.__data__,ut=Wn(Ce,U);return ut<0?Ce.push([U,he]):Ce[ut][1]=he,this}te.prototype.clear=ge,te.prototype.delete=xe,te.prototype.get=He,te.prototype.has=Qe,te.prototype.set=ht;function ze(U){var he=-1,Ce=U?U.length:0;for(this.clear();++he-1&&U%1==0&&U-1&&U%1==0&&U<=i}function ol(U){var he=typeof U;return!!U&&(he=="object"||he=="function")}function id(U){return!!U&&typeof U=="object"}function vs(U){return dc(U)?Gi(U):Xn(U)}function od(){return[]}function Mp(){return!1}e.exports=$n})(pg,pg.exports);var Aee=pg.exports;const MI=Ga(Aee);var LS={},Bee=uo;Object.defineProperty(LS,"__esModule",{value:!0});var NI=LS.default=void 0,Fee=Bee(ps()),zee=v;NI=LS.default=(0,Fee.default)((0,zee.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 IS={},Uee=uo;Object.defineProperty(IS,"__esModule",{value:!0});var $I=IS.default=void 0,Wee=Uee(ps()),Gee=v;$I=IS.default=(0,Wee.default)((0,Gee.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 MS=(e,t)=>{const n=It.useRef(null);return MZ(()=>{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 qs(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 ff(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 DI(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 AI(e,t,n,r){if(t.dehcneb){const i=e.find(o=>o.benched&&o.name===t.dehcneb);i&&r(i,n)}}function Tl({model:e,disabled:t=!1,stateDoc:n,updateCounts:r}){const[i,o]=C.useState(e.selected);C.useEffect(()=>{const l=n.get$("roster").pipe(Vt(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=MS(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}},jR=e=>{const{guild:t,ready:n,unready:r,disabled:i=!1,style:o}=e,{setting$:s}=ci(),[a,l]=C.useState(6);C.useEffect(()=>{const x=s==null?void 0:s.pipe(Vt(y=>y==null?void 0:y.toJSON().data.gameSize)).subscribe(y=>l(y??6));return()=>x==null?void 0:x.unsubscribe()},[s]);const c=C.useRef({captain:0,mascot:0,squaddieCount:0}),[,u]=C.useState(0),[d,f]=C.useState(!1),h=go(async x=>{const _=(await x.models.find().where("id").in(t.roster).exec()).map(k=>Object.assign(k.toMutableJSON(),{selected:!1,disabled:k.benched?1:0}));if(qs(_,"id",t.roster),!i&&t.minor){const k=new Set(e.stateDoc.get("roster").map(O=>JSON.stringify(O)));_.forEach(O=>{(O.captain||O.mascot&&da[a].mascot>0)&&(k.add(JSON.stringify({name:O.id,health:O.hp})),O.disabled=1)}),e.stateDoc.incrementalModify(O=>(O.roster=Array.from(k).map(R=>JSON.parse(R)),O)).catch(console.error)}return da[a].mascot===0&&_.forEach(k=>{k.mascot&&(k.disabled=1)}),_},[t,a]),m=C.useCallback((x,y)=>{function _(L,M,F,z){return ff(L,M,F,z,K=>!!K.captain,da[a].captain)}function k(L,M,F,z){return ff(L,M,F,z,K=>!!K.mascot,da[a].mascot)}function O(L,M,F,z){return ff(L,M,F,z,K=>!(K.captain||K.mascot),da[a].squaddies)}if(!h)return;x.selected=y;const R=_(h,x,c.current.captain,y);c.current.captain=R;const T=k(h,x,c.current.mascot,y);c.current.mascot=T;const $=O(h,x,c.current.squaddieCount,y);c.current.squaddieCount=$,DI(h,x,y),AI(h,x,y,(L,M)=>{i||(L.selected=M,e.stateDoc.incrementalModify(F=>{if(M){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}))}),R===da[a].captain&&T===da[a].mascot&&$===da[a].squaddies?f(!0):f(!1),u(L=>L+1)},[e.stateDoc,h,a,i]);if(C.useEffect(()=>{if(d&&h){const x=MI(h.filter(y=>y.selected));n==null||n(x)}else r==null||r()},[d,t,h,n,r]),!h)return null;const g=h.filter(x=>x.captain),E=h.filter(x=>x.mascot&&!x.captain),b=h.filter(x=>!x.captain&&!x.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(x=>v.jsx(Tl,{model:x,stateDoc:e.stateDoc,updateCounts:m,disabled:i},x.id)),v.jsx("span",{children:"Mascots :"}),E.map(x=>v.jsx(Tl,{model:x,stateDoc:e.stateDoc,updateCounts:m,disabled:i},x.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Squaddies :"}),b.slice(0,b.length/2).map(x=>v.jsx(Tl,{model:x,stateDoc:e.stateDoc,updateCounts:m,disabled:i},x.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:" "}),b.slice(b.length/2).map(x=>v.jsx(Tl,{model:x,stateDoc:e.stateDoc,updateCounts:m,disabled:i},x.id))]})]})})},Rh={3:{master:1,apprentice:2},4:{master:2,apprentice:2},6:{master:3,apprentice:3}},LR=e=>{const{guild:t,ready:n,unready:r,disabled:i=!1,style:o}=e,{setting$:s}=ci(),[a,l]=C.useState(6);C.useEffect(()=>{const b=s==null?void 0:s.pipe(Vt(x=>x==null?void 0:x.toJSON().data.gameSize)).subscribe(x=>l(x??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),h=go(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 qs(y,"id",t.roster),y},[t]),m=C.useCallback((b,x)=>{function y(R,T,$,L){return ff(R,T,$,L,M=>!!M.captain,Rh[a].master)}function _(R,T,$,L){return ff(R,T,$,L,M=>!M.captain,Rh[a].apprentice)}if(!h)return;b.selected=x;const k=y(h,b,c.current.masterCount,x);c.current.masterCount=k;const O=_(h,b,c.current.apprenticeCount,x);c.current.apprenticeCount=O,DI(h,b,x),AI(h,b,x,(R,T)=>{i||(R.selected=T,e.stateDoc.incrementalModify($=>{if(T){const L=$.roster.concat({name:R.id,health:R.hp});$.roster=L}else{const L=$.roster.filter(M=>M.name!=R.id);$.roster=L}return $}))}),k===Rh[a].master&&O===Rh[a].apprentice?f(!0):f(!1),u(R=>R+1)},[e.stateDoc,h,a,i]);if(C.useEffect(()=>{if(d&&h){const b=MI(h.filter(x=>x.selected));n==null||n(b)}else r==null||r()},[d,t,h,n,r]),!h)return null;const g=h.filter(b=>b.captain),E=h.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(Tl,{model:b,stateDoc:e.stateDoc,updateCounts:m,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(Tl,{model:b,stateDoc:e.stateDoc,updateCounts:m,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(Tl,{model:b,stateDoc:e.stateDoc,updateCounts:m,disabled:i},b.id))]})]})})};function Hee(){const{active:e}=na();return v.jsxs(tn,{className:"DraftScreen",children:[v.jsx(hs,{children:v.jsxs(tn,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[v.jsxs(Xa,{separator:v.jsx(sc,{fontSize:"small"}),children:[v.jsx(Fo,{color:"inherit",href:"/game",size:"small",disabled:e,children:v.jsx(PS,{})}),v.jsx(Ct,{children:"Draft"})]}),v.jsxs("div",{children:[v.jsx(Kee,{}),v.jsx(OS,{})]})]})}),v.jsx(Vee,{}),v.jsx(ac,{})]})}function Vee(){const{setting$:e}=ci(),t=qa(),[n,r]=C.useState(),[i,o]=C.useState(),s=C.useCallback(R=>r(R),[]),a=C.useCallback(R=>o(R),[]),l=C.useCallback(()=>r(void 0),[]),c=C.useCallback(()=>o(void 0),[]),[u,d]=C.useState();C.useEffect(()=>{const R=e==null?void 0:e.pipe(Vt(T=>T==null?void 0:T.toJSON().data.gameSize)).subscribe(T=>d(T));return()=>R==null?void 0:R.unsubscribe()},[e]);const{active:f}=na(),{gameState1$:h,gameState2$:m}=iy(),[g,E]=C.useState();C.useEffect(()=>{if(!h)return;let R=!1;return(async()=>{const $=await Fn(h);R||E($)})(),()=>{R=!0}},[h]);const[b,x]=C.useState();C.useEffect(()=>{if(!m)return;let R=!1;return(async()=>{const $=await Fn(m);R||x($)})(),()=>{R=!0}},[m]);const[y,_]=go(async R=>{const T=g==null?void 0:g.guild,$=b==null?void 0:b.guild;if(!T||!$)return;const[L,M]=await Promise.all([R.guilds.findOne().where({name:T}).exec(),R.guilds.findOne().where({name:$}).exec()]);if(!L||!M){t("/game");return}return[L,M]},[g,b,t])??[];if(!y||!_||!g||!b)return null;const k=y.name==="Blacksmiths"?LR:jR,O=_.name==="Blacksmiths"?LR:jR;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(R=>({name:R.id,health:R.hp})))||[]}).catch(console.error),f||b.incrementalPatch({score:0,momentum:0,roster:(i==null?void 0:i.map(R=>({name:R.id,health:R.hp})))||[]}).catch(console.error)},sx:{m:"10px"}}),v.jsx(O,{guild:_,stateDoc:b,ready:a,unready:c,style:{width:"100%"},disabled:f},`2-${u}`)]})}function Kee(){const[e,t]=C.useState(null),n=!!e,r=c=>{t(c.currentTarget)},i=()=>{t(null)},{setting$:o}=ci(),[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(Ct,{children:[l,"v",l]})}),v.jsx(Fv,{anchorEl:e,open:n,onClose:i,onClick:i,children:v.jsxs(rj,{dense:!0,children:[v.jsx(Si,{selected:l===6,onClick:()=>{s==null||s.incrementalPatch({gameSize:6})},children:"6v6"}),v.jsx(Si,{selected:l===4,onClick:()=>{s==null||s.incrementalPatch({gameSize:4})},children:"4v4"}),v.jsx(Si,{selected:l===3,onClick:()=>{s==null||s.incrementalPatch({gameSize:3})},children:"3v3"})]})})]})}var NS={},qee=uo;Object.defineProperty(NS,"__esModule",{value:!0});var hg=NS.default=void 0,Yee=qee(ps()),Qee=v;hg=NS.default=(0,Yee.default)((0,Qee.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove");var $S={},Xee=uo;Object.defineProperty($S,"__esModule",{value:!0});var mg=$S.default=void 0,Jee=Xee(ps()),Zee=v;mg=$S.default=(0,Jee.default)((0,Zee.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");function IR(e){ete(e)&&e.touches.length<2&&e.preventDefault&&e.cancelable&&e.preventDefault()}function ete(e){return e&&"touches"in e}function Y1({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",IR,{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",IR)},[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 tte(e){const{disabled:t,object:n,label:r}=e,i=r(n),o=MS(t,[i]);return v.jsx(Ct,{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=Y1({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(tte,{disabled:i,object:e,label:t}),v.jsxs(Gf,{size:"small",variant:"contained",disabled:i,children:[v.jsx(vn,{...o?s:{},onClick:a=>{if(a.stopPropagation(),!o){const l=n(e);l>0&&r(e,l-1)}},children:v.jsx(hg,{fontSize:"inherit"})}),v.jsx(vn,{onClick:a=>{a.stopPropagation();const l=n(e);r(e,l+1)},children:v.jsx(mg,{fontSize:"inherit"})})]})]})}const MR=e=>{const{model:t,disabled:n}=e,r=MS(n,[e.health]);return v.jsx(vn,{ref:r,disabled:!0,size:"small",children:v.jsx(Ct,{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=Y1({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=Y1({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(Vt(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(MR,{health:l,model:t,disabled:n}),v.jsxs(Gf,{size:"small",variant:"contained",disabled:n,sx:{"& .MuiButtonGroup-grouped":{minWidth:"1rem"}},children:[v.jsx(vn,{...i,onClick:u=>u.stopPropagation(),children:v.jsx(hg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(vn,{...o,onClick:u=>u.stopPropagation(),children:v.jsx(mg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})]}):v.jsxs(Gf,{size:"small",variant:"contained",disabled:n,children:[v.jsx(vn,{...i,onClick:u=>u.stopPropagation(),children:v.jsx(hg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(MR,{health:l,model:t,disabled:n}),v.jsx(vn,{...o,onClick:u=>u.stopPropagation(),children:v.jsx(mg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function nte(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 rte(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 ite({teams:e,rosters:t,expanded:n,onClick:r,disabled:i}){const o=Bi(),{setting$:s}=ci(),[a,l]=C.useState();C.useEffect(()=>{const u=s==null?void 0:s.pipe(Vt(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(tn,{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(Ni,{icon:u.guild,style:{color:o.palette.text.secondary,filter:"unset",flexShrink:0}})})}),v.jsx(Ss,{primary:u.guild,secondary:`${t[d].reduce((h,m)=>h+(m._inf??m.inf),0)} INF`}),v.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"4px"},children:[v.jsx(nte,{state:u,disabled:i[d]}),v.jsx(rte,{state:u,disabled:i[d]})]})]})}),v.jsx(Hz,{sx:{padding:0},children:v.jsx(ef,{disablePadding:!0,sx:{"li:nth-of-type(odd)":{"&.MuiListItem-root":{backgroundColor:"rgba(100%, 100%, 100%, 5%)"}}},children:t[d].map((h,m)=>v.jsx(So,{secondaryAction:v.jsx(zI,{state:u,model:h,disabled:i[d]}),onClick:()=>{r(f+m,!1)},children:v.jsx(Ss,{primary:h.id,secondary:a?h.statLine:null})},h.id))},d)})]},d)})})}const jr=new URL("/assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",import.meta.url).href,Lr=new URL("/assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",import.meta.url).href,Ir=new URL("/assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",import.meta.url).href,Mr=new URL("/assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",import.meta.url).href,kc=new URL("/assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",import.meta.url).href,Qr=new URL("/assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",import.meta.url).href,Ec=new URL("/assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",import.meta.url).href,Nr=new URL("/assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",import.meta.url).href,$r=new URL("/assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",import.meta.url).href,Dr=new URL("/assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",import.meta.url).href,Ar=new URL("/assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",import.meta.url).href,Rc=new URL("/assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",import.meta.url).href,br=new URL("/assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",import.meta.url).href,Pc=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,Tc=new URL("/assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",import.meta.url).href,fl=new URL("/assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",import.meta.url).href,Xr=new URL("/assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",import.meta.url).href,Oc=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",jr],["Midas_front",new URL("/assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",import.meta.url).href],["Smoke_back",jr],["Smoke_front",new URL("/assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",import.meta.url).href],["Soma_back",jr],["Soma_front",new URL("/assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",import.meta.url).href],["Pneuma_back",jr],["Pneuma_front",new URL("/assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",import.meta.url).href],["Flask_back",jr],["Flask_front",new URL("/assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",import.meta.url).href],["Naja_back",jr],["Naja_front",new URL("/assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",import.meta.url).href],["Calculus_back",jr],["Calculus_front",new URL("/assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",import.meta.url).href],["vCalculus_back",jr],["vCalculus_front",new URL("/assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",import.meta.url).href],["Crucible_back",jr],["Crucible_front",new URL("/assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",import.meta.url).href],["Kami_back",jr],["Kami_front",new URL("/assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",import.meta.url).href],["Katalyst_back",jr],["Katalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",import.meta.url).href],["vKatalyst_back",jr],["vKatalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",import.meta.url).href],["Mercury_back",jr],["Mercury_front",new URL("/assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",import.meta.url).href],["Venin_back",jr],["Venin_front",new URL("/assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",import.meta.url).href],["Vitriol_back",jr],["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",Lr],["Anvil_front",new URL("/assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",import.meta.url).href],["Burnish_back",Lr],["Burnish_front",new URL("/assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",import.meta.url).href],["Culverin_back",Lr],["Culverin_front",new URL("/assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",import.meta.url).href],["Farris_back",Lr],["Farris_front",new URL("/assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",import.meta.url).href],["Ferrite_back",Lr],["Ferrite_front",new URL("/assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",import.meta.url).href],["Furnace_back",Lr],["Furnace_front",new URL("/assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",import.meta.url).href],["Hearth_back",Lr],["Hearth_front",new URL("/assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",import.meta.url).href],["Alloy_back",Lr],["Alloy_front",new URL("/assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",import.meta.url).href],["Bolt_back",Lr],["Bolt_front",new URL("/assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",import.meta.url).href],["Cast_back",Lr],["Cast_front",new URL("/assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",import.meta.url).href],["Cinder_back",Lr],["Cinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",import.meta.url).href],["vCinder_back",Lr],["vCinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",import.meta.url).href],["Cutlass_back",Lr],["Cutlass_front",new URL("/assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",import.meta.url).href],["Iron_back",Lr],["Iron_front",new URL("/assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",import.meta.url).href],["Sledge_back",Lr],["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",Ir],["Tapper_front",new URL("/assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",import.meta.url).href],["Esters_back",Ir],["Esters_front",new URL("/assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",import.meta.url).href],["Corker_back",Ir],["Corker_front",new URL("/assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",import.meta.url).href],["Scum_back",Ir],["Scum_front",new URL("/assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",import.meta.url).href],["Quaff_back",Ir],["Quaff_front",new URL("/assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",import.meta.url).href],["vDecimate_back",Ir],["vDecimate_front",new URL("/assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",import.meta.url).href],["Flea_back",Ir],["Flea_front",new URL("/assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",import.meta.url).href],["Friday_back",Ir],["Friday_front",new URL("/assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",import.meta.url).href],["Hooper_back",Ir],["Hooper_front",new URL("/assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",import.meta.url).href],["Mash_back",Ir],["Mash_front",new URL("/assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",import.meta.url).href],["Pintpot_back",Ir],["Pintpot_front",new URL("/assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",import.meta.url).href],["Spigot_back",Ir],["Spigot_front",new URL("/assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",import.meta.url).href],["vSpigot_back",Ir],["vSpigot_front",new URL("/assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",import.meta.url).href],["Stave_back",Ir],["Stave_front",new URL("/assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",import.meta.url).href],["Stoker_back",Ir],["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",Mr],["Ox_front",new URL("/assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",import.meta.url).href],["Fillet_back",Mr],["Fillet_front",new URL("/assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",import.meta.url).href],["vBoar_back",Mr],["vBoar_front",new URL("/assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",import.meta.url).href],["Princess_back",Mr],["Princess_front",new URL("/assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",import.meta.url).href],["Truffles_back",Mr],["Truffles_front",new URL("/assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",import.meta.url).href],["Boar_back",Mr],["Boar_front",new URL("/assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",import.meta.url).href],["Boiler_back",Mr],["Boiler_front",new URL("/assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",import.meta.url).href],["Brisket_back",Mr],["Brisket_front",new URL("/assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",import.meta.url).href],["vBrisket_back",Mr],["vBrisket_front",new URL("/assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",import.meta.url).href],["vGutter_back",Mr],["vGutter_front",new URL("/assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",import.meta.url).href],["Layne_back",Mr],["Layne_front",new URL("/assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",import.meta.url).href],["Meathook_back",Mr],["Meathook_front",new URL("/assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",import.meta.url).href],["vOx_back",Mr],["vOx_front",new URL("/assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",import.meta.url).href],["Shank_back",Mr],["Shank_front",new URL("/assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",import.meta.url).href],["Tenderiser_back",Mr],["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",kc],["Wellington_front",new URL("/assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",import.meta.url).href],["Pepper_back",kc],["Pepper_front",new URL("/assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",import.meta.url).href],["Cinnamon_back",kc],["Cinnamon_front",new URL("/assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",import.meta.url).href],["Roast_back",kc],["Roast_front",new URL("/assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",import.meta.url).href],["Spice_back",kc],["Spice_front",new URL("/assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",import.meta.url).href],["Sugar_back",kc],["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",Qr],["Ballista_front",new URL("/assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",import.meta.url).href],["PinVice_back",Qr],["PinVice_front",new URL("/assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",import.meta.url).href],["Rivet_back",Qr],["Rivet_front",new URL("/assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",import.meta.url).href],["Mainspring_back",Qr],["Mainspring_front",new URL("/assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",import.meta.url).href],["Mother_back",Qr],["Mother_front",new URL("/assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",import.meta.url).href],["Colossus_back",Qr],["Colossus_front",new URL("/assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",import.meta.url).href],["vHarriet_back",Qr],["vHarriet_front",new URL("/assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",import.meta.url).href],["Hoist_back",Qr],["Hoist_front",new URL("/assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",import.meta.url).href],["Locus_back",Qr],["Locus_front",new URL("/assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",import.meta.url).href],["Nomad_back",Qr],["Nomad_front",new URL("/assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",import.meta.url).href],["Ratchet_back",Qr],["Ratchet_front",new URL("/assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",import.meta.url).href],["Salvo_back",Qr],["Salvo_front",new URL("/assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",import.meta.url).href],["Velocity_back",Qr],["Velocity_front",new URL("/assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",import.meta.url).href],["vVelocity_back",Qr],["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",Ec],["Devana_front",new URL("/assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",import.meta.url).href],["Frelsi_back",Ec],["Frelsi_front",new URL("/assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",import.meta.url).href],["Ikaros_back",Ec],["Ikaros_front",new URL("/assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",import.meta.url).href],["Mataagi_back",Ec],["Mataagi_front",new URL("/assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",import.meta.url).href],["Minerva_back",Ec],["Minerva_front",new URL("/assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",import.meta.url).href],["Rundaas_back",Ec],["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",Nr],["Grange_front",new URL("/assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",import.meta.url).href],["Thresher_back",Nr],["Thresher_front",new URL("/assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",import.meta.url).href],["Festival_back",Nr],["Festival_front",new URL("/assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",import.meta.url).href],["Peck_back",Nr],["Peck_front",new URL("/assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",import.meta.url).href],["Buckwheat_back",Nr],["Buckwheat_front",new URL("/assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",import.meta.url).href],["Amber_back",Nr],["Amber_front",new URL("/assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",import.meta.url).href],["Bushel_back",Nr],["Bushel_front",new URL("/assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",import.meta.url).href],["Fallow_back",Nr],["Fallow_front",new URL("/assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",import.meta.url).href],["Harrow_back",Nr],["Harrow_front",new URL("/assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",import.meta.url).href],["vHonour_back",Nr],["vHonour_front",new URL("/assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",import.meta.url).href],["Jackstraw_back",Nr],["Jackstraw_front",new URL("/assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",import.meta.url).href],["Millstone_back",Nr],["Millstone_front",new URL("/assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",import.meta.url).href],["Ploughman_back",Nr],["Ploughman_front",new URL("/assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",import.meta.url).href],["Tater_back",Nr],["Tater_front",new URL("/assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",import.meta.url).href],["Windle_back",Nr],["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",$r],["Shark_front",new URL("/assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",import.meta.url).href],["Corsair_back",$r],["Corsair_front",new URL("/assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",import.meta.url).href],["Yukai_back",$r],["Yukai_front",new URL("/assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",import.meta.url).href],["Salt_back",$r],["Salt_front",new URL("/assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",import.meta.url).href],["Tentacles_back",$r],["Tentacles_front",new URL("/assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",import.meta.url).href],["Angel_back",$r],["Angel_front",new URL("/assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",import.meta.url).href],["Greyscales_back",$r],["Greyscales_front",new URL("/assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",import.meta.url).href],["Hag_back",$r],["Hag_front",new URL("/assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",import.meta.url).href],["Jac_back",$r],["Jac_front",new URL("/assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",import.meta.url).href],["Knuckles_back",$r],["Knuckles_front",new URL("/assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",import.meta.url).href],["Kraken_back",$r],["Kraken_front",new URL("/assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",import.meta.url).href],["Sakana_back",$r],["Sakana_front",new URL("/assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",import.meta.url).href],["vSakana_back",$r],["vSakana_front",new URL("/assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",import.meta.url).href],["Siren_back",$r],["Siren_front",new URL("/assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",import.meta.url).href],["vSiren_back",$r],["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",Dr],["Theron_front",new URL("/assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",import.meta.url).href],["Skatha_back",Dr],["Skatha_front",new URL("/assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",import.meta.url).href],["Steeljaw_back",Dr],["Steeljaw_front",new URL("/assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",import.meta.url).href],["Fahad_back",Dr],["Fahad_front",new URL("/assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",import.meta.url).href],["Snow_back",Dr],["Snow_front",new URL("/assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",import.meta.url).href],["Chaska_back",Dr],["Chaska_front",new URL("/assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",import.meta.url).href],["Edge_back",Dr],["Edge_front",new URL("/assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",import.meta.url).href],["Egret_back",Dr],["Egret_front",new URL("/assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",import.meta.url).href],["Hearne_back",Dr],["Hearne_front",new URL("/assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",import.meta.url).href],["vHearne_back",Dr],["vHearne_front",new URL("/assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",import.meta.url).href],["Jaecar_back",Dr],["Jaecar_front",new URL("/assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",import.meta.url).href],["vMinx_back",Dr],["vMinx_front",new URL("/assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",import.meta.url).href],["Seenah_back",Dr],["Seenah_front",new URL("/assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",import.meta.url).href],["Ulfr_back",Dr],["Ulfr_front",new URL("/assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",import.meta.url).href],["Zarola_back",Dr],["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",Ar],["Honour_front",new URL("/assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",import.meta.url).href],["Hammer_back",Ar],["Hammer_front",new URL("/assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",import.meta.url).href],["Corbelli_back",Ar],["Corbelli_front",new URL("/assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",import.meta.url).href],["Marbles_back",Ar],["Marbles_front",new URL("/assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",import.meta.url).href],["Wrecker_back",Ar],["Wrecker_front",new URL("/assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",import.meta.url).href],["Brick_back",Ar],["Brick_front",new URL("/assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",import.meta.url).href],["Champ_back",Ar],["Champ_front",new URL("/assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",import.meta.url).href],["Chisel_back",Ar],["Chisel_front",new URL("/assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",import.meta.url).href],["vChisel_back",Ar],["vChisel_front",new URL("/assets/GB-S4-Masons-19-08-18-CCBausup.jpg",import.meta.url).href],["Flint_back",Ar],["Flint_front",new URL("/assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",import.meta.url).href],["Granite_back",Ar],["Granite_front",new URL("/assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",import.meta.url).href],["Harmony_back",Ar],["Harmony_front",new URL("/assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",import.meta.url).href],["vHarmony_back",Ar],["vHarmony_front",new URL("/assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",import.meta.url).href],["Mallet_back",Ar],["Mallet_front",new URL("/assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",import.meta.url).href],["Tower_back",Ar],["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",Rc],["Shaft_front",new URL("/assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",import.meta.url).href],["Digger_back",Rc],["Digger_front",new URL("/assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",import.meta.url).href],["Fissure_back",Rc],["Fissure_front",new URL("/assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",import.meta.url).href],["Fuse_back",Rc],["Fuse_front",new URL("/assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",import.meta.url).href],["Mule_back",Rc],["Mule_front",new URL("/assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",import.meta.url).href],["Spade_back",Rc],["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",br],["Obulus_front",new URL("/assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",import.meta.url).href],["Scalpel_back",br],["Scalpel_front",new URL("/assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",import.meta.url).href],["Mourn_back",br],["Mourn_front",new URL("/assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",import.meta.url).href],["Dirge_back",br],["Dirge_front",new URL("/assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",import.meta.url).href],["Vileswarm_back",br],["Vileswarm_front",new URL("/assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",import.meta.url).href],["Bonesaw_back",br],["Bonesaw_front",new URL("/assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",import.meta.url).href],["Brainpan_back",br],["Brainpan_front",new URL("/assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",import.meta.url).href],["Memory_back",br],["Memory_front",new URL("/assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",import.meta.url).href],["Casket_back",br],["Casket_front",new URL("/assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",import.meta.url).href],["Cosset_back",br],["Cosset_front",new URL("/assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",import.meta.url).href],["Gaffer_back",br],["Gaffer_front",new URL("/assets/gaffer-front-large-box-BhDGw3yv.png",import.meta.url).href],["Ghast_back",br],["Ghast_front",new URL("/assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",import.meta.url).href],["Graves_back",br],["Graves_front",new URL("/assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",import.meta.url).href],["vGraves_back",br],["vGraves_front",new URL("/assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",import.meta.url).href],["vHemlocke_back",br],["vHemlocke_front",new URL("/assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",import.meta.url).href],["Silence_back",br],["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",Pc],["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",Pc],["Azimuth_front",new URL("/assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",import.meta.url).href],["Azimuth_back",Pc],["Ebb_back",Pc],["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",Pc],["Horizon_back",Pc],["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",Tc],["Piper_front",new URL("/assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",import.meta.url).href],["Squeak_back",Tc],["Squeak_front",new URL("/assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",import.meta.url).href],["Miasma_back",Tc],["Miasma_front",new URL("/assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",import.meta.url).href],["Pelage_back",Tc],["Pelage_front",new URL("/assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",import.meta.url).href],["Scourge_back",Tc],["Scourge_front",new URL("/assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",import.meta.url).href],["Skulk_back",Tc],["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",fl],["Herder_front",new URL("/assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",import.meta.url).href],["Babe_back",fl],["Babe_front",new URL("/assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",import.meta.url).href],["Crook_back",fl],["Crook_front",new URL("/assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",import.meta.url).href],["Hook_back",fl],["Hook_front",new URL("/assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",import.meta.url).href],["Lamb_back",fl],["Lamb_front",new URL("/assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",import.meta.url).href],["Ram_back",fl],["Ram_front",new URL("/assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",import.meta.url).href],["Shearer_back",fl],["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",Xr],["Blackheart_front",new URL("/assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",import.meta.url).href],["vRage_back",Xr],["vRage_front",new URL("/assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",import.meta.url).href],["vGreede_back",Xr],["vGreede_front",new URL("/assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",import.meta.url).href],["Coin_back",Xr],["Coin_front",new URL("/assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",import.meta.url).href],["Strongbox_back",Xr],["Strongbox_front",new URL("/assets/GB-S4-Union-20-03-12--TefmgjH.jpg",import.meta.url).href],["Avarisse_back",Xr],["Avarisse_front",new URL("/assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",import.meta.url).href],["Greede_back",Xr],["Greede_front",new URL("/assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",import.meta.url).href],["Decimate_back",Xr],["Decimate_front",new URL("/assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",import.meta.url).href],["Fangtooth_back",Xr],["Fangtooth_front",new URL("/assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",import.meta.url).href],["Gutter_back",Xr],["Gutter_front",new URL("/assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",import.meta.url).href],["Hemlocke_back",Xr],["Hemlocke_front",new URL("/assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",import.meta.url).href],["Minx_back",Xr],["Minx_front",new URL("/assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",import.meta.url).href],["Rage_back",Xr],["Rage_front",new URL("/assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",import.meta.url).href],["Snakeskin_back",Xr],["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",Oc],["Heat_front",new URL("/assets/heat-kg0Ne0rh.jpg",import.meta.url).href],["Heat_back",Oc],["Nightlight_front",new URL("/assets/nightlight-BICbD_Qy.jpg",import.meta.url).href],["Nightlight_back",Oc],["Phosphor_front",new URL("/assets/phosphor-CifRCYrC.jpg",import.meta.url).href],["Phosphor_back",Oc],["Soot_front",new URL("/assets/soot-CXEcs2BT.jpg",import.meta.url).href],["Soot_back",Oc],["Wick_front",new URL("/assets/wick-D10XZuyz.jpg",import.meta.url).href],["Wick_back",Oc]]);var ote=function(e){return e instanceof RegExp},ste=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"},ate=function(e){var t=[];return e.forEach(function(n){Array.isArray(n)?t=t.concat(n):t.push(n)}),t};function lte(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;ote(o)||(o=new RegExp("("+ste(o)+")","gi"));for(var s=e.split(o),a=1,l=s.length;a{let t=Ph(e,/\(◉(.*?)\)/g,(n,r)=>v.jsxs(It.Fragment,{children:["(◉",v.jsx("span",{style:{fontStyle:"italic"},children:n}),")"]},`i-a-${r}`));return t=Ph(t,/\(([^◉].*?)\)/g,(n,r)=>v.jsxs(It.Fragment,{children:["(",v.jsx("span",{style:{fontStyle:"italic"},children:n}),")"]},`i-${r}`)),t=Ph(t,/{([<>TKDGB]+)}/,(n,r)=>v.jsx(It.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=Ph(t,/\b([A-Z]+)\b/g,(n,r)=>v.jsx("span",{style:{letterSpacing:"-1px"},children:n},`tla-${r}`)),v.jsx(v.Fragment,{children:t})},ute=e=>{const t=e.model,n=t.id,{setting$:r}=ci(),[i,o]=C.useState(),[s,a]=C.useState();C.useEffect(()=>{const f=r==null?void 0:r.subscribe(h=>{o(h==null?void 0:h.toJSON().data.cardPreferences.preferredStyle),a(h==null?void 0:h.toJSON().data.language)});return()=>f==null?void 0:f.unsubscribe()});const[l,c]=go(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":ep(l.shadow??l.color).mix(ep.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(dte,{model:t,guild:l}),v.jsx(hte,{model:t})]}),v.jsx(pte,{model:t,gbcp:u}),v.jsx("div",{className:"character-plays-wrapper",children:v.jsx(gte,{model:t,gbcp:u})}),v.jsx(fte,{model:t,health$:e.health$})]})})},dte=({model:e,guild:t})=>v.jsxs("div",{className:"name-plate",children:[v.jsx("div",{className:"guild-icon",children:v.jsx(Ni,{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,'"']})]})]}),fte=({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(Ni,{icon:"skull",size:17})||i+1===e.recovery&&v.jsx(Ni,{icon:"bandage",size:22})||i+1===e.hp&&i+1},i))})},pte=({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)}))})},hte=({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}`})]}),NR=({test:e})=>v.jsx(Ni,{icon:e?"checkmark":"ballotX",size:14});function mte({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 gte=({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(It.Fragment,{children:[v.jsx(mte,{text:n.name}),v.jsx("span",{children:String(n.CST).split(",").map((r,i)=>v.jsxs("span",{children:[i>0&&"/",{CP:v.jsx(Ni,{icon:t?"ball":"GB",size:18}),CP2:v.jsx(Ni,{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(NR,{test:n.SUS})}),v.jsx("span",{children:v.jsx(NR,{test:n.OPT})}),v.jsx("div",{className:"text",children:oy(n.text)})]},n.name))]}),gg=It.memo(ute),vte=e=>{const t=e.model,n=t.id,{setting$:r}=ci(),[i,o]=C.useState();C.useEffect(()=>{const c=r==null?void 0:r.pipe(Vt(u=>u==null?void 0:u.toJSON().data.cardPreferences.preferredStyle)).subscribe(u=>o(u));return()=>c==null?void 0:c.unsubscribe()});const s=go(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":ep(s.shadow??s.color).mix(ep.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(Ni,{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(yte,{model:t}),v.jsx(bte,{model:t}),v.jsx(wte,{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(K0,{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(K0,{icon:t.guild2}),v.jsx(K0,{icon:t.guild1})]}),v.jsx("div",{className:"base-size",children:`Size ${t.base} mm`})]})]})]})})},K0=({icon:e})=>v.jsx("div",{className:"icon wrapper",children:v.jsx(Ni,{icon:e})});function DS({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 yte=({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(It.Fragment,{children:[v.jsxs("div",{className:"character-trait",children:[v.jsx("div",{className:`trait ${t.active&&"active"}`,children:v.jsx(DS,{text:t.name.concat(t.parameter?` [${t.parameter}]`:"")})}),v.jsx("span",{className:"text",children:oy(t.text)})]},`${t.name}-${n}`),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]},`ct-${n}`))]}),bte=({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(DS,{text:t}),v.jsx("span",{children:oy(n)})]}),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},wte=({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(DS,{text:t}),v.jsx("span",{children:oy(n)})]}),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},vg=It.memo(vte);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(gg,{model:t,health$:n,style:{"--scale":o}}),e]}),v.jsx("div",{className:"flip-card-back",children:v.jsx(vg,{model:t,style:{"--scale":o}})})]})})})}function $R(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function AS(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(n=>{typeof e[n]>"u"?e[n]=t[n]:$R(t[n])&&$R(e[n])&&Object.keys(t[n]).length>0&&AS(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 Ju(){const e=typeof document<"u"?document:{};return AS(e,GI),e}const xte={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 Ui(){const e=typeof window<"u"?window:{};return AS(e,xte),e}function Ste(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function _te(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function Q1(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function yg(){return Date.now()}function Cte(e){const t=Ui();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function kte(e,t){t===void 0&&(t="x");const n=Ui();let r,i,o;const s=Cte(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 Th(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function Ete(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function _i(){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,h)=>c==="next"&&f>=h||c==="prev"&&f<=h,d=()=>{a=new Date().getTime(),s===null&&(s=a);const f=Math.max(Math.min((a-s)/l,1),0),h=.5-Math.cos(f*Math.PI)/2;let m=o+h*(n-o);if(u(m,n)&&(m=n),t.wrapperEl.scrollTo({[r]:m}),u(m,n)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:m})}),i.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=i.requestAnimationFrame(d)};d()}function Os(e,t){t===void 0&&(t="");const n=[...e.children];return e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),t?n.filter(r=>r.matches(t)):n}function Rte(e,t){const n=t.contains(e);return!n&&t instanceof HTMLSlotElement?[...t.assignedElements()].includes(e):n}function bg(e){try{console.warn(e);return}catch{}}function X1(e,t){t===void 0&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:Ste(t)),n}function Pte(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 Tte(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 Ca(e,t){return Ui().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 Ote(e,t){const n=[];let r=e.parentElement;for(;r;)n.push(r),r=r.parentElement;return n}function AR(e,t,n){const r=Ui();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 q0;function jte(){const e=Ui(),t=Ju();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 q0||(q0=jte()),q0}let Y0;function Lte(e){let{userAgent:t}=e===void 0?{}:e;const n=VI(),r=Ui(),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_]+)/),h=i==="Win32";let m=i==="MacIntel";const g=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!u&&m&&n.touch&&g.indexOf(`${a}x${l}`)>=0&&(u=o.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),m=!1),c&&!h&&(s.os="android",s.android=!0),(u||f||d)&&(s.os="ios",s.ios=!0),s}function KI(e){return e===void 0&&(e={}),Y0||(Y0=Lte(e)),Y0}let Q0;function Ite(){const e=Ui(),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 Mte(){return Q0||(Q0=Ite()),Q0}function Nte(e){let{swiper:t,on:n,emit:r}=e;const i=Ui();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:h}=t;let m=f,g=h;d.forEach(E=>{let{contentBoxSize:b,contentRect:x,target:y}=E;y&&y!==t.el||(m=x?x.width:(b[0]||b).inlineSize,g=x?x.height:(b[0]||b).blockSize)}),(m!==f||g!==h)&&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 $te(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const o=[],s=Ui(),a=function(u,d){d===void 0&&(d={});const f=s.MutationObserver||s.WebkitMutationObserver,h=new f(m=>{if(t.__preventObserver__)return;if(m.length===1){i("observerUpdate",m[0]);return}const g=function(){i("observerUpdate",m[0])};s.requestAnimationFrame?s.requestAnimationFrame(g):s.setTimeout(g,0)});h.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(h)},l=()=>{if(t.params.observer){if(t.params.observeParents){const u=Ote(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 Ate(){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(Ca(r,"padding-left")||0,10)-parseInt(Ca(r,"padding-right")||0,10),n=n-parseInt(Ca(r,"padding-top")||0,10)-parseInt(Ca(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 Bte(){const e=this;function t(L,M){return parseFloat(L.getPropertyValue(e.getDirectionLabel(M))||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 h=[],m=[];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,x=e.slidesGrid.length;let y=n.spaceBetween,_=-g,k=0,O=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&&(Oh(r,"--swiper-centered-offset-before",""),Oh(r,"--swiper-centered-offset-after",""));const R=n.grid&&n.grid.rows>1&&e.grid;R?e.grid.initSlides(u):e.grid&&e.grid.unsetSlides();let T;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=m[0]+y;if(n.slidesPerGroup>1){const M=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(M=>{M.style[L]=`${y}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let L=0;m.forEach(F=>{L+=F+(y||0)}),L-=y;const M=L-o;f=f.map(F=>F<=0?-g:F>M?M+E:F)}if(n.centerInsufficientSlides){let L=0;m.forEach(F=>{L+=F+(y||0)}),L-=y;const M=(n.slidesOffsetBefore||0)+(n.slidesOffsetAfter||0);if(L+M{f[K]=z-F}),h.forEach((z,K)=>{h[K]=z+F})}}if(Object.assign(e,{slides:u,snapGrid:f,slidesGrid:h,slidesSizesGrid:m}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){Oh(r,"--swiper-centered-offset-before",`${-f[0]}px`),Oh(r,"--swiper-centered-offset-after",`${e.size/2-m[m.length-1]/2}px`);const L=-e.snapGrid[0],M=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(F=>F+L),e.slidesGrid=e.slidesGrid.map(F=>F+M)}if(d!==c&&e.emit("slidesLengthChange"),f.length!==b&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==x&&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`,M=e.el.classList.contains(L);d<=n.maxBackfaceHiddenSlides?M||e.el.classList.add(L):M&&e.el.classList.remove(L)}}function Fte(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 zte(){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 Ute(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&&h<=t.size-t.slidesSizesGrid[l],E=h>=0&&h1&&m<=t.size||h<=0&&m>=t.size;E&&(t.visibleSlides.push(c),t.visibleSlidesIndexes.push(l)),BR(c,E,n.slideVisibleClass),BR(c,g,n.slideFullyVisibleClass),c.progress=i?-d:d,c.originalProgress=i?-f:f}}function Wte(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],h=t.slidesGrid[d],m=t.slidesGrid[t.slidesGrid.length-1],g=Math.abs(e);g>=f?a=(g-f)/m:a=(g+m-h)/m,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 X0=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function Gte(){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=Tte(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!u&&(u=t[0]),c=Pte(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!c===0&&(c=t[t.length-1]))),t.forEach(d=>{X0(d,d===l,n.slideActiveClass),X0(d,d===u,n.slideNextClass),X0(d,d===c,n.slidePrevClass)}),e.emitSlidesClasses()}const om=(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()}},J0=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},J1=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)&&J0(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)&&J0(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 Vte(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=h=>{let m=h-t.virtual.slidesBefore;return m<0&&(m=t.virtual.slides.length+m),m>=t.virtual.slides.length&&(m-=t.virtual.slides.length),m};if(typeof l>"u"&&(l=Hte(t)),r.indexOf(n)>=0)c=r.indexOf(n);else{const h=Math.min(i.slidesPerGroupSkip,l);c=h+Math.floor((l-h)/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 h=t.slides.filter(g=>g.column===l)[0];let m=parseInt(h.getAttribute("data-swiper-slide-index"),10);Number.isNaN(m)&&(m=Math.max(t.slides.indexOf(h),0)),f=Math.floor(m/i.grid.rows)}else if(t.slides[l]){const h=t.slides[l].getAttribute("data-swiper-slide-index");h?f=parseInt(h,10):f=l}else f=l;Object.assign(t,{previousSnapIndex:a,snapIndex:c,previousRealIndex:s,realIndex:f,previousIndex:o,activeIndex:l}),t.initialized&&J1(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==f&&t.emit("realIndexChange"),t.emit("slideChange"))}function Kte(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 x;if(s>d?x="next":s0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{h[y?"scrollLeft":"scrollTop"]=_})):h[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;h.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,x),t===0?o.transitionEnd(n,x):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,x))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0}function sne(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(h=>h.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-ah.getAttribute("data-swiper-slide-index")*1===f)[0].column}else s=i.getSlideIndexByData(s)}return requestAnimationFrame(()=>{i.slideTo(s,t,n,r)}),i}function ane(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 lne(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 h=f(d),m=o.map(b=>f(b));let g=o[m.indexOf(h)-1];if(typeof g>"u"&&i.cssMode){let b;o.forEach((x,y)=>{h>=x&&(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 cne(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 une(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 dne(){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]),Q1(()=>{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]),Q1(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}var fne={slideTo:one,slideToLoop:sne,slideNext:ane,slidePrev:lne,slideReset:cne,slideToClosest:une,slideToClickedSlide:dne};function pne(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(h.slideActiveClass))[0]):k=o;const O=r==="next"||!r,R=r==="prev"||!r;let T=0,$=0;const L=x?Math.ceil(c.length/h.grid.rows):c.length,F=(x?c[o].column:o)+(m&&typeof i>"u"?-g/2+.5:0);if(F=0;oe-=1)c[oe].column===Z&&y.push(oe)}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;x?c.forEach((Z,oe)=>{Z.column===K&&_.push(oe)}):_.push(K)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),R&&y.forEach(z=>{c[z].swiperLoopMoveDOM=!0,f.prepend(c[z]),c[z].swiperLoopMoveDOM=!1}),O&&_.forEach(z=>{c[z].swiperLoopMoveDOM=!0,f.append(c[z]),c[z].swiperLoopMoveDOM=!1}),l.recalcSlides(),h.slidesPerView==="auto"?l.updateSlides():x&&(y.length>0&&R||_.length>0&&O)&&l.slides.forEach((z,K)=>{l.grid.updateSlide(K,z,l.slides)}),h.watchSlidesProgress&&l.updateSlidesOffset(),n){if(y.length>0&&R){if(typeof t>"u"){const z=l.slidesGrid[k],Z=l.slidesGrid[k+T]-z;a?l.setTranslate(l.translate-Z):(l.slideTo(k+Math.ceil(T),0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-Z,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-Z))}else if(i){const z=x?y.length/h.grid.rows:y.length;l.slideTo(l.activeIndex+z,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(_.length>0&&O)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=x?_.length/h.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===h.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===h.slidesPerView?n:!1})}l.emit("loopFix")}function mne(){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 gne={loopCreate:pne,loopFix:hne,loopDestroy:mne};function vne(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 yne(){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 bne={setGrabCursor:vne,unsetGrabCursor:yne};function wne(e,t){t===void 0&&(t=this);function n(r){if(!r||r===Ju()||r===Ui())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 FR(e,t,n){const r=Ui(),{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 xne(e){const t=this,n=Ju();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"){FR(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"&&!Rte(l,t.wrapperEl)||"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?wne(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 h=s.currentX,m=s.currentY;if(!FR(t,r,h))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=h,s.startY=m,i.touchStartTime=yg(),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 Sne(e){const t=Ju(),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(O=>O.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=yg());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,h=o.currentY-o.startY;if(n.params.threshold&&Math.sqrt(f**2+h**2)"u"){let O;n.isHorizontal()&&o.currentY===o.startY||n.isVertical()&&o.currentX===o.startX?r.isScrolling=!1:f*f+h*h>=25&&(O=Math.atan2(Math.abs(h),Math.abs(f))*180/Math.PI,r.isScrolling=n.isHorizontal()?O>i.touchAngle:90-O>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 m=n.isHorizontal()?f:h,g=n.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;i.oneWayMovement&&(m=Math.abs(m)*(s?1:-1),g=Math.abs(g)*(s?1:-1)),o.diff=m,m*=i.touchRatio,s&&(m=-m,g=-g);const E=n.touchesDirection;n.swipeDirection=m>0?"prev":"next",n.touchesDirection=g>0?"prev":"next";const b=n.params.loop&&!i.cssMode,x=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(b&&x&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const O=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(O)}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&&x&&Math.abs(m)>=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=m+r.startTranslate;let _=!0,k=i.resistanceRatio;if(i.touchReleaseOnEdges&&(k=0),m>0?(b&&x&&!y&&r.allowThresholdMove&&r.currentTranslate>(i.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-(i.slidesPerView!=="auto"&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween: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+m)**k))):m<0&&(b&&x&&!y&&r.allowThresholdMove&&r.currentTranslate<(i.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+(i.slidesPerView!=="auto"&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):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(m)>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 _ne(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=yg(),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=yg(),Q1(()=>{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 h;if(s.followFinger?h=l?t.translate:-t.translate:h=-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:h});return}const m=h>=-t.maxTranslate()&&!t.params.loop;let g=0,E=t.slidesSizesGrid[0];for(let k=0;k=c[k]&&h=c[k])&&(g=k,E=c[c.length-1]-c[c.length-2])}let b=null,x=null;s.rewind&&(t.isBeginning?x=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(b=0));const y=(h-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+_):x!==null&&y<0&&Math.abs(y)>s.longSwipesRatio?t.slideTo(x):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(x!==null?x:g))}}function zR(){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 Cne(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function kne(){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 Ene(e){const t=this;om(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function Rne(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const YI=(e,t)=>{const n=Ju(),{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",zR,!0):e[c]("observerUpdate",zR,!0),i[l]("load",e.onLoad,{capture:!0}))};function Pne(){const e=this,{params:t}=e;e.onTouchStart=xne.bind(e),e.onTouchMove=Sne.bind(e),e.onTouchEnd=_ne.bind(e),e.onDocumentTouchStart=Rne.bind(e),t.cssMode&&(e.onScroll=kne.bind(e)),e.onClick=Cne.bind(e),e.onLoad=Ene.bind(e),YI(e,"on")}function Tne(){YI(this,"off")}var One={attachEvents:Pne,detachEvents:Tne};const UR=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function jne(){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=UR(e,r),u=UR(e,l),d=e.params.grabCursor,f=l.grabCursor,h=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 m=l.direction&&l.direction!==r.direction,g=r.loop&&(l.slidesPerView!==r.slidesPerView||m),E=r.loop;m&&n&&e.changeDirection(),_i(e.params,l);const b=e.params.enabled,x=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),h&&!b?e.disable():!h&&b&&e.enable(),e.currentBreakpoint=s,e.emit("_beforeBreakpoint",l),n&&(g?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!E&&x?(e.loopCreate(t),e.updateSlides()):E&&!x&&e.loopDestroy()),e.emit("breakpoint",l)}function Lne(e,t,n){if(t===void 0&&(t="window"),!e||t==="container"&&!n)return;let r=!1;const i=Ui(),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 Nne(){const e=this,{classNames:t,params:n,rtl:r,el:i,device:o}=e,s=Mne(["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 $ne(){const e=this,{el:t,classNames:n}=e;!t||typeof t=="string"||(t.classList.remove(...n),e.emitContainerClasses())}var Dne={addClasses:Nne,removeClasses:$ne};function Ane(){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 Bne={checkOverflow:Ane},Z1={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 Fne(e,t){return function(r){r===void 0&&(r={});const i=Object.keys(r)[0],o=r[i];if(typeof o!="object"||o===null){_i(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)){_i(t,r);return}typeof e[i]=="object"&&!("enabled"in e[i])&&(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),_i(t,r)}}const Z0={eventsEmitter:Dte,update:qte,translate:ene,transition:ine,slide:fne,loop:gne,grabCursor:bne,events:One,breakpoints:Ine,checkOverflow:Bne,classes:Dne},eb={};let BS=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=_i({},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=Mte(),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:Fne(n,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});const c=_i({},Z1,l);return a.params=_i({},c,eb,n),a.originalParams=_i({},a.params),a.passedParams=_i({},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 h=c+1;hl&&(f=!0));for(let h=c-1;h>=0;h-=1)o[h]&&!f&&(d+=o[h].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&&om(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=X1("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"||Ca(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||Ca(r,"direction")==="rtl"),wrongRTL:Ca(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?om(n,o):o.addEventListener("load",s=>{om(n,s.target)})}),J1(n),n.initialized=!0,J1(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),_te(r)),r.destroyed=!0),null}static extendDefaults(t){_i(eb,t)}static get extendedDefaults(){return eb}static get defaults(){return Z1}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(Z0).forEach(e=>{Object.keys(Z0[e]).forEach(t=>{BS.prototype[t]=Z0[e][t]})});BS.use([Nte,$te]);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 ec(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function du(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]:ec(t[r])&&ec(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:du(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 zne(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function Une(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:h,virtual:m,thumbs:g}=t;let E,b,x,y,_,k,O,R;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&&(x=!0),i.includes("scrollbar")&&r.scrollbar&&(r.scrollbar.el||a)&&(u.scrollbar||u.scrollbar===!1)&&h&&!h.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 T=$=>{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?O=!0:R=!0),c.forEach($=>{if(ec(u[$])&&ec(r[$]))Object.assign(u[$],r[$]),($==="navigation"||$==="pagination"||$==="scrollbar")&&"enabled"in r[$]&&!r[$].enabled&&T($);else{const L=r[$];(L===!0||L===!1)&&($==="navigation"||$==="pagination"||$==="scrollbar")?L===!1&&T($):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&&m&&u.virtual.enabled?(m.slides=n,m.update(!0)):i.includes("virtual")&&m&&u.virtual.enabled&&(n&&(m.slides=n),m.update(!0)),i.includes("children")&&n&&u.loop&&(R=!0),E&&g.init()&&g.update(!0),b&&(t.controller.control=u.controller.control),x&&(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),h.init(),h.updateSize(),h.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||R)&&t.loopDestroy(),(O||R)&&t.loopCreate(),t.update()}function Wne(e,t){e===void 0&&(e={}),t===void 0&&(t=!0);const n={on:{}},r={},i={};du(n,Z1),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?ec(e[l])?(n[l]={},i[l]={},du(n[l],e[l]),du(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 Gne(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 Hne(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(ec(e[l])&&ec(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 Vne=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 wg(){return wg=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 Kne(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return It.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 qne(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)=>It.cloneElement(u,{swiper:e,style:i,key:u.props.virtualIndex||u.key||`slide-${d}`}))}function pf(e,t){return typeof window>"u"?C.useEffect(e,t):C.useLayoutEffect(e,t)}const WR=C.createContext(null),Yne=C.createContext(null),Lp=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),[h,m]=C.useState(!1),g=C.useRef(!1),E=C.useRef(null),b=C.useRef(null),x=C.useRef(null),y=C.useRef(null),_=C.useRef(null),k=C.useRef(null),O=C.useRef(null),R=C.useRef(null),{params:T,passedParams:$,rest:L,events:M}=Wne(a),{slides:F,slots:z}=Kne(o),K=()=>{m(!h)};Object.assign(T.on,{_containerClasses(V,le){u(le)}});const Z=()=>{Object.assign(T.on,M),l=!0;const V={...T};if(delete V.wrapperClass,b.current=new BS(V),b.current.virtual&&b.current.params.virtual.enabled){b.current.virtual.slides=F;const le={cache:!1,slides:F,renderExternal:f,renderExternalUpdate:!1};du(b.current.params.virtual,le),du(b.current.originalParams.virtual,le)}};E.current||Z(),b.current&&b.current.on("_beforeBreakpoint",K);const oe=()=>{l||!M||!b.current||Object.keys(M).forEach(V=>{b.current.on(V,M[V])})},fe=()=>{!M||!b.current||Object.keys(M).forEach(V=>{b.current.off(V,M[V])})};C.useEffect(()=>()=>{b.current&&b.current.off("_beforeBreakpoint",K)}),C.useEffect(()=>{!g.current&&b.current&&(b.current.emitSlidesClasses(),g.current=!0)}),pf(()=>{if(t&&(t.current=E.current),!!E.current)return b.current.destroyed&&Z(),Gne({el:E.current,nextEl:_.current,prevEl:k.current,paginationEl:O.current,scrollbarEl:R.current,swiper:b.current},T),s&&!b.current.destroyed&&s(b.current),()=>{b.current&&!b.current.destroyed&&b.current.destroy(!0,!1)}},[]),pf(()=>{oe();const V=Hne($,x.current,F,y.current,le=>le.key);return x.current=$,y.current=F,V.length&&b.current&&!b.current.destroyed&&Une({swiper:b.current,slides:F,passedParams:$,changedParams:V,nextEl:_.current,prevEl:k.current,scrollbarEl:R.current,paginationEl:O.current}),()=>{fe()}}),pf(()=>{Vne(b.current)},[d]);function H(){return T.virtual?qne(b.current,F,d):F.map((V,le)=>It.cloneElement(V,{swiper:b.current,swiperSlideIndex:le}))}return It.createElement(r,wg({ref:E,className:eM(`${c}${n?` ${n}`:""}`)},L),It.createElement(Yne.Provider,{value:b.current},z["container-start"],It.createElement(i,{className:zne(T.wrapperClass)},z["wrapper-start"],H(),z["wrapper-end"]),XI(T)&&It.createElement(It.Fragment,null,It.createElement("div",{ref:k,className:"swiper-button-prev"}),It.createElement("div",{ref:_,className:"swiper-button-next"})),ZI(T)&&It.createElement("div",{ref:R,className:"swiper-scrollbar"}),JI(T)&&It.createElement("div",{ref:O,className:"swiper-pagination"}),z["container-end"]))});Lp.displayName="Swiper";const Du=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,h]=C.useState("swiper-slide"),[m,g]=C.useState(!1);function E(_,k,O){k===d.current&&h(O)}pf(()=>{if(typeof c<"u"&&(d.current.swiperSlideIndex=c),t&&(t.current=d.current),!(!d.current||!o)){if(o.destroyed){f!=="swiper-slide"&&h("swiper-slide");return}return o.on("_slideClass",E),()=>{o&&o.off("_slideClass",E)}}}),pf(()=>{o&&d.current&&!o.destroyed&&h(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},x=()=>typeof r=="function"?r(b):r,y=()=>{g(!0)};return It.createElement(n,wg({ref:d,className:eM(`${f}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:y},u),s&&It.createElement(WR.Provider,{value:b},It.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s=="number"?s:void 0},x(),a&&!m&&It.createElement("div",{className:"swiper-lazy-preloader"}))),!s&&It.createElement(WR.Provider,{value:b},x(),a&&!m&&It.createElement("div",{className:"swiper-lazy-preloader"})))});Du.displayName="SwiperSlide";const Qne=({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 Xne(){const[e,t]=C.useState(!1),[n,r]=C.useState(!1),i=sA(C.useCallback(s=>s.nextLocation.pathname.startsWith("/game")?(t(!0),!0):!1,[t]));C.useEffect(()=>{r(!0)},[n,r]);const{active:o}=na();return v.jsxs(tn,{style:{width:"100%",height:"100%",display:"flex",flexDirection:"row"},children:[v.jsx(hs,{children:v.jsxs(tn,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[v.jsxs(Xa,{separator:v.jsx(sc,{fontSize:"small"}),children:[v.jsx(Fo,{color:"inherit",href:"/game",size:"small",disabled:o,children:v.jsx(PS,{})}),o?v.jsx(Ct,{children:"Draft"}):v.jsx(Eo,{underline:"hover",color:"inherit",href:"/game/draft",children:"Draft"}),v.jsx(Ct,{children:"Play"})]}),v.jsx(OS,{})]})}),v.jsx(Jne,{}),v.jsx(k7,{open:e,onClose:()=>t(!1),autoHideDuration:5e3,children:v.jsx(u8,{severity:"warning",action:v.jsx(vn,{size:"small",onClick:i.proceed,children:"Exit Game"}),children:"Making changes to the team selections will reset the game state."})})]})}function Jne(){const e=Bi(),t=_x(e.breakpoints.up("sm")),{active:n}=na(),{gameState1$:r,gameState2$:i}=iy(),[o,s]=C.useState();C.useEffect(()=>{if(!r)return;let d=!1;return(async()=>{const h=await Fn(r);d||s(h)})(),()=>{d=!0}},[r]);const[a,l]=C.useState();C.useEffect(()=>{if(!i)return;let d=!1;return(async()=>{const h=await Fn(i);d||l(h)})(),()=>{d=!0}},[i]);const[c,u]=go(async d=>{if(!o||!a)return;const f=await d.models.find().where("id").in(o.roster.map(E=>E.name)).exec(),h=await Promise.all(f.map(E=>E.expand()));qs(h,"id",o.roster.map(E=>E.name));const m=await d.models.find().where("id").in(a.roster.map(E=>E.name)).exec(),g=await Promise.all(m.map(E=>E.expand()));return qs(g,"id",a.roster.map(E=>E.name)),[h,g]},[o,a])??[];return!o||!a||!c||!u?null:t?v.jsxs(v.Fragment,{children:[v.jsx(tb,{teams:[o],rosters:[c],disabled:[!1]}),v.jsx(Lo,{orientation:"vertical"}),v.jsx(tb,{teams:[a],rosters:[u],disabled:[!!n]})]}):v.jsx(tb,{teams:[o,a],rosters:[c,u],disabled:[!1,!!n]})}const tb=({teams:e,rosters:t,disabled:n})=>{const r=Bi(),i=_x(r.breakpoints.up("sm")),o=C.useRef(null),[s,a]=C.useState(!1),[l,c]=C.useState(0),[u,d]=C.useState(!0),[f,h]=C.useState(500),[m,g]=C.useState(700),[E,b]=C.useState(700);C.useLayoutEffect(()=>(x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)));const x=C.useCallback(()=>{var O,R;const y=((O=o.current)==null?void 0:O.getBoundingClientRect().width)??0,_=((R=o.current)==null?void 0:R.getBoundingClientRect().height)??0,k=i?56:112;h(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(ite,{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(Cv,{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(Lp,{initialSlide:l,direction:"vertical",centeredSlides:!0,spaceBetween:(E-Math.min(m,500))/2,onInit:y=>{y.el.style.width=`${Math.min(f,500)}px`,y.el.style.height=`${Math.min(m,700)}px`},style:{overflow:"visible"},children:e.map((y,_)=>[()=>v.jsx(rM,{guild:y.guild}),t[_].map((k,O)=>()=>v.jsx(WI,{model:k,health$:y.get$("roster").pipe(Vt(R=>R[O].health)),children:v.jsx(Zne,{model:k,state:e[_],disabled:n[_]})}))]).flat(2).map((y,_)=>v.jsx(Du,{children:v.jsx("div",{style:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:y==null?void 0:y()})},_))})})})]})};function Zne({state:e,model:t,disabled:n=!1}){return v.jsx(fs,{elevation:2,sx:{position:"absolute",right:0,bottom:0},children:v.jsx(zI,{state:e,model:t,disabled:n,stacked:!0})})}function ere(){const e=Zs(),{setting$:t}=ci(),[n,r]=C.useState(null);C.useEffect(()=>{t&&Fn(t).then(h=>h==null?void 0:h.incrementalPatch({gamePlayRoute:`${e.pathname}${e.search}`})).catch(console.error)},[e,t]);const{gbdb:i}=Kr(),{active:o,netDoc:s}=na(),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 h=i==null?void 0:i.game_state.findOne(a).$;if(u(h),!h)return;let m=!1;return(async()=>{if(m)return;await Fn(h)===null&&await(i==null?void 0:i.game_state.upsert({_id:a,roster:[]}))})().catch(console.error),()=>{m=!0}},[i,a]);const[d,f]=C.useState();return C.useEffect(()=>{const h=i==null?void 0:i.game_state.findOne(l).$;if(f(h),!h)return;let m=!1;return(async()=>{if(m)return;await Fn(h)===null&&!o&&await(i==null?void 0:i.game_state.upsert({_id:l,roster:[]}))})().catch(console.error),()=>{m=!0}},[i,l,o]),v.jsxs("main",{style:{width:"100%",height:"100%",overflow:"auto",display:"flex"},children:[v.jsxs(hs,{children:[v.jsx(tn,{ref:h=>r(h),sx:{width:"100%",display:"flex",flexDirection:"row"}}),v.jsx(EJ,{})]}),v.jsx(RS.Provider,{value:n,children:v.jsx(ex,{context:{gameState1$:c,gameState2$:d}})})]})}function tre({model:e}){const{setting$:t}=ci(),n=C.useRef(null),[r,i]=C.useState(1),[o,s]=C.useState();C.useEffect(()=>{const d=t==null?void 0:t.pipe(Vt(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(),h=d/1e3,m=f/700,g=Math.min(h,m,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(gg,{model:e,noBackground:!!u,style:{"--scale":r,borderTopRightRadius:0,borderBottomRightRadius:0}}),v.jsx(vg,{model:e,noBackground:!!u,style:{"--scale":r,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})}const nre="/assets/GB-S4-Reference-1-Cx3eC7d4.png",rre="/assets/GB-S4-Reference-2-CJ4YgyH9.png",ire="/assets/GB-S4-Reference-3-BTbZpB51.png",ore="/assets/GB-S4-Reference-4-CpP58Tap.png",sre="/assets/GB-S4-Reference-5-Be8xjsp1.png",are=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(${are})`,...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})})},lre=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":nre,"../assets/cards/Reference/GB-S4-Reference-2.png":rre,"../assets/cards/Reference/GB-S4-Reference-3.png":ire,"../assets/cards/Reference/GB-S4-Reference-4.png":ore,"../assets/cards/Reference/GB-S4-Reference-5.png":sre})[`../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}})},cre=e=>v.jsx(oM,{children:v.jsx(sM,{...e})});function ure(){const e=Zs(),{setting$:t}=ci(),[n]=IA(),r=C.useRef(n.get("m"));return C.useEffect(()=>{if(t)return Fn(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${r.current}`})).catch(console.error),()=>{Fn(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(ex,{context:{slideRef:r}})})})}function dre(){const{slideRef:e}=lp();return e.current=0,v.jsxs(v.Fragment,{children:[v.jsx(hs,{children:v.jsx(Xa,{separator:v.jsx(sc,{fontSize:"small"}),children:v.jsx(Ct,{children:"Library"})})}),v.jsx(SI,{Controller:fre}),v.jsx(ac,{})]})}function fre(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(H1,{g:{key:"gameplans",name:"gameplans",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("gameplans"),size:e.size}),v.jsx(H1,{g:{key:"refcards",name:"Rules",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("refcards"),size:e.size})]})}function pre(){const{guild:e}=QD(),t=Bi(),n=_x(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,x;const g=((b=r.current)==null?void 0:b.getBoundingClientRect().width)??0,E=((x=r.current)==null?void 0:x.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}=lp(),[h,m]=go(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}qs(b,"id",E.roster);const x=await Promise.all(b.map(y=>y.expand()));return[E,x]},[e,d])??[];return!h||!m?null:v.jsxs(v.Fragment,{children:[v.jsx(hs,{children:v.jsxs(Xa,{separator:v.jsx(sc,{fontSize:"small"}),children:[v.jsx(Eo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(Ct,{children:h.name})]})}),v.jsx(gre,{guild:h,swiper:c}),v.jsxs(tn,{ref:r,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsxs(Lp,{onSwiper:u,initialSlide:f.current,onSlideChange:g=>{f.current=g.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:s},children:[v.jsx(Du,{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(Qne,{guild:h.name}):v.jsx(rM,{guild:h.name})})},h.name),m.map(g=>v.jsx(Du,{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(tre,{model:g}):v.jsx(WI,{model:g})})},g.id))]}),v.jsx(ac,{})]})]})}function hre(){const t=C.useRef(null),[n,r]=C.useState(500),[i,o]=C.useState(700),s=C.useCallback(()=>{var h,m;const d=((h=t.current)==null?void 0:h.getBoundingClientRect().width)??0,f=((m=t.current)==null?void 0:m.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}=lp(),{gameplans:u}=Kr();return u?v.jsxs(v.Fragment,{children:[v.jsx(hs,{children:v.jsxs(Xa,{separator:v.jsx(sc,{fontSize:"small"}),children:[v.jsx(Eo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(Ct,{children:"Gameplan Cards"})]})}),v.jsx(vre,{swiper:a}),v.jsxs(tn,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsx(Lp,{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(Du,{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(lre,{gameplan:d})})},`gameplan-${f}`))}),v.jsx(ac,{})]})]}):null}function mre(){const t=C.useRef(null),[n,r]=C.useState(500),[i,o]=C.useState(700),s=C.useCallback(()=>{var f,h;const u=((f=t.current)==null?void 0:f.getBoundingClientRect().width)??0,d=((h=t.current)==null?void 0:h.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}=lp();return v.jsxs(v.Fragment,{children:[v.jsx(hs,{children:v.jsxs(Xa,{separator:v.jsx(sc,{fontSize:"small"}),children:[v.jsx(Eo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(Ct,{children:"Rules Reference Cards"})]})}),v.jsx(yre,{swiper:a}),v.jsxs(tn,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsx(Lp,{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(Du,{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,{index:u})})},`ref-${u}`))}),v.jsx(ac,{})]})]})}function gre(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(tn,{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(Ni,{icon:t.name,className:"dark",fontSize:"32px",style:{flexShrink:0}})})})}),r.map((i,o)=>v.jsx(Fx,{color:"primary",label:i,onClick:()=>{n==null||n.slideTo(o+1)}},o))]}),v.jsx("div",{style:{flex:"1 1"}})]})}function vre(e){const{gameplans:t}=Kr(),{swiper:n}=e;return t?v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsx(tn,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:t.map((r,i)=>v.jsx(Fx,{color:"primary",label:r.title,onClick:()=>{n==null||n.slideTo(i)}},i))}),v.jsx("div",{style:{flex:"1 1"}})]}):null}function yre(e){const{gameplans:t}=Kr(),{swiper:n}=e;return t?v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsx(tn,{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(Fx,{color:"primary",label:r,onClick:()=>{n==null||n.slideTo(i)}},i))}),v.jsx("div",{style:{flex:"1 1"}})]}):null}const bre={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 wre=bre;const hf=wre,aM={},xg={},lM=[],cM=[],uM=[];for(const e in hf){const{name:t,nativeName:n}=hf[e];aM[e]=xg[t.toLowerCase()]=xg[n.toLowerCase()]={code:e,name:t,nativeName:n},lM.push(e),cM.push(t),uM.push(n)}var xre=class sm{static getLanguages(t=[]){return t.map(n=>sm.validate(n)?Object.assign({},aM[n]):{code:n,name:"",nativeName:""})}static getName(t){return sm.validate(t)?hf[t].name:""}static getAllNames(){return cM.slice()}static getNativeName(t){return sm.validate(t)?hf[t].nativeName:""}static getAllNativeNames(){return uM.slice()}static getCode(t){return t=t.toLowerCase(),xg.hasOwnProperty(t)?xg[t].code:""}static getAllCodes(){return lM.slice()}static validate(t){return hf.hasOwnProperty(t)}};const GR=Ga(xre),Sre=()=>{var s;const{manifest:e}=Kr(),{setting$:t}=ci(),{i18n:n}=fZ(),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(tn,{component:"main",sx:{p:"1rem"},children:[v.jsx(hs,{children:v.jsx(Xa,{children:v.jsx(Ct,{children:"Settings"})})}),v.jsxs(Ct,{variant:"h6",children:["GB Playbook ","2.1.0"]}),v.jsxs(Ct,{variant:"caption",children:["(","2024-08-29T18:12:30.940Z",")"]}),v.jsx(Lo,{sx:{my:2}}),v.jsx(Ct,{children:"Season and Errata Version:"}),v.jsx(bl,{children:v.jsx(El,{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(Si,{value:a.filename,children:`[${a.version}] ${a.description}`},l))})}),v.jsx("p",{}),v.jsx(Ct,{children:"Language Preference"}),v.jsx(Ct,{variant:"subtitle2",children:"(available languages vary by Season and Errata setting)"}),v.jsx(bl,{children:v.jsxs(El,{value:i.toJSON().data.language??"auto",onChange:a=>{i==null||i.incrementalPatch({language:a.target.value})},children:[v.jsx(Si,{value:"auto",children:`Automatic Detection (${GR.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(Si,{value:a,children:`${GR.getNativeName(a)}`},l))]})}),v.jsx(Lo,{sx:{my:2}}),v.jsx(Ct,{children:"UI Options:"}),v.jsx(Ct,{children:"Initial Screen:"}),v.jsx(bl,{children:v.jsxs(El,{value:i==null?void 0:i.toJSON().data.initialScreen,onChange:a=>{i==null||i.incrementalPatch({initialScreen:a.target.value})},children:[v.jsx(Si,{value:"/game",children:"Game Play"}),v.jsx(Si,{value:"/library",children:"Card Library"})]})}),v.jsx("p",{}),v.jsx(bl,{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(Ct,{children:"Prefered Card Layout:"}),v.jsx(Ct,{variant:"subtitle2",children:"(Only applies to updated cards, where both styles are available)"}),v.jsx(bl,{children:v.jsxs(El,{value:i==null?void 0:i.toJSON().data.cardPreferences.preferredStyle,onChange:a=>{i==null||i.incrementalPatch({cardPreferences:{preferredStyle:a.target.value}})},children:[v.jsx(Si,{value:"sfg",children:"Steamforged"}),v.jsx(Si,{value:"gbcp",children:"Community"})]})})]})};var FS={},_re=uo;Object.defineProperty(FS,"__esModule",{value:!0});var dM=FS.default=void 0,Cre=_re(ps()),kre=v;dM=FS.default=(0,Cre.default)((0,kre.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 zS={},Ere=uo;Object.defineProperty(zS,"__esModule",{value:!0});var fM=zS.default=void 0,Rre=Ere(ps()),Pre=v;fM=zS.default=(0,Rre.default)((0,Pre.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 US={},Tre=uo;Object.defineProperty(US,"__esModule",{value:!0});var pM=US.default=void 0,Ore=Tre(ps()),jre=v;pM=US.default=(0,Ore.default)((0,jre.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 WS={},Lre=uo;Object.defineProperty(WS,"__esModule",{value:!0});var hM=WS.default=void 0,Ire=Lre(ps()),Mre=v;hM=WS.default=(0,Ire.default)((0,Mre.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 Nre=e=>{const[t,n]=C.useState(null),r=!!t,i=m=>{n(m.currentTarget)},o=()=>{n(null)},[s,a]=C.useState(!0),{doubleCard:l,setDouble:c,withBleed:u,setBleed:d,noFun:f,setNoFun:h}=e;return C.useEffect(()=>{const m=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: ${m}; + margin: 0; + } + .Cards > .card { + margin: 0; + } + } + `),document.head.appendChild(g),()=>{document.head.removeChild(g)}},[l,u,s]),v.jsxs(v.Fragment,{children:[v.jsx(Xh,{title:"Print Settings",arrow:!0,children:v.jsx(Fo,{size:"small",onClick:i,children:v.jsx(SJ,{})})}),v.jsx(Fv,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"center"},open:r,onClose:o,children:v.jsxs(Hm,{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)})})]})})]})},$re=()=>{const{gbdb:e,gameplans:t}=Kr(),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,h]=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,x])=>Promise.all([b,e.models.find().where("guild1").in(b.map(y=>y.name)).exec(),x,e.models.find().where("guild1").in(x.map(y=>y.name)).exec()])).then(([b,x,y,_])=>(qs(x,"id",b.flatMap(k=>k.roster)),qs(_,"id",y.flatMap(k=>k.roster)),[b.concat(y),x.concat(_)]));o(g.map(b=>b.name)),a(E.map(b=>b.id))})().catch(console.error)},[e]),!i||!s?null:v.jsxs(tn,{component:"main",sx:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},children:[v.jsx(hs,{children:v.jsxs(tn,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[v.jsx(Ct,{children:"Card Printer"}),v.jsxs(tn,{children:[v.jsx(Nre,{withBleed:u,setBleed:d,doubleCard:l,setDouble:c,noFun:f,setNoFun:h}),v.jsx(Xh,{title:"Print",arrow:!0,children:v.jsx(Fo,{size:"small",onClick:()=>{window.print()},children:v.jsx(dM,{})})})]})]})}),v.jsxs(tn,{className:"controls no-print",sx:{p:"1rem"},children:[v.jsx(Dre,{ref:r}),v.jsxs(tn,{sx:{display:"flex",flexDirection:"column",my:"0.5rem"},children:[v.jsxs(tn,{sx:{position:"relative"},children:[v.jsxs(Gf,{variant:"text",sx:{mb:"0.5rem"},children:[v.jsx(Xh,{title:"Select All",arrow:!0,children:v.jsx(vn,{onClick:()=>{var m,g,E,b,x,y;(m=r.current)!=null&&m.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"&&((x=n.current)==null||x.gameplans.forEach(_=>{_.setChecked(!0)})),r.current.guild==="refcards"&&((y=n.current)==null||y.refcards.forEach(_=>{_.setChecked(!0)})))},children:v.jsx(fM,{})})}),v.jsx(Xh,{title:"Clear All",arrow:!0,children:v.jsx(vn,{onClick:()=>{var m,g,E,b,x,y;(m=r.current)!=null&&m.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"&&((x=n.current)==null||x.gameplans.forEach(_=>{_.setChecked(!1)})),r.current.guild==="refcards"&&((y=n.current)==null||y.refcards.forEach(_=>{_.setChecked(!1)})))},children:v.jsx(pM,{})})})]}),v.jsx(ac,{})]}),v.jsx(Wre,{ref:n})]}),v.jsx(Lo,{}),v.jsx(tn,{children:v.jsx(vn,{variant:"text",color:"primary",startIcon:v.jsx(hM,{}),onClick:()=>{var m,g,E,b;(m=n.current)==null||m.guilds.forEach(x=>{x.setChecked(!1)}),(g=n.current)==null||g.models.forEach(x=>{x.setChecked(!1)}),(E=n.current)==null||E.gameplans.forEach(x=>{x.setChecked(!1)}),(b=n.current)==null||b.refcards.forEach(x=>{x.setChecked(!1)})},children:"Clear Cards"})})]}),v.jsxs(tn,{className:"Cards",children:[i.map(m=>v.jsx(Hre,{name:m,bleed:u,doubleCard:l},m)),s.map(m=>v.jsx(Gre,{name:m,id:m,bleed:u,noFun:f,doubleCard:l},m)),t==null?void 0:t.map((m,g)=>v.jsx(Vre,{gameplan:m,bleed:u},`gameplan-${g}`)),t==null?void 0:t.map((m,g)=>v.jsx(Kre,{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=go(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(bl,{size:"small",children:[v.jsx(tj,{children:"Guild"}),v.jsxs(El,{label:"Guild",onChange:s,defaultValue:"",children:[v.jsx(Si,{value:"refcards",dense:!0,children:v.jsx(ew,{text:"Rules Reference Cards",icon:"GB",style:{"--color":"#333333"}})},"redcards"),v.jsx(Si,{value:"gameplans",dense:!0,children:v.jsx(ew,{text:"Gameplans",icon:"GB",style:{"--color":"#333333"}})},"gameplans"),i.map(a=>v.jsx(Si,{value:a.name,dense:!0,children:v.jsx(Are,{g:a})},a.name))]})]})}),Are=({g:e})=>v.jsx(ew,{text:e.name,icon:e.name,style:{"--color":e.shadow??e.color}}),ew=({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(Ni,{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"))},Bre=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)}})}),Fre=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]=go(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}),zre=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,""))}})}),Ure=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}`)}})}),Wre=C.forwardRef((e,t)=>{const{gbdb:n,gameplans:r}=Kr(),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[h,m]=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,x])=>(qs(E,"id",g.flatMap(y=>y.roster)),qs(x,"id",b.flatMap(y=>y.roster)),[g.concat(b),E.concat(x)]));c(h),d(m)})().catch(console.error)},[n]),!r||!l||!u?null:v.jsxs(tn,{className:"model-list-container",style:{"--major-order":0,"--minor-order":2},children:[r.map(f=>v.jsx(zre,{g:f,ref:h=>{h?s.current.set(f.title,h):s.current.delete(f.title)}},f.title)),["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"].map((f,h)=>v.jsx(Ure,{id:h,ref:m=>{m?a.current.set(f,m):a.current.delete(f)}},`refcard-${h}`)),l.map(f=>v.jsx(Bre,{g:f,ref:h=>{h?o.current.set(f.name,h):o.current.delete(f.name)}},f.name)),u.map(f=>v.jsx(Fre,{m:f,ref:h=>{h?i.current.set(f.id,h):i.current.delete(f.id)}},f.id))]})}),Gre=e=>{const{name:t,id:n,bleed:r,doubleCard:i,noFun:o}=e,[s,a]=C.useState(!1),l=m=>{if(m&&m[0]){const{target:g}=m[0],E=getComputedStyle(g);a(E.getPropertyValue("display")!=="none")}},[c]=ny(l),u=go(async m=>{const g=await m.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",h=r?"3.74in":"3.5in";return i?v.jsx("div",{ref:c,className:`card ${s?"":"hide"}`,id:n,style:{position:"relative",width:d,height:h,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsxs(v.Fragment,{children:[v.jsx(gg,{className:`card-front double ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:d,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"}}),v.jsx(vg,{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:h,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsx(gg,{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:h,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsx(vg,{className:`card-back print ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:f,borderRadius:0,"--scale":"calc(2.5 * (96 / 500))"}})})]})},Hre=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],h=getComputedStyle(f);o(h.getPropertyValue("display")!=="none")}},[a]=ny(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}})})})]})},Vre=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]=ny(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})})})},Kre=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]=ny(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 qre(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 XX(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}qre({immediate:!0});const Yre=vA(Xb(v.jsxs(v.Fragment,{children:[v.jsx(Jr,{path:"/",element:v.jsx(lA,{to:await an.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(Jr,{element:v.jsx(vJ,{}),children:[v.jsxs(Jr,{element:v.jsx(ere,{}),children:[v.jsx(Jr,{path:"game",element:v.jsx(Dee,{})}),v.jsx(Jr,{path:"game/draft",element:v.jsx(Hee,{})}),v.jsx(Jr,{path:"game/draft/play",element:v.jsx(Xne,{})})]}),v.jsxs(Jr,{path:"library",element:v.jsx(ure,{}),children:[v.jsx(Jr,{index:!0,element:v.jsx(dre,{})}),v.jsx(Jr,{path:"gameplans",element:v.jsx(hre,{})}),v.jsx(Jr,{path:"refcards",element:v.jsx(mre,{})}),v.jsx(Jr,{path:":guild",element:v.jsx(pre,{})})]}),v.jsx(Jr,{path:"print",element:v.jsx($re,{})}),v.jsx(Jr,{path:"settings",element:v.jsx(Sre,{})})]})]}))),Qre=nb.createRoot(document.getElementById("root"));Qre.render(v.jsx(hJ,{children:v.jsx(RZ,{children:v.jsx(kA,{router:Yre})})})); diff --git a/assets/index-CQ385N7c.js b/assets/index-CQ385N7c.js deleted file mode 100644 index 414136e..0000000 --- a/assets/index-CQ385N7c.js +++ /dev/null @@ -1,200 +0,0 @@ -function zR(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var xr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ua(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Hs(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var UR={exports:{}},xg={},WR={exports:{}},Dt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var np=Symbol.for("react.element"),xM=Symbol.for("react.portal"),SM=Symbol.for("react.fragment"),_M=Symbol.for("react.strict_mode"),CM=Symbol.for("react.profiler"),kM=Symbol.for("react.provider"),EM=Symbol.for("react.context"),RM=Symbol.for("react.forward_ref"),PM=Symbol.for("react.suspense"),TM=Symbol.for("react.memo"),OM=Symbol.for("react.lazy"),n_=Symbol.iterator;function jM(e){return e===null||typeof e!="object"?null:(e=n_&&e[n_]||e["@@iterator"],typeof e=="function"?e:null)}var GR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},HR=Object.assign,VR={};function Du(e,t,n){this.props=e,this.context=t,this.refs=VR,this.updater=n||GR}Du.prototype.isReactComponent={};Du.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Du.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function KR(){}KR.prototype=Du.prototype;function Z1(e,t,n){this.props=e,this.context=t,this.refs=VR,this.updater=n||GR}var ew=Z1.prototype=new KR;ew.constructor=Z1;HR(ew,Du.prototype);ew.isPureReactComponent=!0;var r_=Array.isArray,qR=Object.prototype.hasOwnProperty,tw={current:null},YR={key:!0,ref:!0,__self:!0,__source:!0};function QR(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)qR.call(t,r)&&!YR.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,He=H[Oe];if(0>>1;Oei(Ke,ae))Rei(ct,Ke)?(H[Oe]=ct,H[Re]=ae,Oe=Re):(H[Oe]=Ke,H[_e]=ae,Oe=_e);else if(Rei(ct,ae))H[Oe]=ct,H[Re]=ae,Oe=Re;else break e}}return V}function i(H,V){var ae=H.sortIndex-V.sortIndex;return ae!==0?ae: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(L),L=-1),m=!0;var ae=f;try{for(y(V),d=n(l);d!==null&&(!(d.expirationTime>V)||H&&!N());){var Oe=d.callback;if(typeof Oe=="function"){d.callback=null,f=d.priorityLevel;var He=Oe(d.expirationTime<=V);V=e.unstable_now(),typeof He=="function"?d.callback=He:d===n(l)&&r(l),y(V)}else r(l);d=n(l)}if(d!==null)var je=!0;else{var _e=n(c);_e!==null&&ce(_,_e.startTime-V),je=!1}return je}finally{d=null,f=ae,m=!1}}var R=!1,P=null,L=-1,$=5,j=-1;function N(){return!(e.unstable_now()-j<$)}function F(){if(P!==null){var H=e.unstable_now();j=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){L=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||125Oe?(H.sortIndex=ae,t(c,H),n(l)===null&&H===n(c)&&(g?(b(L),L=-1):g=!0,ce(_,ae-Oe))):(H.sortIndex=He,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 ae=f;f=V;try{return H.apply(this,arguments)}finally{f=ae}}}})(t2);e2.exports=t2;var UM=e2.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var WM=C,Ri=UM;function Ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tb=Object.prototype.hasOwnProperty,GM=/^[: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]*$/,o_={},s_={};function HM(e){return tb.call(s_,e)?!0:tb.call(o_,e)?!1:GM.test(e)?s_[e]=!0:(o_[e]=!0,!1)}function VM(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 KM(e,t,n,r){if(t===null||typeof t>"u"||VM(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 Vr(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 ar={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ar[e]=new Vr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ar[t]=new Vr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ar[e]=new Vr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ar[e]=new Vr(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){ar[e]=new Vr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ar[e]=new Vr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ar[e]=new Vr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ar[e]=new Vr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ar[e]=new Vr(e,5,!1,e.toLowerCase(),null,!1,!1)});var rw=/[\-:]([a-z])/g;function iw(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(rw,iw);ar[t]=new Vr(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(rw,iw);ar[t]=new Vr(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(rw,iw);ar[t]=new Vr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ar[e]=new Vr(e,1,!1,e.toLowerCase(),null,!1,!1)});ar.xlinkHref=new Vr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ar[e]=new Vr(e,1,!1,e.toLowerCase(),null,!0,!0)});function ow(e,t,n,r){var i=ar.hasOwnProperty(t)?ar[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{ky=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?jd(e):""}function qM(e){switch(e.tag){case 5:return jd(e.type);case 16:return jd("Lazy");case 13:return jd("Suspense");case 19:return jd("SuspenseList");case 0:case 2:case 15:return e=Ey(e.type,!1),e;case 11:return e=Ey(e.type.render,!1),e;case 1:return e=Ey(e.type,!0),e;default:return""}}function ob(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 Bc:return"Fragment";case Dc:return"Portal";case nb:return"Profiler";case sw:return"StrictMode";case rb:return"Suspense";case ib:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case i2:return(e.displayName||"Context")+".Consumer";case r2:return(e._context.displayName||"Context")+".Provider";case aw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case lw:return t=e.displayName||null,t!==null?t:ob(e.type)||"Memo";case da:t=e._payload,e=e._init;try{return ob(e(t))}catch{}}return null}function YM(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 ob(t);case 8:return t===sw?"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 Ma(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function s2(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function QM(e){var t=s2(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 Kp(e){e._valueTracker||(e._valueTracker=QM(e))}function a2(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=s2(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function lm(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 sb(e,t){var n=t.checked;return Sn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function l_(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ma(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 l2(e,t){t=t.checked,t!=null&&ow(e,"checked",t,!1)}function ab(e,t){l2(e,t);var n=Ma(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")?lb(e,t.type,n):t.hasOwnProperty("defaultValue")&&lb(e,t.type,Ma(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function c_(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 lb(e,t,n){(t!=="number"||lm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ld=Array.isArray;function Zc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=qp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function gf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ud={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},XM=["Webkit","ms","Moz","O"];Object.keys(Ud).forEach(function(e){XM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ud[t]=Ud[e]})});function f2(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ud.hasOwnProperty(e)&&Ud[e]?(""+t).trim():t+"px"}function p2(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=f2(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var JM=Sn({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 db(e,t){if(t){if(JM[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 fb(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 pb=null;function cw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hb=null,eu=null,tu=null;function f_(e){if(e=op(e)){if(typeof hb!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=Eg(t),hb(e.stateNode,e.type,t))}}function h2(e){eu?tu?tu.push(e):tu=[e]:eu=e}function m2(){if(eu){var e=eu,t=tu;if(tu=eu=null,f_(e),t)for(e=0;e>>=0,e===0?32:31-(cN(e)/uN|0)|0}var Yp=64,Qp=4194304;function Id(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 fm(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=Id(a):(o&=s,o!==0&&(r=Id(o)))}else s=n&~i,s!==0?r=Id(s):o!==0&&(r=Id(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 rp(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Eo(t),e[t]=n}function hN(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=Gd),x_=" ",S_=!1;function N2(e,t){switch(e){case"keyup":return UN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fc=!1;function GN(e,t){switch(e){case"compositionend":return $2(t);case"keypress":return t.which!==32?null:(S_=!0,x_);case"textInput":return e=t.data,e===x_&&S_?null:e;default:return null}}function HN(e,t){if(Fc)return e==="compositionend"||!vw&&N2(e,t)?(e=I2(),Mh=hw=va=null,Fc=!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=E_(n)}}function F2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?F2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function z2(){for(var e=window,t=lm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=lm(e.document)}return t}function yw(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 e$(e){var t=z2(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&F2(n.ownerDocument.documentElement,n)){if(r!==null&&yw(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=R_(n,o);var s=R_(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,zc=null,wb=null,Vd=null,xb=!1;function P_(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xb||zc==null||zc!==lm(r)||(r=zc,"selectionStart"in r&&yw(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}),Vd&&Sf(Vd,r)||(Vd=r,r=mm(wb,"onSelect"),0Gc||(e.current=Rb[Gc],Rb[Gc]=null,Gc--)}function fn(e,t){Gc++,Rb[Gc]=e.current,e.current=t}var Na={},_r=Ga(Na),ti=Ga(!1),Dl=Na;function pu(e,t){var n=e.type.contextTypes;if(!n)return Na;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 ni(e){return e=e.childContextTypes,e!=null}function vm(){hn(ti),hn(_r)}function N_(e,t,n){if(_r.current!==Na)throw Error(Ne(168));fn(_r,t),fn(ti,n)}function Q2(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,YM(e)||"Unknown",i));return Sn({},n,r)}function ym(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Na,Dl=_r.current,fn(_r,e),fn(ti,ti.current),!0}function $_(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=Q2(e,t,Dl),r.__reactInternalMemoizedMergedChildContext=e,hn(ti),hn(_r),fn(_r,e)):hn(ti),fn(ti,n)}var ws=null,Rg=!1,Fy=!1;function X2(e){ws===null?ws=[e]:ws.push(e)}function f$(e){Rg=!0,X2(e)}function Ha(){if(!Fy&&ws!==null){Fy=!0;var e=0,t=Xt;try{var n=ws;for(Xt=1;e>=s,i-=s,_s=1<<32-Eo(t)+i|n<L?($=P,P=null):$=P.sibling;var j=f(b,P,y[L],_);if(j===null){P===null&&(P=$);break}e&&P&&j.alternate===null&&t(b,P),w=o(j,w,L),R===null?k=j:R.sibling=j,R=j,P=$}if(L===y.length)return n(b,P),gn&&pl(b,L),k;if(P===null){for(;LL?($=P,P=null):$=P.sibling;var N=f(b,P,j.value,_);if(N===null){P===null&&(P=$);break}e&&P&&N.alternate===null&&t(b,P),w=o(N,w,L),R===null?k=N:R.sibling=N,R=N,P=$}if(j.done)return n(b,P),gn&&pl(b,L),k;if(P===null){for(;!j.done;L++,j=y.next())j=d(b,j.value,_),j!==null&&(w=o(j,w,L),R===null?k=j:R.sibling=j,R=j);return gn&&pl(b,L),k}for(P=r(b,P);!j.done;L++,j=y.next())j=m(P,b,L,j.value,_),j!==null&&(e&&j.alternate!==null&&P.delete(j.key===null?L:j.key),w=o(j,w,L),R===null?k=j:R.sibling=j,R=j);return e&&P.forEach(function(F){return t(b,F)}),gn&&pl(b,L),k}function E(b,w,y,_){if(typeof y=="object"&&y!==null&&y.type===Bc&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Vp:e:{for(var k=y.key,R=w;R!==null;){if(R.key===k){if(k=y.type,k===Bc){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===da&&B_(k)===R.type){n(b,R.sibling),w=i(R,y.props),w.ref=hd(b,R,y),w.return=b,b=w;break e}n(b,R);break}else t(b,R);R=R.sibling}y.type===Bc?(w=jl(y.props.children,b.mode,_,y.key),w.return=b,b=w):(_=Uh(y.type,y.key,y.props,null,b.mode,_),_.ref=hd(b,w,y),_.return=b,b=_)}return s(b);case Dc: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=qy(y,b.mode,_),w.return=b,b=w}return s(b);case da:return R=y._init,E(b,w,R(y._payload),_)}if(Ld(y))return h(b,w,y,_);if(cd(y))return g(b,w,y,_);rh(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=Ky(y,b.mode,_),w.return=b,b=w),s(b)):n(b,w)}return E}var mu=tP(!0),nP=tP(!1),xm=Ga(null),Sm=null,Kc=null,Sw=null;function _w(){Sw=Kc=Sm=null}function Cw(e){var t=xm.current;hn(xm),e._currentValue=t}function Ob(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 ru(e,t){Sm=e,Sw=Kc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ei=!0),e.firstContext=null)}function Ji(e){var t=e._currentValue;if(Sw!==e)if(e={context:e,memoizedValue:t,next:null},Kc===null){if(Sm===null)throw Error(Ne(308));Kc=e,Sm.dependencies={lanes:0,firstContext:e}}else Kc=Kc.next=e;return t}var xl=null;function kw(e){xl===null?xl=[e]:xl.push(e)}function rP(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,kw(t)):(n.next=i.next,i.next=n),t.interleaved=n,$s(e,r)}function $s(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 fa=!1;function Ew(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function iP(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 Ps(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ea(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,$s(e,n)}return i=r.interleaved,i===null?(t.next=t,kw(r)):(t.next=i.next,i.next=t),r.interleaved=t,$s(e,n)}function $h(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,dw(e,n)}}function F_(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 _m(e,t,n,r){var i=e.updateQueue;fa=!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=Sn({},d,f);break e;case 2:fa=!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);zl|=s,e.lanes=s,e.memoizedState=d}}function z_(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Uy.transition;Uy.transition={};try{e(!1),t()}finally{Xt=n,Uy.transition=r}}function xP(){return Zi().memoizedState}function g$(e,t,n){var r=Pa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},SP(e))_P(t,n);else if(n=rP(e,t,n,r),n!==null){var i=Wr();Ro(n,e,r,i),CP(n,t,r)}}function v$(e,t,n){var r=Pa(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(SP(e))_P(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,Oo(a,s)){var l=t.interleaved;l===null?(i.next=i,kw(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=rP(e,t,i,r),n!==null&&(i=Wr(),Ro(n,e,r,i),CP(n,t,r))}}function SP(e){var t=e.alternate;return e===xn||t!==null&&t===xn}function _P(e,t){Kd=km=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function CP(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dw(e,n)}}var Em={readContext:Ji,useCallback:vr,useContext:vr,useEffect:vr,useImperativeHandle:vr,useInsertionEffect:vr,useLayoutEffect:vr,useMemo:vr,useReducer:vr,useRef:vr,useState:vr,useDebugValue:vr,useDeferredValue:vr,useTransition:vr,useMutableSource:vr,useSyncExternalStore:vr,useId:vr,unstable_isNewReconciler:!1},y$={readContext:Ji,useCallback:function(e,t){return Wo().memoizedState=[e,t===void 0?null:t],e},useContext:Ji,useEffect:W_,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Dh(4194308,4,gP.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dh(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dh(4,2,e,t)},useMemo:function(e,t){var n=Wo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wo();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=g$.bind(null,xn,e),[r.memoizedState,e]},useRef:function(e){var t=Wo();return e={current:e},t.memoizedState=e},useState:U_,useDebugValue:Mw,useDeferredValue:function(e){return Wo().memoizedState=e},useTransition:function(){var e=U_(!1),t=e[0];return e=m$.bind(null,e[1]),Wo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xn,i=Wo();if(gn){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),Xn===null)throw Error(Ne(349));Fl&30||lP(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,W_(uP.bind(null,r,o,e),[e]),r.flags|=2048,Of(9,cP.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Wo(),t=Xn.identifierPrefix;if(gn){var n=Cs,r=_s;n=(r&~(1<<32-Eo(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Pf++,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[qo]=t,e[kf]=r,MP(e,t,!1,!1),t.stateNode=e;e:{switch(s=fb(n,r),n){case"dialog":pn("cancel",e),pn("close",e),i=r;break;case"iframe":case"object":case"embed":pn("load",e),i=r;break;case"video":case"audio":for(i=0;iyu&&(t.flags|=128,r=!0,md(o,!1),t.lanes=4194304)}else{if(!r)if(e=Cm(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),md(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!gn)return yr(t),null}else 2*On()-o.renderingStartTime>yu&&n!==1073741824&&(t.flags|=128,r=!0,md(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=On(),t.sibling=null,n=wn.current,fn(wn,r?n&1|2:n&1),t):(yr(t),null);case 22:case 23:return Fw(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?mi&1073741824&&(yr(t),t.subtreeFlags&6&&(t.flags|=8192)):yr(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function E$(e,t){switch(ww(t),t.tag){case 1:return ni(t.type)&&vm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gu(),hn(ti),hn(_r),Tw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Pw(t),null;case 13:if(hn(wn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));hu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return hn(wn),null;case 4:return gu(),null;case 10:return Cw(t.type._context),null;case 22:case 23:return Fw(),null;case 24:return null;default:return null}}var oh=!1,Sr=!1,R$=typeof WeakSet=="function"?WeakSet:Set,tt=null;function qc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Rn(e,t,r)}else n.current=null}function Bb(e,t,n){try{n()}catch(r){Rn(e,t,r)}}var eC=!1;function P$(e,t){if(Sb=pm,e=z2(),yw(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(_b={focusedElem:e,selectionRange:n},pm=!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:wo(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(_){Rn(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,tt=e;break}tt=t.return}return h=eC,eC=!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&&Bb(t,n,o)}i=i.next}while(i!==r)}}function Og(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 Fb(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 AP(e){var t=e.alternate;t!==null&&(e.alternate=null,AP(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[qo],delete t[kf],delete t[Eb],delete t[u$],delete t[d$])),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 DP(e){return e.tag===5||e.tag===3||e.tag===4}function tC(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||DP(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 zb(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=gm));else if(r!==4&&(e=e.child,e!==null))for(zb(e,t,n),e=e.sibling;e!==null;)zb(e,t,n),e=e.sibling}function Ub(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(Ub(e,t,n),e=e.sibling;e!==null;)Ub(e,t,n),e=e.sibling}var nr=null,xo=!1;function oa(e,t,n){for(n=n.child;n!==null;)BP(e,t,n),n=n.sibling}function BP(e,t,n){if(Zo&&typeof Zo.onCommitFiberUnmount=="function")try{Zo.onCommitFiberUnmount(Sg,n)}catch{}switch(n.tag){case 5:Sr||qc(n,t);case 6:var r=nr,i=xo;nr=null,oa(e,t,n),nr=r,xo=i,nr!==null&&(xo?(e=nr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):nr.removeChild(n.stateNode));break;case 18:nr!==null&&(xo?(e=nr,n=n.stateNode,e.nodeType===8?By(e.parentNode,n):e.nodeType===1&&By(e,n),wf(e)):By(nr,n.stateNode));break;case 4:r=nr,i=xo,nr=n.stateNode.containerInfo,xo=!0,oa(e,t,n),nr=r,xo=i;break;case 0:case 11:case 14:case 15:if(!Sr&&(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)&&Bb(n,t,s),i=i.next}while(i!==r)}oa(e,t,n);break;case 1:if(!Sr&&(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Rn(n,t,a)}oa(e,t,n);break;case 21:oa(e,t,n);break;case 22:n.mode&1?(Sr=(r=Sr)||n.memoizedState!==null,oa(e,t,n),Sr=r):oa(e,t,n);break;default:oa(e,t,n)}}function nC(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new R$),t.forEach(function(r){var i=A$.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function yo(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=On()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*O$(r/1960))-r,10e?16:e,ya===null)var r=!1;else{if(e=ya,ya=null,Tm=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;lOn()-Dw?Ol(e,0):Aw|=n),ri(e,t)}function KP(e,t){t===0&&(e.mode&1?(t=Qp,Qp<<=1,!(Qp&130023424)&&(Qp=4194304)):t=1);var n=Wr();e=$s(e,t),e!==null&&(rp(e,t,n),ri(e,n))}function $$(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),KP(e,n)}function A$(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),KP(e,n)}var qP;qP=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ti.current)ei=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ei=!1,C$(e,t,n);ei=!!(e.flags&131072)}else ei=!1,gn&&t.flags&1048576&&J2(t,wm,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bh(e,t),e=t.pendingProps;var i=pu(t,_r.current);ru(t,n),i=jw(null,t,r,e,i,n);var o=Lw();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,ni(r)?(o=!0,ym(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ew(t),i.updater=Tg,t.stateNode=i,i._reactInternals=t,Lb(t,r,e,n),t=Nb(null,t,r,!0,o,n)):(t.tag=0,gn&&o&&bw(t),Ur(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bh(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=B$(r),e=wo(r,e),i){case 0:t=Mb(null,t,r,e,n);break e;case 1:t=X_(null,t,r,e,n);break e;case 11:t=Y_(null,t,r,e,n);break e;case 14:t=Q_(null,t,r,wo(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:wo(r,i),Mb(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wo(r,i),X_(e,t,r,i,n);case 3:e:{if(jP(t),e===null)throw Error(Ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,iP(e,t),_m(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=vu(Error(Ne(423)),t),t=J_(e,t,r,n,i);break e}else if(r!==i){i=vu(Error(Ne(424)),t),t=J_(e,t,r,n,i);break e}else for(Si=ka(t.stateNode.containerInfo.firstChild),ki=t,gn=!0,ko=null,n=nP(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(hu(),r===i){t=As(e,t,n);break e}Ur(e,t,r,n)}t=t.child}return t;case 5:return oP(t),e===null&&Tb(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Cb(r,i)?s=null:o!==null&&Cb(r,o)&&(t.flags|=32),OP(e,t),Ur(e,t,s,n),t.child;case 6:return e===null&&Tb(t),null;case 13:return LP(e,t,n);case 4:return Rw(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=mu(t,null,r,n):Ur(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wo(r,i),Y_(e,t,r,i,n);case 7:return Ur(e,t,t.pendingProps,n),t.child;case 8:return Ur(e,t,t.pendingProps.children,n),t.child;case 12:return Ur(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,fn(xm,r._currentValue),r._currentValue=s,o!==null)if(Oo(o.value,s)){if(o.children===i.children&&!ti.current){t=As(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=Ps(-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),Ob(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),Ob(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}Ur(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ru(t,n),i=Ji(i),r=r(i),t.flags|=1,Ur(e,t,r,n),t.child;case 14:return r=t.type,i=wo(r,t.pendingProps),i=wo(r.type,i),Q_(e,t,r,i,n);case 15:return PP(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wo(r,i),Bh(e,t),t.tag=1,ni(r)?(e=!0,ym(t)):e=!1,ru(t,n),kP(t,r,i),Lb(t,r,i,n),Nb(null,t,r,!0,e,n);case 19:return IP(e,t,n);case 22:return TP(e,t,n)}throw Error(Ne(156,t.tag))};function YP(e,t){return S2(e,t)}function D$(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 Ki(e,t,n,r){return new D$(e,t,n,r)}function Uw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function B$(e){if(typeof e=="function")return Uw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===aw)return 11;if(e===lw)return 14}return 2}function Ta(e,t){var n=e.alternate;return n===null?(n=Ki(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 Uh(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Uw(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Bc:return jl(n.children,i,o,t);case sw:s=8,i|=8;break;case nb:return e=Ki(12,n,t,i|2),e.elementType=nb,e.lanes=o,e;case rb:return e=Ki(13,n,t,i),e.elementType=rb,e.lanes=o,e;case ib:return e=Ki(19,n,t,i),e.elementType=ib,e.lanes=o,e;case o2:return Lg(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case r2:s=10;break e;case i2:s=9;break e;case aw:s=11;break e;case lw:s=14;break e;case da:s=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Ki(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jl(e,t,n,r){return e=Ki(7,e,r,t),e.lanes=n,e}function Lg(e,t,n,r){return e=Ki(22,e,r,t),e.elementType=o2,e.lanes=n,e.stateNode={isHidden:!1},e}function Ky(e,t,n){return e=Ki(6,e,null,t),e.lanes=n,e}function qy(e,t,n){return t=Ki(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function F$(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=Py(0),this.expirationTimes=Py(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Py(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ww(e,t,n,r,i,o,s,a,l){return e=new F$(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ki(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ew(o),e}function z$(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ZP)}catch(e){console.error(e)}}ZP(),ZR.exports=ji;var Ag=ZR.exports;const Nd=Ua(Ag),V$=zR({__proto__:null,default:Nd},[Ag]);var uC=Ag;eb.createRoot=uC.createRoot,eb.hydrateRoot=uC.hydrateRoot;/** - * @remix-run/router v1.18.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function bn(){return bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Wl(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function q$(){return Math.random().toString(36).substr(2,8)}function fC(e,t){return{usr:e.state,key:e.key,idx:t}}function Lf(e,t,n,r){return n===void 0&&(n=null),bn({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ks(t):t,{state:n,key:t&&t.key||r||q$()})}function Gl(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 Ks(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 Y$(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Dn.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(bn({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){a=Dn.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=Dn.Push;let w=Lf(g.location,E,b);n&&n(w,E),c=u()+1;let y=fC(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=Dn.Replace;let w=Lf(g.location,E,b);n&&n(w,E),c=u();let y=fC(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:Gl(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(dC,d),l=E,()=>{i.removeEventListener(dC,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 Q$=new Set(["lazy","caseSensitive","path","id","index","children"]);function X$(e){return e.index===!0}function If(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`),X$(i)){let l=bn({},i,t(i),{id:a});return r[a]=l,l}else{let l=bn({},i,t(i),{id:a,children:void 0});return r[a]=l,i.children&&(l.children=If(i.children,t,s,r)),l}})}function yl(e,t,n){return n===void 0&&(n="/"),Wh(e,t,n,!1)}function Wh(e,t,n,r){let i=typeof t=="string"?Ks(t):t,o=jo(i.pathname||"/",n);if(o==null)return null;let s=eT(e);Z$(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=Ts([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+'".')),eT(o.children,t,u,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:sA(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 tT(o.path))i(o,s,l)}),t}function tT(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=tT(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 Z$(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:aA(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const eA=/^:[\w-]+$/,tA=3,nA=2,rA=1,iA=10,oA=-2,pC=e=>e==="*";function sA(e,t){let n=e.split("/"),r=n.length;return n.some(pC)&&(r+=oA),t&&(r+=nA),n.filter(i=>!pC(i)).reduce((i,o)=>i+(eA.test(o)?tA:o===""?rA:iA),r)}function aA(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 lA(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 cA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Wl(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 uA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Wl(!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 jo(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 dA(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ks(e):e;return{pathname:n?n.startsWith("/")?n:fA(n,t):t,search:hA(r),hash:mA(i)}}function fA(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 Yy(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 nT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Dg(e,t){let n=nT(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Bg(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Ks(e):(i=bn({},e),kt(!i.pathname||!i.pathname.includes("?"),Yy("?","pathname","search",i)),kt(!i.pathname||!i.pathname.includes("#"),Yy("#","pathname","hash",i)),kt(!i.search||!i.search.includes("#"),Yy("#","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=dA(i,a),c=s&&s!=="/"&&s.endsWith("/"),u=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Ts=e=>e.join("/").replace(/\/\/+/g,"/"),pA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),hA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,mA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Kw{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 Fg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const rT=["post","put","patch","delete"],gA=new Set(rT),vA=["get",...rT],yA=new Set(vA),bA=new Set([301,302,303,307,308]),wA=new Set([307,308]),Qy={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xA={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},jc={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},qw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,SA=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),iT="remix-router-transitions";function _A(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=SA;let o={},s=If(e.routes,i,void 0,o),a,l=e.basename||"/",c=e.unstable_dataStrategy||PA,u=e.unstable_patchRoutesOnMiss,d=bn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),f=null,m=new Set,h=null,g=null,E=null,b=e.hydrationData!=null,w=yl(s,e.history.location,l),y=null;if(w==null&&!u){let Q=zr(404,{pathname:e.history.location.pathname}),{matches:ie,route:me}=_C(s);w=ie,y={[me.id]:Q}}w&&u&&!e.hydrationData&&kr(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,me=xe=>xe.route.loader?typeof xe.route.loader=="function"&&xe.route.loader.hydrate===!0?!1:Q&&Q[xe.route.id]!==void 0||ie&&ie[xe.route.id]!==void 0:!0;if(ie){let xe=w.findIndex(Be=>ie[Be.route.id]!==void 0);_=w.slice(0,xe+1).every(me)}else _=w.every(me)}else _=e.hydrationData!=null;let k,R={historyAction:e.history.action,location:e.history.location,matches:w,initialized:_,navigation:Qy,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=Dn.Pop,L=!1,$,j=!1,N=new Map,F=null,z=!1,K=!1,Z=[],le=[],ce=new Map,H=0,V=-1,ae=new Map,Oe=new Set,He=new Map,je=new Map,_e=new Set,Ke=new Map,Re=new Map,ct=new Map,ht=!1;function Pe(){if(f=e.history.listen(Q=>{let{action:ie,location:me,delta:xe}=Q;if(ht){ht=!1;return}Wl(Re.size===0||xe!=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 Be=Di({currentLocation:R.location,nextLocation:me,historyAction:ie});if(Be&&xe!=null){ht=!0,e.history.go(xe*-1),Ge(Be,{state:"blocked",location:me,proceed(){Ge(Be,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),e.history.go(xe)},reset(){let nt=new Map(R.blockers);nt.set(Be,jc),Ue({blockers:nt})}});return}return he(ie,me)}),n){zA(t,N);let Q=()=>UA(t,N);t.addEventListener("pagehide",Q),F=()=>t.removeEventListener("pagehide",Q)}return R.initialized||he(Dn.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 Ue(Q,ie){ie===void 0&&(ie={}),R=bn({},R,Q);let me=[],xe=[];d.v7_fetcherPersist&&R.fetchers.forEach((Be,nt)=>{Be.state==="idle"&&(_e.has(nt)?xe.push(nt):me.push(nt))}),[...m].forEach(Be=>Be(R,{deletedFetchers:xe,unstable_viewTransitionOpts:ie.viewTransitionOpts,unstable_flushSync:ie.flushSync===!0})),d.v7_fetcherPersist&&(me.forEach(Be=>R.fetchers.delete(Be)),xe.forEach(Be=>Rt(Be)))}function Ze(Q,ie,me){var xe,Be;let{flushSync:nt}=me===void 0?{}:me,at=R.actionData!=null&&R.navigation.formMethod!=null&&So(R.navigation.formMethod)&&R.navigation.state==="loading"&&((xe=Q.state)==null?void 0:xe._isRedirect)!==!0,$e;ie.actionData?Object.keys(ie.actionData).length>0?$e=ie.actionData:$e=null:at?$e=R.actionData:$e=null;let vt=ie.loaderData?xC(R.loaderData,ie.loaderData,ie.matches||[],ie.errors):R.loaderData,it=R.blockers;it.size>0&&(it=new Map(it),it.forEach((Bt,Lt)=>it.set(Lt,jc)));let ot=L===!0||R.navigation.formMethod!=null&&So(R.navigation.formMethod)&&((Be=Q.state)==null?void 0:Be._isRedirect)!==!0;a&&(s=a,a=void 0),z||P===Dn.Pop||(P===Dn.Push?e.history.push(Q,Q.state):P===Dn.Replace&&e.history.replace(Q,Q.state));let Ot;if(P===Dn.Pop){let Bt=N.get(R.location.pathname);Bt&&Bt.has(Q.pathname)?Ot={currentLocation:R.location,nextLocation:Q}:N.has(Q.pathname)&&(Ot={currentLocation:Q,nextLocation:R.location})}else if(j){let Bt=N.get(R.location.pathname);Bt?Bt.add(Q.pathname):(Bt=new Set([Q.pathname]),N.set(R.location.pathname,Bt)),Ot={currentLocation:R.location,nextLocation:Q}}Ue(bn({},ie,{actionData:$e,loaderData:vt,historyAction:P,location:Q,initialized:!0,navigation:Qy,revalidation:"idle",restoreScrollPosition:ui(Q,ie.matches||R.matches),preventScrollReset:ot,blockers:it}),{viewTransitionOpts:Ot,flushSync:nt===!0}),P=Dn.Pop,L=!1,j=!1,z=!1,K=!1,Z=[],le=[]}async function yt(Q,ie){if(typeof Q=="number"){e.history.go(Q);return}let me=Kb(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:xe,submission:Be,error:nt}=hC(d.v7_normalizeFormMethod,!1,me,ie),at=R.location,$e=Lf(R.location,xe,ie&&ie.state);$e=bn({},$e,e.history.encodeLocation($e));let vt=ie&&ie.replace!=null?ie.replace:void 0,it=Dn.Push;vt===!0?it=Dn.Replace:vt===!1||Be!=null&&So(Be.formMethod)&&Be.formAction===R.location.pathname+R.location.search&&(it=Dn.Replace);let ot=ie&&"preventScrollReset"in ie?ie.preventScrollReset===!0:void 0,Ot=(ie&&ie.unstable_flushSync)===!0,Bt=Di({currentLocation:at,nextLocation:$e,historyAction:it});if(Bt){Ge(Bt,{state:"blocked",location:$e,proceed(){Ge(Bt,{state:"proceeding",proceed:void 0,reset:void 0,location:$e}),yt(Q,ie)},reset(){let Lt=new Map(R.blockers);Lt.set(Bt,jc),Ue({blockers:Lt})}});return}return await he(it,$e,{submission:Be,pendingError:nt,preventScrollReset:ot,replace:ie&&ie.replace,enableViewTransition:ie&&ie.unstable_viewTransition,flushSync:Ot})}function ee(){if(rt(),Ue({revalidation:"loading"}),R.navigation.state!=="submitting"){if(R.navigation.state==="idle"){he(R.historyAction,R.location,{startUninterruptedRevalidation:!0});return}he(P||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation})}}async function he(Q,ie,me){$&&$.abort(),$=null,P=Q,z=(me&&me.startUninterruptedRevalidation)===!0,Za(R.location,R.matches),L=(me&&me.preventScrollReset)===!0,j=(me&&me.enableViewTransition)===!0;let xe=a||s,Be=me&&me.overrideNavigation,nt=yl(xe,ie,l),at=(me&&me.flushSync)===!0,$e=kr(nt,xe,ie.pathname);if($e.active&&$e.matches&&(nt=$e.matches),!nt){let{error:Je,notFoundMatches:At,route:xt}=Bi(ie.pathname);Ze(ie,{matches:At,loaderData:{},errors:{[xt.id]:Je}},{flushSync:at});return}if(R.initialized&&!K&&MA(R.location,ie)&&!(me&&me.submission&&So(me.submission.formMethod))){Ze(ie,{matches:nt},{flushSync:at});return}$=new AbortController;let vt=gc(e.history,ie,$.signal,me&&me.submission),it;if(me&&me.pendingError)it=[Qc(nt).route.id,{type:dn.error,error:me.pendingError}];else if(me&&me.submission&&So(me.submission.formMethod)){let Je=await Ce(vt,ie,me.submission,nt,$e.active,{replace:me.replace,flushSync:at});if(Je.shortCircuited)return;if(Je.pendingActionResult){let[At,xt]=Je.pendingActionResult;if(gi(xt)&&Fg(xt.error)&&xt.error.status===404){$=null,Ze(ie,{matches:Je.matches,loaderData:{},errors:{[At]:xt.error}});return}}nt=Je.matches||nt,it=Je.pendingActionResult,Be=Xy(ie,me.submission),at=!1,$e.active=!1,vt=gc(e.history,vt.url,vt.signal)}let{shortCircuited:ot,matches:Ot,loaderData:Bt,errors:Lt}=await We(vt,ie,nt,$e.active,Be,me&&me.submission,me&&me.fetcherSubmission,me&&me.replace,me&&me.initialHydration===!0,at,it);ot||($=null,Ze(ie,bn({matches:Ot||nt},SC(it),{loaderData:Bt,errors:Lt})))}async function Ce(Q,ie,me,xe,Be,nt){nt===void 0&&(nt={}),rt();let at=BA(ie,me);if(Ue({navigation:at},{flushSync:nt.flushSync===!0}),Be){let it=await Er(xe,ie.pathname,Q.signal);if(it.type==="aborted")return{shortCircuited:!0};if(it.type==="error"){let{boundaryId:ot,error:Ot}=Zn(ie.pathname,it);return{matches:it.partialMatches,pendingActionResult:[ot,{type:dn.error,error:Ot}]}}else if(it.matches)xe=it.matches;else{let{notFoundMatches:ot,error:Ot,route:Bt}=Bi(ie.pathname);return{matches:ot,pendingActionResult:[Bt.id,{type:dn.error,error:Ot}]}}}let $e,vt=$d(xe,ie);if(!vt.route.action&&!vt.route.lazy)$e={type:dn.error,error:zr(405,{method:Q.method,pathname:ie.pathname,routeId:vt.route.id})};else if($e=(await pe("action",Q,[vt],xe))[0],Q.signal.aborted)return{shortCircuited:!0};if(Cl($e)){let it;return nt&&nt.replace!=null?it=nt.replace:it=yC($e.response.headers.get("Location"),new URL(Q.url),l)===R.location.pathname+R.location.search,await X(Q,$e,{submission:me,replace:it}),{shortCircuited:!0}}if(_l($e))throw zr(400,{type:"defer-action"});if(gi($e)){let it=Qc(xe,vt.route.id);return(nt&&nt.replace)!==!0&&(P=Dn.Push),{matches:xe,pendingActionResult:[it.route.id,$e]}}return{matches:xe,pendingActionResult:[vt.route.id,$e]}}async function We(Q,ie,me,xe,Be,nt,at,$e,vt,it,ot){let Ot=Be||Xy(ie,nt),Bt=nt||at||EC(Ot),Lt=!z&&(!d.v7_partialHydration||!vt);if(xe){if(Lt){let sn=W(ot);Ue(bn({navigation:Ot},sn!==void 0?{actionData:sn}:{}),{flushSync:it})}let St=await Er(me,ie.pathname,Q.signal);if(St.type==="aborted")return{shortCircuited:!0};if(St.type==="error"){let{boundaryId:sn,error:_t}=Zn(ie.pathname,St);return{matches:St.partialMatches,loaderData:{},errors:{[sn]:_t}}}else if(St.matches)me=St.matches;else{let{error:sn,notFoundMatches:_t,route:Yt}=Bi(ie.pathname);return{matches:_t,loaderData:{},errors:{[Yt.id]:sn}}}}let Je=a||s,[At,xt]=mC(e.history,R,me,Bt,ie,d.v7_partialHydration&&vt===!0,d.v7_skipActionErrorRevalidation,K,Z,le,_e,He,Oe,Je,l,ot);if(fo(St=>!(me&&me.some(sn=>sn.route.id===St))||At&&At.some(sn=>sn.route.id===St)),V=++H,At.length===0&&xt.length===0){let St=Ie();return Ze(ie,bn({matches:me,loaderData:{},errors:ot&&gi(ot[1])?{[ot[0]]:ot[1].error}:null},SC(ot),St?{fetchers:new Map(R.fetchers)}:{}),{flushSync:it}),{shortCircuited:!0}}if(Lt){let St={};if(!xe){St.navigation=Ot;let sn=W(ot);sn!==void 0&&(St.actionData=sn)}xt.length>0&&(St.fetchers=S(xt)),Ue(St,{flushSync:it})}xt.forEach(St=>{ce.has(St.key)&&Qe(St.key),St.controller&&ce.set(St.key,St.controller)});let Rr=()=>xt.forEach(St=>Qe(St.key));$&&$.signal.addEventListener("abort",Rr);let{loaderResults:$n,fetcherResults:po}=await ze(R.matches,me,At,xt,Q);if(Q.signal.aborted)return{shortCircuited:!0};$&&$.signal.removeEventListener("abort",Rr),xt.forEach(St=>ce.delete(St.key));let Pr=CC([...$n,...po]);if(Pr){if(Pr.idx>=At.length){let St=xt[Pr.idx-At.length].key;Oe.add(St)}return await X(Q,Pr.result,{replace:$e}),{shortCircuited:!0}}let{loaderData:di,errors:pr}=wC(R,me,At,$n,ot,xt,po,Ke);Ke.forEach((St,sn)=>{St.subscribe(_t=>{(_t||St.done)&&Ke.delete(sn)})}),d.v7_partialHydration&&vt&&R.errors&&Object.entries(R.errors).filter(St=>{let[sn]=St;return!At.some(_t=>_t.route.id===sn)}).forEach(St=>{let[sn,_t]=St;pr=Object.assign(pr||{},{[sn]:_t})});let ho=Ie(),er=qt(V),ds=ho||er||xt.length>0;return bn({matches:me,loaderData:di,errors:pr},ds?{fetchers:new Map(R.fetchers)}:{})}function W(Q){if(Q&&!gi(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 me=R.fetchers.get(ie.key),xe=vd(void 0,me?me.data:void 0);R.fetchers.set(ie.key,xe)}),new Map(R.fetchers)}function O(Q,ie,me,xe){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 Be=(xe&&xe.unstable_flushSync)===!0,nt=a||s,at=Kb(R.location,R.matches,l,d.v7_prependBasename,me,d.v7_relativeSplatPath,ie,xe==null?void 0:xe.relative),$e=yl(nt,at,l),vt=kr($e,nt,at);if(vt.active&&vt.matches&&($e=vt.matches),!$e){Te(Q,ie,zr(404,{pathname:at}),{flushSync:Be});return}let{path:it,submission:ot,error:Ot}=hC(d.v7_normalizeFormMethod,!0,at,xe);if(Ot){Te(Q,ie,Ot,{flushSync:Be});return}let Bt=$d($e,it);if(L=(xe&&xe.preventScrollReset)===!0,ot&&So(ot.formMethod)){D(Q,ie,it,Bt,$e,vt.active,Be,ot);return}He.set(Q,{routeId:ie,path:it}),q(Q,ie,it,Bt,$e,vt.active,Be,ot)}async function D(Q,ie,me,xe,Be,nt,at,$e){rt(),He.delete(Q);function vt(Yt){if(!Yt.route.action&&!Yt.route.lazy){let Yr=zr(405,{method:$e.formMethod,pathname:me,routeId:ie});return Te(Q,ie,Yr,{flushSync:at}),!0}return!1}if(!nt&&vt(xe))return;let it=R.fetchers.get(Q);Xe(Q,FA($e,it),{flushSync:at});let ot=new AbortController,Ot=gc(e.history,me,ot.signal,$e);if(nt){let Yt=await Er(Be,me,Ot.signal);if(Yt.type==="aborted")return;if(Yt.type==="error"){let{error:Yr}=Zn(me,Yt);Te(Q,ie,Yr,{flushSync:at});return}else if(Yt.matches){if(Be=Yt.matches,xe=$d(Be,me),vt(xe))return}else{Te(Q,ie,zr(404,{pathname:me}),{flushSync:at});return}}ce.set(Q,ot);let Bt=H,Je=(await pe("action",Ot,[xe],Be))[0];if(Ot.signal.aborted){ce.get(Q)===ot&&ce.delete(Q);return}if(d.v7_fetcherPersist&&_e.has(Q)){if(Cl(Je)||gi(Je)){Xe(Q,ua(void 0));return}}else{if(Cl(Je))if(ce.delete(Q),V>Bt){Xe(Q,ua(void 0));return}else return Oe.add(Q),Xe(Q,vd($e)),X(Ot,Je,{fetcherSubmission:$e});if(gi(Je)){Te(Q,ie,Je.error);return}}if(_l(Je))throw zr(400,{type:"defer-action"});let At=R.navigation.location||R.location,xt=gc(e.history,At,ot.signal),Rr=a||s,$n=R.navigation.state!=="idle"?yl(Rr,R.navigation.location,l):R.matches;kt($n,"Didn't find any matches after fetcher action");let po=++H;ae.set(Q,po);let Pr=vd($e,Je.data);R.fetchers.set(Q,Pr);let[di,pr]=mC(e.history,R,$n,$e,At,!1,d.v7_skipActionErrorRevalidation,K,Z,le,_e,He,Oe,Rr,l,[xe.route.id,Je]);pr.filter(Yt=>Yt.key!==Q).forEach(Yt=>{let Yr=Yt.key,el=R.fetchers.get(Yr),Qt=vd(void 0,el?el.data:void 0);R.fetchers.set(Yr,Qt),ce.has(Yr)&&Qe(Yr),Yt.controller&&ce.set(Yr,Yt.controller)}),Ue({fetchers:new Map(R.fetchers)});let ho=()=>pr.forEach(Yt=>Qe(Yt.key));ot.signal.addEventListener("abort",ho);let{loaderResults:er,fetcherResults:ds}=await ze(R.matches,$n,di,pr,xt);if(ot.signal.aborted)return;ot.signal.removeEventListener("abort",ho),ae.delete(Q),ce.delete(Q),pr.forEach(Yt=>ce.delete(Yt.key));let St=CC([...er,...ds]);if(St){if(St.idx>=di.length){let Yt=pr[St.idx-di.length].key;Oe.add(Yt)}return X(xt,St.result)}let{loaderData:sn,errors:_t}=wC(R,R.matches,di,er,void 0,pr,ds,Ke);if(R.fetchers.has(Q)){let Yt=ua(Je.data);R.fetchers.set(Q,Yt)}qt(po),R.navigation.state==="loading"&&po>V?(kt(P,"Expected pending action"),$&&$.abort(),Ze(R.navigation.location,{matches:$n,loaderData:sn,errors:_t,fetchers:new Map(R.fetchers)})):(Ue({errors:_t,loaderData:xC(R.loaderData,sn,$n,_t),fetchers:new Map(R.fetchers)}),K=!1)}async function q(Q,ie,me,xe,Be,nt,at,$e){let vt=R.fetchers.get(Q);Xe(Q,vd($e,vt?vt.data:void 0),{flushSync:at});let it=new AbortController,ot=gc(e.history,me,it.signal);if(nt){let Je=await Er(Be,me,ot.signal);if(Je.type==="aborted")return;if(Je.type==="error"){let{error:At}=Zn(me,Je);Te(Q,ie,At,{flushSync:at});return}else if(Je.matches)Be=Je.matches,xe=$d(Be,me);else{Te(Q,ie,zr(404,{pathname:me}),{flushSync:at});return}}ce.set(Q,it);let Ot=H,Lt=(await pe("loader",ot,[xe],Be))[0];if(_l(Lt)&&(Lt=await cT(Lt,ot.signal,!0)||Lt),ce.get(Q)===it&&ce.delete(Q),!ot.signal.aborted){if(_e.has(Q)){Xe(Q,ua(void 0));return}if(Cl(Lt))if(V>Ot){Xe(Q,ua(void 0));return}else{Oe.add(Q),await X(ot,Lt);return}if(gi(Lt)){Te(Q,ie,Lt.error);return}kt(!_l(Lt),"Unhandled fetcher deferred data"),Xe(Q,ua(Lt.data))}}async function X(Q,ie,me){let{submission:xe,fetcherSubmission:Be,replace:nt}=me===void 0?{}:me;ie.response.headers.has("X-Remix-Revalidate")&&(K=!0);let at=ie.response.headers.get("Location");kt(at,"Expected a Location header on the redirect Response"),at=yC(at,new URL(Q.url),l);let $e=Lf(R.location,at,{_isRedirect:!0});if(n){let Lt=!1;if(ie.response.headers.has("X-Remix-Reload-Document"))Lt=!0;else if(qw.test(at)){const Je=e.history.createURL(at);Lt=Je.origin!==t.location.origin||jo(Je.pathname,l)==null}if(Lt){nt?t.location.replace(at):t.location.assign(at);return}}$=null;let vt=nt===!0?Dn.Replace:Dn.Push,{formMethod:it,formAction:ot,formEncType:Ot}=R.navigation;!xe&&!Be&&it&&ot&&Ot&&(xe=EC(R.navigation));let Bt=xe||Be;if(wA.has(ie.response.status)&&Bt&&So(Bt.formMethod))await he(vt,$e,{submission:bn({},Bt,{formAction:at}),preventScrollReset:L});else{let Lt=Xy($e,xe);await he(vt,$e,{overrideNavigation:Lt,fetcherSubmission:Be,preventScrollReset:L})}}async function pe(Q,ie,me,xe){try{let Be=await TA(c,Q,ie,me,xe,o,i);return await Promise.all(Be.map((nt,at)=>{if($A(nt)){let $e=nt.result;return{type:dn.redirect,response:LA($e,ie,me[at].route.id,xe,l,d.v7_relativeSplatPath)}}return jA(nt)}))}catch(Be){return me.map(()=>({type:dn.error,error:Be}))}}async function ze(Q,ie,me,xe,Be){let[nt,...at]=await Promise.all([me.length?pe("loader",Be,me,ie):[],...xe.map($e=>{if($e.matches&&$e.match&&$e.controller){let vt=gc(e.history,$e.path,$e.controller.signal);return pe("loader",vt,[$e.match],$e.matches).then(it=>it[0])}else return Promise.resolve({type:dn.error,error:zr(404,{pathname:$e.path})})})]);return await Promise.all([kC(Q,me,nt,nt.map(()=>Be.signal),!1,R.loaderData),kC(Q,xe.map($e=>$e.match),at,xe.map($e=>$e.controller?$e.controller.signal:null),!0)]),{loaderResults:nt,fetcherResults:at}}function rt(){K=!0,Z.push(...fo()),He.forEach((Q,ie)=>{ce.has(ie)&&(le.push(ie),Qe(ie))})}function Xe(Q,ie,me){me===void 0&&(me={}),R.fetchers.set(Q,ie),Ue({fetchers:new Map(R.fetchers)},{flushSync:(me&&me.flushSync)===!0})}function Te(Q,ie,me,xe){xe===void 0&&(xe={});let Be=Qc(R.matches,ie);Rt(Q),Ue({errors:{[Be.route.id]:me},fetchers:new Map(R.fetchers)},{flushSync:(xe&&xe.flushSync)===!0})}function et(Q){return d.v7_fetcherPersist&&(je.set(Q,(je.get(Q)||0)+1),_e.has(Q)&&_e.delete(Q)),R.fetchers.get(Q)||xA}function Rt(Q){let ie=R.fetchers.get(Q);ce.has(Q)&&!(ie&&ie.state==="loading"&&ae.has(Q))&&Qe(Q),He.delete(Q),ae.delete(Q),Oe.delete(Q),_e.delete(Q),R.fetchers.delete(Q)}function en(Q){if(d.v7_fetcherPersist){let ie=(je.get(Q)||0)-1;ie<=0?(je.delete(Q),_e.add(Q)):je.set(Q,ie)}else Rt(Q);Ue({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 wt(Q){for(let ie of Q){let me=et(ie),xe=ua(me.data);R.fetchers.set(ie,xe)}}function Ie(){let Q=[],ie=!1;for(let me of Oe){let xe=R.fetchers.get(me);kt(xe,"Expected fetcher: "+me),xe.state==="loading"&&(Oe.delete(me),Q.push(me),ie=!0)}return wt(Q),ie}function qt(Q){let ie=[];for(let[me,xe]of ae)if(xe0}function Nn(Q,ie){let me=R.blockers.get(Q)||jc;return Re.get(Q)!==ie&&Re.set(Q,ie),me}function dr(Q){R.blockers.delete(Q),Re.delete(Q)}function Ge(Q,ie){let me=R.blockers.get(Q)||jc;kt(me.state==="unblocked"&&ie.state==="blocked"||me.state==="blocked"&&ie.state==="blocked"||me.state==="blocked"&&ie.state==="proceeding"||me.state==="blocked"&&ie.state==="unblocked"||me.state==="proceeding"&&ie.state==="unblocked","Invalid blocker state transition: "+me.state+" -> "+ie.state);let xe=new Map(R.blockers);xe.set(Q,ie),Ue({blockers:xe})}function Di(Q){let{currentLocation:ie,nextLocation:me,historyAction:xe}=Q;if(Re.size===0)return;Re.size>1&&Wl(!1,"A router only supports one blocker at a time");let Be=Array.from(Re.entries()),[nt,at]=Be[Be.length-1],$e=R.blockers.get(nt);if(!($e&&$e.state==="proceeding")&&at({currentLocation:ie,nextLocation:me,historyAction:xe}))return nt}function Bi(Q){let ie=zr(404,{pathname:Q}),me=a||s,{matches:xe,route:Be}=_C(me);return fo(),{notFoundMatches:xe,route:Be,error:ie}}function Zn(Q,ie){return{boundaryId:Qc(ie.partialMatches).route.id,error:zr(400,{type:"route-discovery",pathname:Q,message:ie.error!=null&&"message"in ie.error?ie.error:String(ie.error)})}}function fo(Q){let ie=[];return Ke.forEach((me,xe)=>{(!Q||Q(xe))&&(me.cancel(),ie.push(xe),Ke.delete(xe))}),ie}function Do(Q,ie,me){if(h=Q,E=ie,g=me||null,!b&&R.navigation===Qy){b=!0;let xe=ui(R.location,R.matches);xe!=null&&Ue({restoreScrollPosition:xe})}return()=>{h=null,E=null,g=null}}function us(Q,ie){return g&&g(Q,ie.map(xe=>J$(xe,R.loaderData)))||Q.key}function Za(Q,ie){if(h&&E){let me=us(Q,ie);h[me]=E()}}function ui(Q,ie){if(h){let me=us(Q,ie),xe=h[me];if(typeof xe=="number")return xe}return null}function kr(Q,ie,me){if(u)if(Q){let xe=Q[Q.length-1].route;if(xe.path&&(xe.path==="*"||xe.path.endsWith("/*")))return{active:!0,matches:Wh(ie,me,l,!0)}}else return{active:!0,matches:Wh(ie,me,l,!0)||[]};return{active:!1,matches:null}}async function Er(Q,ie,me){let xe=Q,Be=xe.length>0?xe[xe.length-1].route:null;for(;;){let nt=a==null,at=a||s;try{await RA(u,ie,xe,at,o,i,ct,me)}catch(ot){return{type:"error",error:ot,partialMatches:xe}}finally{nt&&(s=[...s])}if(me.aborted)return{type:"aborted"};let $e=yl(at,ie,l),vt=!1;if($e){let ot=$e[$e.length-1].route;if(ot.index)return{type:"success",matches:$e};if(ot.path&&ot.path.length>0)if(ot.path==="*")vt=!0;else return{type:"success",matches:$e}}let it=Wh(at,ie,l,!0);if(!it||xe.map(ot=>ot.route.id).join("-")===it.map(ot=>ot.route.id).join("-"))return{type:"success",matches:vt?$e:null};if(xe=it,Be=xe[xe.length-1].route,Be.path==="*")return{type:"success",matches:xe}}}function fr(Q){o={},a=If(Q,i,void 0,o)}function zt(Q,ie){let me=a==null;sT(Q,ie,a||s,o,i),me&&(s=[...s],Ue({}))}return k={get basename(){return l},get future(){return d},get state(){return R},get routes(){return s},get window(){return t},initialize:Pe,subscribe:ut,enableScrollRestoration:Do,navigate:yt,fetch:O,revalidate:ee,createHref:Q=>e.history.createHref(Q),encodeLocation:Q=>e.history.encodeLocation(Q),getFetcher:et,deleteFetcher:en,dispose:Tt,getBlocker:Nn,deleteBlocker:dr,patchRoutes:zt,_internalFetchControllers:ce,_internalActiveDeferreds:Ke,_internalSetRoutes:fr},k}function CA(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Kb(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=Bg(i||".",Dg(l,o),jo(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&&!Yw(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Ts([n,u.pathname])),Gl(u)}function hC(e,t,n,r){if(!r||!CA(r))return{path:n};if(r.formMethod&&!DA(r.formMethod))return{path:n,error:zr(405,{method:r.formMethod})};let i=()=>({path:n,error:zr(400,{type:"invalid-body"})}),o=r.formMethod||"get",s=e?o.toUpperCase():o.toLowerCase(),a=aT(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!So(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(!So(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=qb(r.formData),c=r.formData;else if(r.body instanceof FormData)l=qb(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=bC(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=bC(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(So(u.formMethod))return{path:n,submission:u};let d=Ks(n);return t&&d.search&&Yw(d.search)&&l.append("index",""),d.search="?"+l,{path:Gl(d),submission:u}}function kA(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 mC(e,t,n,r,i,o,s,a,l,c,u,d,f,m,h,g){let E=g?gi(g[1])?g[1].error:g[1].data:void 0,b=e.createURL(t.location),w=e.createURL(i),y=g&&gi(g[1])?g[0]:void 0,_=y?kA(n,y):n,k=g?g[1].statusCode:void 0,R=s&&k&&k>=400,P=_.filter(($,j)=>{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(EA(t.loaderData,t.matches[j],$)||l.some(K=>K===$.route.id))return!0;let F=t.matches[j],z=$;return gC($,bn({currentUrl:b,currentParams:F.params,nextUrl:w,nextParams:z.params},r,{actionResult:E,actionStatus:k,defaultShouldRevalidate:R?!1:a||b.pathname+b.search===w.pathname+w.search||b.search!==w.search||oT(F,z)}))}),L=[];return d.forEach(($,j)=>{if(o||!n.some(Z=>Z.route.id===$.routeId)||u.has(j))return;let N=yl(m,$.path,h);if(!N){L.push({key:j,routeId:$.routeId,path:$.path,matches:null,match:null,controller:null});return}let F=t.fetchers.get(j),z=$d(N,$.path),K=!1;f.has(j)?K=!1:c.includes(j)?K=!0:F&&F.state!=="idle"&&F.data===void 0?K=a:K=gC(z,bn({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:w,nextParams:n[n.length-1].params},r,{actionResult:E,actionStatus:k,defaultShouldRevalidate:R?!1:a})),K&&L.push({key:j,routeId:$.routeId,path:$.path,matches:N,match:z,controller:new AbortController})}),[P,L]}function EA(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function oT(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function gC(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function RA(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||sT(u,d,r,i,o)}}),s.set(l,c)),c&&NA(c)&&await c}finally{s.delete(l)}}function sT(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=If(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=If(t,i,["patch",String(n.length||"0")],r);n.push(...s)}}async function vC(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";Wl(!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&&!Q$.has(s)&&(o[s]=r[s])}Object.assign(i,o),Object.assign(i,bn({},t(i),{lazy:void 0}))}function PA(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function TA(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 bn({},d,{shouldLoad:f,resolve:h=>(c.add(d.route.id),f?OA(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 OA(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}),vC(n.route,i,r)]);if(d!==void 0)throw d;a=f}else if(await vC(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 zr(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 zr(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 jA(e){let{result:t,type:n,status:r}=e;if(lT(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 Kw(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:Fg(t)?t.status:r};if(AA(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 LA(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"),!qw.test(s)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);s=Kb(new URL(t.url),a,i,!0,s,o),e.headers.set("Location",s)}return e}function yC(e,t,n){if(qw.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=jo(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function gc(e,t,n,r){let i=e.createURL(aT(t)).toString(),o={signal:n};if(r&&So(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=qb(r.formData):o.body=r.formData}return new Request(i,o)}function qb(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function bC(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function IA(e,t,n,r,i,o){let s={},a=null,l,c=!1,u={},d=r&&gi(r[1])?r[1].error:void 0;return n.forEach((f,m)=>{let h=t[m].route.id;if(kt(!Cl(f),"Cannot handle redirect results in processLoaderData"),gi(f)){let g=f.error;d!==void 0&&(g=d,d=void 0),a=a||{};{let E=Qc(e,h);a[E.route.id]==null&&(a[E.route.id]=g)}s[h]=void 0,c||(c=!0,l=Fg(f.error)?f.error.status:500),f.headers&&(u[h]=f.headers)}else _l(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 wC(e,t,n,r,i,o,s,a){let{loaderData:l,errors:c}=IA(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 _C(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 zr(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 `unstable_patchRoutesOnMiss()` '+(`function threw the following error: -`+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 Kw(e||500,a,new Error(l),!0)}function CC(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Cl(n))return{result:n,idx:t}}}function aT(e){let t=typeof e=="string"?Ks(e):e;return Gl(bn({},t,{hash:""}))}function MA(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function NA(e){return typeof e=="object"&&e!=null&&"then"in e}function $A(e){return lT(e.result)&&bA.has(e.result.status)}function _l(e){return e.type===dn.deferred}function gi(e){return e.type===dn.error}function Cl(e){return(e&&e.type)===dn.redirect}function AA(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 lT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function DA(e){return yA.has(e.toLowerCase())}function So(e){return gA.has(e.toLowerCase())}async function kC(e,t,n,r,i,o){for(let s=0;sd.route.id===l.route.id),u=c!=null&&!oT(c,l)&&(o&&o[l.route.id])!==void 0;if(_l(a)&&(i||u)){let d=r[s];kt(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await cT(a,d,i).then(f=>{f&&(n[s]=f||n[s])})}}}async function cT(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 Yw(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function $d(e,t){let n=typeof t=="string"?Ks(t).search:t.search;if(e[e.length-1].route.index&&Yw(n||""))return e[e.length-1];let r=nT(e);return r[r.length-1]}function EC(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 Xy(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 BA(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 vd(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 FA(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 ua(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 zA(e,t){try{let n=e.sessionStorage.getItem(iT);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 UA(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(iT,JSON.stringify(n))}catch(r){Wl(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** - * React Router v6.25.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function bu(){return bu=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=Bg(c,JSON.parse(s),o,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Ts([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,s,o,e])}const fT=C.createContext(null);function lp(){return C.useContext(fT)}function HA(e){let t=C.useContext(ss).outlet;return t&&C.createElement(fT.Provider,{value:e},t)}function VA(){let{matches:e}=C.useContext(ss),t=e[e.length-1];return t?t.params:{}}function zg(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=C.useContext(qs),{matches:i}=C.useContext(ss),{pathname:o}=Ys(),s=JSON.stringify(Dg(i,r.v7_relativeSplatPath));return C.useMemo(()=>Bg(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function KA(e,t,n,r){zu()||kt(!1);let{navigator:i}=C.useContext(qs),{matches:o}=C.useContext(ss),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=Ys(),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=yl(e,{pathname:f});return JA(m&&m.map(g=>Object.assign({},g,{params:Object.assign({},a,g.params),pathname:Ts([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:Ts([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n,r)}function qA(){let e=eD(),t=Fg(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 YA=C.createElement(qA,null);class QA 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(ss.Provider,{value:this.props.routeContext},C.createElement(uT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function XA(e){let{routeContext:t,match:n,children:r}=e,i=C.useContext(ap);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(ss.Provider,{value:t},r)}function JA(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||YA,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(XA,{match:d,routeContext:{outlet:u,matches:b,isDataRoute:n!=null},children:y})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?C.createElement(QA,{location:n.location,revalidation:n.revalidation,component:g,error:m,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}var Jw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Jw||{}),Mf=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}(Mf||{});function pT(e){let t=C.useContext(ap);return t||kt(!1),t}function hT(e){let t=C.useContext(Qw);return t||kt(!1),t}function ZA(e){let t=C.useContext(ss);return t||kt(!1),t}function mT(e){let t=ZA(),n=t.matches[t.matches.length-1];return n.route.id||kt(!1),n.route.id}function eD(){var e;let t=C.useContext(uT),n=hT(Mf.UseRouteError),r=mT(Mf.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}let tD=0;function nD(e){let{router:t,basename:n}=pT(Jw.UseBlocker),r=hT(Mf.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:bu({},l,{pathname:jo(l.pathname,n)||l.pathname}),nextLocation:bu({},c,{pathname:jo(c.pathname,n)||c.pathname}),historyAction:u})},[n,e]);return C.useEffect(()=>{let a=String(++tD);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):jc}function rD(){let{router:e}=pT(Jw.UseNavigateStable),t=mT(Mf.UseNavigateStable),n=C.useRef(!1);return dT(()=>{n.current=!0}),C.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,bu({fromRouteId:t},o)))},[e,t])}function iD(e){let{to:t,replace:n,state:r,relative:i}=e;zu()||kt(!1);let{future:o,static:s}=C.useContext(qs),{matches:a}=C.useContext(ss),{pathname:l}=Ys(),c=Va(),u=Bg(t,Dg(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 Zw(e){return HA(e.context)}function Jr(e){kt(!1)}function oD(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Dn.Pop,navigator:o,static:s=!1,future:a}=e;zu()&&kt(!1);let l=t.replace(/^\/*/,"/"),c=C.useMemo(()=>({basename:l,navigator:o,static:s,future:bu({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=Ks(r));let{pathname:u="/",search:d="",hash:f="",state:m=null,key:h="default"}=r,g=C.useMemo(()=>{let E=jo(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(qs.Provider,{value:c},C.createElement(Xw.Provider,{children:n,value:g}))}new Promise(()=>{});function Yb(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,Yb(r.props.children,o));return}r.type!==Jr&&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=Yb(r.props.children,o)),n.push(s)}),n}function sD(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.25.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function wu(){return wu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function aD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function lD(e,t){return e.button===0&&(!t||t==="_self")&&!aD(e)}function Qb(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 cD(e,t){let n=Qb(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const uD=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],dD=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],fD="6";try{window.__reactRouterVersion=fD}catch{}function pD(e,t){return _A({basename:void 0,future:wu({},void 0,{v7_prependBasename:!0}),history:K$({window:void 0}),hydrationData:hD(),routes:e,mapRouteProperties:sD,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function hD(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=wu({},t,{errors:mD(t.errors)})),t}function mD(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 Kw(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 vT=C.createContext({isTransitioning:!1}),gD=C.createContext(new Map),vD="startTransition",RC=am[vD],yD="flushSync",PC=V$[yD];function bD(e){RC?RC(e):e()}function yd(e){PC?PC(e):e()}class wD{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 xD(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(L=>{b?bD(L):L()},[b]),y=C.useCallback((L,$)=>{let{deletedFetchers:j,unstable_flushSync:N,unstable_viewTransitionOpts:F}=$;j.forEach(K=>E.current.delete(K)),L.fetchers.forEach((K,Z)=>{K.data!==void 0&&E.current.set(Z,K.data)});let z=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!F||z){N?yd(()=>o(L)):w(()=>o(L));return}if(N){yd(()=>{f&&(u&&u.resolve(),f.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:F.currentLocation,nextLocation:F.nextLocation})});let K=n.window.document.startViewTransition(()=>{yd(()=>o(L))});K.finished.finally(()=>{yd(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})})}),yd(()=>m(K));return}f?(u&&u.resolve(),f.skipTransition(),g({state:L,currentLocation:F.currentLocation,nextLocation:F.nextLocation})):(a(L),c({isTransitioning:!0,flushSync:!1,currentLocation:F.currentLocation,nextLocation:F.nextLocation}))},[n.window,f,u,E,w]);C.useLayoutEffect(()=>n.subscribe(y),[n,y]),C.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new wD)},[l]),C.useEffect(()=>{if(u&&s&&n.window){let L=s,$=u.promise,j=n.window.document.startViewTransition(async()=>{w(()=>o(L)),await $});j.finished.finally(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})}),m(j)}},[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:L=>n.navigate(L),push:(L,$,j)=>n.navigate(L,{state:$,preventScrollReset:j==null?void 0:j.preventScrollReset}),replace:(L,$,j)=>n.navigate(L,{replace:!0,state:$,preventScrollReset:j==null?void 0:j.preventScrollReset})}),[n]),k=n.basename||"/",R=C.useMemo(()=>({router:n,navigator:_,static:!1,basename:k}),[n,_,k]),P=C.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return C.createElement(C.Fragment,null,C.createElement(ap.Provider,{value:R},C.createElement(Qw.Provider,{value:i},C.createElement(gD.Provider,{value:E.current},C.createElement(vT.Provider,{value:l},C.createElement(oD,{basename:k,location:i.location,navigationType:i.historyAction,navigator:_,future:P},i.initialized||n.future.v7_partialHydration?C.createElement(SD,{routes:n.routes,future:n.future,state:i}):t))))),null)}const SD=C.memo(_D);function _D(e){let{routes:t,future:n,state:r}=e;return KA(t,void 0,r,n)}const CD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",kD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yT=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=gT(t,uD),{basename:m}=C.useContext(qs),h,g=!1;if(typeof c=="string"&&kD.test(c)&&(h=c,CD))try{let y=new URL(window.location.href),_=c.startsWith("//")?new URL(y.protocol+c):new URL(c),k=jo(_.pathname,m);_.origin===y.origin&&k!=null?c=k+_.search+_.hash:g=!0}catch{}let E=WA(c,{relative:i}),b=PD(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",wu({},f,{href:h||E,onClick:g||o?r:w,ref:n,target:l}))}),ED=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=gT(t,dD),f=zg(l,{relative:d.relative}),m=Ys(),h=C.useContext(Qw),{navigator:g,basename:E}=C.useContext(qs),b=h!=null&&OD(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&&(_=jo(_,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)==="/"),L={isActive:R,isPending:P,isTransitioning:b},$=R?r:void 0,j;typeof o=="function"?j=o(L):j=[o,R?"active":null,P?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let N=typeof a=="function"?a(L):a;return C.createElement(yT,wu({},d,{"aria-current":$,className:j,ref:n,style:N,to:l,unstable_viewTransition:c}),typeof u=="function"?u(L):u)});var Xb;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Xb||(Xb={}));var TC;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(TC||(TC={}));function RD(e){let t=C.useContext(ap);return t||kt(!1),t}function PD(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a}=t===void 0?{}:t,l=Va(),c=Ys(),u=zg(e,{relative:s});return C.useCallback(d=>{if(lD(d,n)){d.preventDefault();let f=r!==void 0?r:Gl(c)===Gl(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 TD(e){let t=C.useRef(Qb(e)),n=C.useRef(!1),r=Ys(),i=C.useMemo(()=>cD(r.search,n.current?null:t.current),[r.search]),o=Va(),s=C.useCallback((a,l)=>{const c=Qb(typeof a=="function"?a(i):a);n.current=!0,o("?"+c,l)},[o,i]);return[i,s]}function OD(e,t){t===void 0&&(t={});let n=C.useContext(vT);n==null&&kt(!1);let{basename:r}=RD(Xb.useViewTransitionState),i=zg(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=jo(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=jo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Lm(i.pathname,s)!=null||Lm(i.pathname,o)!=null}function Le(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))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 Hl(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n0?ir(Uu,--si):0,xu--,Bn===10&&(xu=1,Wg--),Bn}function Ei(){return Bn=si2||$f(Bn)>3?"":" "}function QD(e,t){for(;--t&&Ei()&&!(Bn<48||Bn>102||Bn>57&&Bn<65||Bn>70&&Bn<97););return up(e,Gh()+(t<6&&ts()==32&&Ei()==32))}function Zb(e){for(;Ei();)switch(Bn){case e:return si;case 34:case 39:e!==34&&e!==39&&Zb(Bn);break;case 40:e===41&&Zb(e);break;case 92:Ei();break}return si}function XD(e,t){for(;Ei()&&e+Bn!==57;)if(e+Bn===84&&ts()===47)break;return"/*"+up(t,si-1)+"*"+Ug(e===47?e:Ei())}function JD(e){for(;!$f(ts());)Ei();return up(e,si)}function ZD(e){return PT(Vh("",null,null,null,[""],e=RT(e),0,[0],e))}function Vh(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=Ei()){case 40:if(h!=108&&ir(P,d-1)==58){Jb(P+=Vt(Hh(w),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:P+=Hh(w);break;case 9:case 10:case 13:case 32:P+=YD(h);break;case 92:P+=QD(Gh()-1,7);continue;case 47:switch(ts()){case 42:case 47:lh(eB(XD(Ei(),Gh()),t,n),l);break;default:P+="/"}break;case 123*g:a[c++]=Vo(P)*b;case 125*g:case 59:case 0:switch(w){case 0:case 125:E=0;case 59+u:b==-1&&(P=Vt(P,/\f/g,"")),m>0&&Vo(P)-d&&lh(m>32?IC(P+";",r,n,d-1):IC(Vt(P," ","")+";",r,n,d-2),l);break;case 59:P+=";";default:if(lh(R=LC(P,t,n,c,u,i,a,y,_=[],k=[],d),o),w===123)if(u===0)Vh(P,t,R,R,_,o,d,a,k);else switch(f===99&&ir(P,3)===110?100:f){case 100:case 108:case 109:case 115:Vh(e,R,R,r&&lh(LC(e,R,R,0,0,i,a,y,i,_=[],d),k),i,k,d,a,r?_:k);break;default:Vh(P,R,R,R,[""],k,0,a,k)}}c=u=m=0,g=b=1,y=P="",d=s;break;case 58:d=1+Vo(P),m=h;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&qD()==125)continue}switch(P+=Ug(w),w*g){case 38:b=u>0?1:(P+="\f",-1);break;case 44:a[c++]=(Vo(P)-1)*b,b=1;break;case 64:ts()===45&&(P+=Hh(Ei())),f=ts(),u=d=Vo(y=P+=JD(Gh())),w++;break;case 45:h===45&&Vo(P)==2&&(g=0)}}return o}function LC(e,t,n,r,i,o,s,a,l,c,u){for(var d=i-1,f=i===0?o:[""],m=nx(f),h=0,g=0,E=0;h0?f[b]+" "+w:Vt(w,/&\f/g,f[b])))&&(l[E++]=y);return Gg(e,t,n,i===0?ex:a,l,c,u)}function eB(e,t,n){return Gg(e,t,n,_T,Ug(KD()),Nf(e,2,-2),0)}function IC(e,t,n,r){return Gg(e,t,n,tx,Nf(e,0,r),Nf(e,r+1,-1),r)}function ou(e,t){for(var n="",r=nx(e),i=0;i6)switch(ir(e,t+1)){case 109:if(ir(e,t+4)!==45)break;case 102:return Vt(e,/(.+:)(.+)-([^]+)/,"$1"+Ht+"$2-$3$1"+Im+(ir(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Jb(e,"stretch")?TT(Vt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ir(e,t+1)!==115)break;case 6444:switch(ir(e,Vo(e)-3-(~Jb(e,"!important")&&10))){case 107:return Vt(e,":",":"+Ht)+e;case 101:return Vt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ht+(ir(e,14)===45?"inline-":"")+"box$3$1"+Ht+"$2$3$1"+wr+"$2box$3")+e}break;case 5936:switch(ir(e,t+11)){case 114:return Ht+e+wr+Vt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ht+e+wr+Vt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ht+e+wr+Vt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ht+e+wr+e+e}return e}var cB=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case tx:t.return=TT(t.value,t.length);break;case CT:return ou([bd(t,{value:Vt(t.value,"@","@"+Ht)})],i);case ex:if(t.length)return VD(t.props,function(o){switch(HD(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ou([bd(t,{props:[Vt(o,/:(read-\w+)/,":"+Im+"$1")]})],i);case"::placeholder":return ou([bd(t,{props:[Vt(o,/:(plac\w+)/,":"+Ht+"input-$1")]}),bd(t,{props:[Vt(o,/:(plac\w+)/,":"+Im+"$1")]}),bd(t,{props:[Vt(o,/:(plac\w+)/,wr+"input-$1")]})],i)}return""})}},uB=[cB],OT=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||uB,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=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 SB={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},_B=!1,CB=/[A-Z]|^ms/g,kB=/_EMO_([^_]+?)_([^]*?)_EMO_/g,AT=function(t){return t.charCodeAt(1)===45},NC=function(t){return t!=null&&typeof t!="boolean"},e0=ST(function(e){return AT(e)?e:e.replace(CB,"-$&").toLowerCase()}),$C=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kB,function(r,i,o){return Ko={name:i,styles:o,next:Ko},i})}return SB[t]!==1&&!AT(t)&&typeof n=="number"&&n!==0?n+"px":n},EB="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Af(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 Ko={name:i.name,styles:i.styles,next:Ko},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Ko={name:s.name,styles:s.styles,next:Ko},s=s.next;var a=o.styles+";";return a}return RB(e,t,n)}case"function":{if(e!==void 0){var l=Ko,c=n(e);return Ko=l,Af(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function RB(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?LB:IB},FC=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},MB=!1,NB=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return NT(n,r,i),TB(function(){return $T(n,r,i)}),null},$B=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=FC(t,n,r),l=a||BC(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(BB(i)?n:i):t;return v.jsx(jB,{styles:r})}function ax(e,t){return e1(e,t)}const WT=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},FB=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:UT,StyledEngineProvider:DB,ThemeContext:dp,css:zT,default:ax,internal_processStyles:WT,keyframes:tv},Symbol.toStringTag,{value:"Module"})),GT=Hs(FB);function xs(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 HT(e){if(!xs(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=HT(e[n])}),t}function Gr(e,t,n={clone:!0}){const r=n.clone?A({},e):e;return xs(e)&&xs(t)&&Object.keys(t).forEach(i=>{xs(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&xs(e[i])?r[i]=Gr(e[i],t[i],n):n.clone?r[i]=xs(t[i])?HT(t[i]):t[i]:r[i]=t[i]}),r}const zB=Object.freeze(Object.defineProperty({__proto__:null,default:Gr,isPlainObject:xs},Symbol.toStringTag,{value:"Module"})),UB=Hs(zB),WB=Hs(LD);var VT={exports:{}},Zt={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var lx=Symbol.for("react.element"),cx=Symbol.for("react.portal"),nv=Symbol.for("react.fragment"),rv=Symbol.for("react.strict_mode"),iv=Symbol.for("react.profiler"),ov=Symbol.for("react.provider"),sv=Symbol.for("react.context"),GB=Symbol.for("react.server_context"),av=Symbol.for("react.forward_ref"),lv=Symbol.for("react.suspense"),cv=Symbol.for("react.suspense_list"),uv=Symbol.for("react.memo"),dv=Symbol.for("react.lazy"),HB=Symbol.for("react.offscreen"),KT;KT=Symbol.for("react.module.reference");function so(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case lx:switch(e=e.type,e){case nv:case iv:case rv:case lv:case cv:return e;default:switch(e=e&&e.$$typeof,e){case GB:case sv:case av:case dv:case uv:case ov:return e;default:return t}}case cx:return t}}}Zt.ContextConsumer=sv;Zt.ContextProvider=ov;Zt.Element=lx;Zt.ForwardRef=av;Zt.Fragment=nv;Zt.Lazy=dv;Zt.Memo=uv;Zt.Portal=cx;Zt.Profiler=iv;Zt.StrictMode=rv;Zt.Suspense=lv;Zt.SuspenseList=cv;Zt.isAsyncMode=function(){return!1};Zt.isConcurrentMode=function(){return!1};Zt.isContextConsumer=function(e){return so(e)===sv};Zt.isContextProvider=function(e){return so(e)===ov};Zt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===lx};Zt.isForwardRef=function(e){return so(e)===av};Zt.isFragment=function(e){return so(e)===nv};Zt.isLazy=function(e){return so(e)===dv};Zt.isMemo=function(e){return so(e)===uv};Zt.isPortal=function(e){return so(e)===cx};Zt.isProfiler=function(e){return so(e)===iv};Zt.isStrictMode=function(e){return so(e)===rv};Zt.isSuspense=function(e){return so(e)===lv};Zt.isSuspenseList=function(e){return so(e)===cv};Zt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===nv||e===iv||e===rv||e===lv||e===cv||e===HB||typeof e=="object"&&e!==null&&(e.$$typeof===dv||e.$$typeof===uv||e.$$typeof===ov||e.$$typeof===sv||e.$$typeof===av||e.$$typeof===KT||e.getModuleId!==void 0)};Zt.typeOf=so;VT.exports=Zt;var zC=VT.exports;const VB=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function qT(e){const t=`${e}`.match(VB);return t&&t[1]||""}function YT(e,t=""){return e.displayName||e.name||qT(e)||t}function UC(e,t,n){const r=YT(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function KB(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return YT(e,"Component");if(typeof e=="object")switch(e.$$typeof){case zC.ForwardRef:return UC(e,e.render,"ForwardRef");case zC.Memo:return UC(e,e.type,"memo");default:return}}}const qB=Object.freeze(Object.defineProperty({__proto__:null,default:KB,getFunctionName:qT},Symbol.toStringTag,{value:"Module"})),YB=Hs(qB),QB=["values","unit","step"],XB=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 QT(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Le(e,QB),o=XB(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:${ux[e]}px)`};function Lo(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||WC;return t.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const o=r.breakpoints||WC;return Object.keys(t).reduce((s,a)=>{if(Object.keys(o.values||ux).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 XT(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function JT(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function ZB(e,...t){const n=XT(e),r=[n,...t].reduce((i,o)=>Gr(i,o),{});return JT(Object.keys(n),r)}function e4(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 t0({values:e,breakpoints:t,base:n}){const r=n||e4(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 Su(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 Mm(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Su(e,n)||r,t&&(i=t(i,r,e)),i}function Ln(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=Su(l,r)||{};return Lo(s,a,d=>{let f=Mm(c,i,d);return d===f&&typeof d=="string"&&(f=Mm(c,i,`${t}${d==="default"?"":we(d)}`,d)),n===!1?f:{[n]:f}})};return o.propTypes={},o.filterProps=[t],o}function t4(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const n4={m:"margin",p:"padding"},r4={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},GC={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},i4=t4(e=>{if(e.length>2)if(GC[e])e=GC[e];else return[e];const[t,n]=e.split(""),r=n4[t],i=r4[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),dx=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],fx=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...dx,...fx];function fp(e,t,n,r){var i;const o=(i=Su(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 px(e){return fp(e,"spacing",8)}function Vl(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 o4(e,t){return n=>e.reduce((r,i)=>(r[i]=Vl(t,n),r),{})}function s4(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=i4(n),o=o4(i,r),s=e[n];return Lo(e,s,o)}function ZT(e,t){const n=px(e.theme);return Object.keys(e).map(r=>s4(e,t,r,n)).reduce(Xd,{})}function kn(e){return ZT(e,dx)}kn.propTypes={};kn.filterProps=dx;function En(e){return ZT(e,fx)}En.propTypes={};En.filterProps=fx;function a4(e=8){if(e.mui)return e;const t=px({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 fv(...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]?Xd(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Vi(e){return typeof e!="number"?e:`${e}px solid`}function ao(e,t){return Ln({prop:e,themeKey:"borders",transform:t})}const l4=ao("border",Vi),c4=ao("borderTop",Vi),u4=ao("borderRight",Vi),d4=ao("borderBottom",Vi),f4=ao("borderLeft",Vi),p4=ao("borderColor"),h4=ao("borderTopColor"),m4=ao("borderRightColor"),g4=ao("borderBottomColor"),v4=ao("borderLeftColor"),y4=ao("outline",Vi),b4=ao("outlineColor"),pv=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=fp(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Vl(t,r)});return Lo(e,e.borderRadius,n)}return null};pv.propTypes={};pv.filterProps=["borderRadius"];fv(l4,c4,u4,d4,f4,p4,h4,m4,g4,v4,pv,y4,b4);const hv=e=>{if(e.gap!==void 0&&e.gap!==null){const t=fp(e.theme,"spacing",8),n=r=>({gap:Vl(t,r)});return Lo(e,e.gap,n)}return null};hv.propTypes={};hv.filterProps=["gap"];const mv=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=fp(e.theme,"spacing",8),n=r=>({columnGap:Vl(t,r)});return Lo(e,e.columnGap,n)}return null};mv.propTypes={};mv.filterProps=["columnGap"];const gv=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=fp(e.theme,"spacing",8),n=r=>({rowGap:Vl(t,r)});return Lo(e,e.rowGap,n)}return null};gv.propTypes={};gv.filterProps=["rowGap"];const w4=Ln({prop:"gridColumn"}),x4=Ln({prop:"gridRow"}),S4=Ln({prop:"gridAutoFlow"}),_4=Ln({prop:"gridAutoColumns"}),C4=Ln({prop:"gridAutoRows"}),k4=Ln({prop:"gridTemplateColumns"}),E4=Ln({prop:"gridTemplateRows"}),R4=Ln({prop:"gridTemplateAreas"}),P4=Ln({prop:"gridArea"});fv(hv,mv,gv,w4,x4,S4,_4,C4,k4,E4,R4,P4);function su(e,t){return t==="grey"?t:e}const T4=Ln({prop:"color",themeKey:"palette",transform:su}),O4=Ln({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:su}),j4=Ln({prop:"backgroundColor",themeKey:"palette",transform:su});fv(T4,O4,j4);function bi(e){return e<=1&&e!==0?`${e*100}%`:e}const L4=Ln({prop:"width",transform:bi}),hx=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])||ux[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:bi(n)}};return Lo(e,e.maxWidth,t)}return null};hx.filterProps=["maxWidth"];const I4=Ln({prop:"minWidth",transform:bi}),M4=Ln({prop:"height",transform:bi}),N4=Ln({prop:"maxHeight",transform:bi}),$4=Ln({prop:"minHeight",transform:bi});Ln({prop:"size",cssProperty:"width",transform:bi});Ln({prop:"size",cssProperty:"height",transform:bi});const A4=Ln({prop:"boxSizing"});fv(L4,hx,I4,M4,N4,$4,A4);const pp={border:{themeKey:"borders",transform:Vi},borderTop:{themeKey:"borders",transform:Vi},borderRight:{themeKey:"borders",transform:Vi},borderBottom:{themeKey:"borders",transform:Vi},borderLeft:{themeKey:"borders",transform:Vi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Vi},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:pv},color:{themeKey:"palette",transform:su},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:su},backgroundColor:{themeKey:"palette",transform:su},p:{style:En},pt:{style:En},pr:{style:En},pb:{style:En},pl:{style:En},px:{style:En},py:{style:En},padding:{style:En},paddingTop:{style:En},paddingRight:{style:En},paddingBottom:{style:En},paddingLeft:{style:En},paddingX:{style:En},paddingY:{style:En},paddingInline:{style:En},paddingInlineStart:{style:En},paddingInlineEnd:{style:En},paddingBlock:{style:En},paddingBlockStart:{style:En},paddingBlockEnd:{style:En},m:{style:kn},mt:{style:kn},mr:{style:kn},mb:{style:kn},ml:{style:kn},mx:{style:kn},my:{style:kn},margin:{style:kn},marginTop:{style:kn},marginRight:{style:kn},marginBottom:{style:kn},marginLeft:{style:kn},marginX:{style:kn},marginY:{style:kn},marginInline:{style:kn},marginInlineStart:{style:kn},marginInlineEnd:{style:kn},marginBlock:{style:kn},marginBlockStart:{style:kn},marginBlockEnd:{style:kn},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:hv},rowGap:{style:gv},columnGap:{style:mv},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:bi},maxWidth:{style:hx},minWidth:{transform:bi},height:{transform:bi},maxHeight:{transform:bi},minHeight:{transform:bi},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function D4(...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 B4(e,t){return typeof e=="function"?e(t):e}function eO(){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=Su(i,c)||{};return d?d(s):Lo(s,r,h=>{let g=Mm(f,u,h);return h===g&&typeof h=="string"&&(g=Mm(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:pp;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=XT(o.breakpoints),d=Object.keys(u);let f=u;return Object.keys(c).forEach(m=>{const h=B4(c[m],o);if(h!=null)if(typeof h=="object")if(s[m])f=Xd(f,e(m,h,o,s));else{const g=Lo({theme:o},h,E=>({[m]:E}));D4(g,h)?f[m]=t({sx:h,theme:o}):f=Xd(f,g)}else f=Xd(f,e(m,h,o,s))}),JT(d,f)}return Array.isArray(i)?i.map(a):a(i)}return t}const Wu=eO();Wu.filterProps=["sx"];function tO(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 F4=["breakpoints","palette","spacing","shape"];function hp(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Le(e,F4),a=QT(n),l=a4(i);let c=Gr({breakpoints:a,direction:"ltr",components:{},palette:A({mode:"light"},r),spacing:l,shape:A({},JB,o)},s);return c.applyStyles=tO,c=t.reduce((u,d)=>Gr(u,d),c),c.unstable_sxConfig=A({},pp,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Wu({sx:d,theme:this})},c}const z4=Object.freeze(Object.defineProperty({__proto__:null,default:hp,private_createBreakpoints:QT,unstable_applyStyles:tO},Symbol.toStringTag,{value:"Module"})),U4=Hs(z4),W4=["sx"],G4=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:pp;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function vv(e){const{sx:t}=e,n=Le(e,W4),{systemProps:r,otherProps:i}=G4(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const a=t(...s);return xs(a)?A({},r,a):r}:o=A({},r,t),A({},i,{sx:o})}const H4=Object.freeze(Object.defineProperty({__proto__:null,default:Wu,extendSxProp:vv,unstable_createStyleFunctionSx:eO,unstable_defaultSxConfig:pp},Symbol.toStringTag,{value:"Module"})),V4=Hs(H4);var Gu=oo;Object.defineProperty(cp,"__esModule",{value:!0});var K4=cp.default=s5;cp.shouldForwardProp=Kh;cp.systemDefaultTheme=void 0;var Ui=Gu(xT()),n1=Gu(ID()),HC=e5(GT),q4=UB;Gu(WB);Gu(YB);var Y4=Gu(U4),Q4=Gu(V4);const X4=["ownerState"],J4=["variants"],Z4=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function nO(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(nO=function(r){return r?n:t})(e)}function e5(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=nO(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 t5(e){return Object.keys(e).length===0}function n5(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Kh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const r5=cp.systemDefaultTheme=(0,Y4.default)(),i5=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function ch({defaultTheme:e,theme:t,themeId:n}){return t5(t)?e:t[n]||t}function o5(e){return e?(t,n)=>n[e]:null}function qh(e,t){let{ownerState:n}=t,r=(0,n1.default)(t,X4);const i=typeof e=="function"?e((0,Ui.default)({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>qh(o,(0,Ui.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=(0,n1.default)(i,J4);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,Ui.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,Ui.default)({ownerState:n},r,n)):l.style))}),a}return i}function s5(e={}){const{themeId:t,defaultTheme:n=r5,rootShouldForwardProp:r=Kh,slotShouldForwardProp:i=Kh}=e,o=s=>(0,Q4.default)((0,Ui.default)({},s,{theme:ch((0,Ui.default)({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{(0,HC.internal_processStyles)(s,k=>k.filter(R=>!(R!=null&&R.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=o5(i5(c))}=a,m=(0,n1.default)(a,Z4),h=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=d||!1;let E,b=Kh;c==="Root"||c==="root"?b=r:c?b=i:n5(s)&&(b=void 0);const w=(0,HC.default)(s,(0,Ui.default)({shouldForwardProp:b,label:E},m)),y=k=>typeof k=="function"&&k.__emotion_real!==k||(0,q4.isPlainObject)(k)?R=>qh(k,(0,Ui.default)({},R,{theme:ch({theme:R.theme,defaultTheme:n,themeId:t})})):k,_=(k,...R)=>{let P=y(k);const L=R?R.map(y):[];l&&f&&L.push(N=>{const F=ch((0,Ui.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]=qh(le,(0,Ui.default)({},N,{theme:F}))}),f(N,K)}),l&&!h&&L.push(N=>{var F;const z=ch((0,Ui.default)({},N,{defaultTheme:n,themeId:t})),K=z==null||(F=z.components)==null||(F=F[l])==null?void 0:F.variants;return qh({variants:K},(0,Ui.default)({},N,{theme:z}))}),g||L.push(o);const $=L.length-R.length;if(Array.isArray(k)&&$>0){const N=new Array($).fill("");P=[...k,...N],P.raw=[...k.raw,...N]}const j=w(P,...L);return s.muiName&&(j.muiName=s.muiName),j};return w.withConfig&&(_.withConfig=w.withConfig),_}}const VC=e=>e,a5=()=>{let e=VC;return{configure(t){e=t},generate(t){return e(t)},reset(){e=VC}}},mx=a5(),l5={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=l5[t];return r?`${n}-${r}`:`${mx.generate(e)}-${t}`}function c5(e,t){return A({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var In={};const u5=Hs(jD);function d5(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const f5=Object.freeze(Object.defineProperty({__proto__:null,default:d5},Symbol.toStringTag,{value:"Module"})),p5=Hs(f5);var rO=oo;Object.defineProperty(In,"__esModule",{value:!0});var $t=In.alpha=aO;In.blend=C5;In.colorChannel=void 0;var Nm=In.darken=vx;In.decomposeColor=eo;var r1=In.emphasize=lO,h5=In.getContrastRatio=b5;In.getLuminance=Am;In.hexToRgb=iO;In.hslToRgb=sO;var $m=In.lighten=yx;In.private_safeAlpha=w5;In.private_safeColorChannel=void 0;In.private_safeDarken=x5;In.private_safeEmphasize=_5;In.private_safeLighten=S5;In.recomposeColor=Hu;In.rgbToHex=y5;var KC=rO(u5),m5=rO(p5);function gx(e,t=0,n=1){return(0,m5.default)(e,t,n)}function iO(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 g5(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function eo(e){if(e.type)return e;if(e.charAt(0)==="#")return eo(iO(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,KC.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,KC.default)(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const oO=e=>{const t=eo(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};In.colorChannel=oO;const v5=(e,t)=>{try{return oO(e)}catch{return e}};In.private_safeColorChannel=v5;function Hu(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 y5(e){if(e.indexOf("#")===0)return e;const{values:t}=eo(e);return`#${t.map((n,r)=>g5(r===3?Math.round(255*n):n)).join("")}`}function sO(e){e=eo(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])),Hu({type:a,values:l})}function Am(e){e=eo(e);let t=e.type==="hsl"||e.type==="hsla"?eo(sO(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 b5(e,t){const n=Am(e),r=Am(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function aO(e,t){return e=eo(e),t=gx(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Hu(e)}function w5(e,t,n){try{return aO(e,t)}catch{return e}}function vx(e,t){if(e=eo(e),t=gx(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 Hu(e)}function x5(e,t,n){try{return vx(e,t)}catch{return e}}function yx(e,t){if(e=eo(e),t=gx(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 Hu(e)}function S5(e,t,n){try{return yx(e,t)}catch{return e}}function lO(e,t=.15){return Am(e)>.5?vx(e,t):yx(e,t)}function _5(e,t,n){try{return lO(e,t)}catch{return e}}function C5(e,t,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),o=eo(e),s=eo(t),a=[i(o.values[0],s.values[0]),i(o.values[1],s.values[1]),i(o.values[2],s.values[2])];return Hu({type:"rgb",values:a})}const Df={black:"#000",white:"#fff"},k5={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"},vc={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"},yc={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"},wd={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"},bc={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"},wc={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"},xc={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"},E5=["mode","contrastThreshold","tonalOffset"],qC={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:Df.white,default:Df.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}},n0={text:{primary:Df.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:Df.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 YC(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=$m(e.main,i):t==="dark"&&(e.dark=Nm(e.main,o)))}function R5(e="light"){return e==="dark"?{main:bc[200],light:bc[50],dark:bc[400]}:{main:bc[700],light:bc[400],dark:bc[800]}}function P5(e="light"){return e==="dark"?{main:vc[200],light:vc[50],dark:vc[400]}:{main:vc[500],light:vc[300],dark:vc[700]}}function T5(e="light"){return e==="dark"?{main:yc[500],light:yc[300],dark:yc[700]}:{main:yc[700],light:yc[400],dark:yc[800]}}function O5(e="light"){return e==="dark"?{main:wc[400],light:wc[300],dark:wc[700]}:{main:wc[700],light:wc[500],dark:wc[900]}}function j5(e="light"){return e==="dark"?{main:xc[400],light:xc[300],dark:xc[700]}:{main:xc[800],light:xc[500],dark:xc[900]}}function L5(e="light"){return e==="dark"?{main:wd[400],light:wd[300],dark:wd[700]}:{main:"#ed6c02",light:wd[500],dark:wd[900]}}function I5(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Le(e,E5),o=e.primary||R5(t),s=e.secondary||P5(t),a=e.error||T5(t),l=e.info||O5(t),c=e.success||j5(t),u=e.warning||L5(t);function d(g){return h5(g,n0.text.primary)>=n?n0.text.primary:qC.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(Hl(11,E?` (${E})`:"",b));if(typeof g.main!="string")throw new Error(Hl(12,E?` (${E})`:"",JSON.stringify(g.main)));return YC(g,"light",w,r),YC(g,"dark",y,r),g.contrastText||(g.contrastText=d(g.main)),g},m={dark:n0,light:qC};return Gr(A({common:A({},Df),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:k5,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r},m[t]),i)}const M5=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function N5(e){return Math.round(e*1e5)/1e5}const QC={textTransform:"uppercase"},XC='"Roboto", "Helvetica", "Arial", sans-serif';function $5(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=XC,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,f=Le(n,M5),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===XC?{letterSpacing:`${N5(_/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,QC),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,QC),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Gr(A({htmlFontSize:c,pxToRem:h,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},E),f,{clone:!1})}const A5=.2,D5=.14,B5=.12;function mn(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${A5})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${D5})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${B5})`].join(",")}const F5=["none",mn(0,2,1,-1,0,1,1,0,0,1,3,0),mn(0,3,1,-2,0,2,2,0,0,1,5,0),mn(0,3,3,-2,0,3,4,0,0,1,8,0),mn(0,2,4,-1,0,4,5,0,0,1,10,0),mn(0,3,5,-1,0,5,8,0,0,1,14,0),mn(0,3,5,-1,0,6,10,0,0,1,18,0),mn(0,4,5,-2,0,7,10,1,0,2,16,1),mn(0,5,5,-3,0,8,10,1,0,3,14,2),mn(0,5,6,-3,0,9,12,1,0,3,16,2),mn(0,6,6,-3,0,10,14,1,0,4,18,3),mn(0,6,7,-4,0,11,15,1,0,4,20,3),mn(0,7,8,-4,0,12,17,2,0,5,22,4),mn(0,7,8,-4,0,13,19,2,0,5,24,4),mn(0,7,9,-4,0,14,21,2,0,5,26,4),mn(0,8,9,-5,0,15,22,2,0,6,28,5),mn(0,8,10,-5,0,16,24,2,0,6,30,5),mn(0,8,11,-5,0,17,26,2,0,6,32,5),mn(0,9,11,-5,0,18,28,2,0,7,34,6),mn(0,9,12,-6,0,19,29,2,0,7,36,6),mn(0,10,13,-6,0,20,31,3,0,8,38,7),mn(0,10,13,-6,0,21,33,3,0,8,40,7),mn(0,10,14,-6,0,22,35,3,0,8,42,7),mn(0,11,14,-7,0,23,36,3,0,9,44,8),mn(0,11,15,-7,0,24,38,3,0,9,46,8)],z5=["duration","easing","delay"],U5={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)"},cO={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function JC(e){return`${Math.round(e)}ms`}function W5(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function G5(e){const t=A({},U5,e.easing),n=A({},cO,e.duration);return A({getAutoHeightDuration:W5,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0}=o;return Le(o,z5),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:JC(s)} ${a} ${typeof l=="string"?l:JC(l)}`).join(",")}},e,{easing:t,duration:n})}const H5={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},V5=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function bx(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Le(e,V5);if(e.vars)throw new Error(Hl(18));const a=I5(r),l=hp(e);let c=Gr(l,{mixins:c5(l.breakpoints,n),palette:a,shadows:F5.slice(),typography:$5(a,o),transitions:G5(i),zIndex:A({},H5)});return c=Gr(c,s),c=t.reduce((u,d)=>Gr(u,d),c),c.unstable_sxConfig=A({},pp,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Wu({sx:d,theme:this})},c}const wx=bx(),_u="$$material";function uO(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const cr=e=>uO(e)&&e!=="classes",Ee=K4({themeId:_u,defaultTheme:wx,rootShouldForwardProp:cr});function Bf(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]=Bf(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}const dO=C.createContext(void 0);function K5({value:e,children:t}){return v.jsx(dO.Provider,{value:e,children:t})}function q5(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?Bf(i.defaultProps,r):!i.styleOverrides&&!i.variants?Bf(i,r):r}function Y5({props:e,name:t}){const n=C.useContext(dO);return q5({props:e,name:t,theme:{components:n}})}function gt(e){return Y5(e)}const ZC={};function Q5(e,t){const n=C.useRef(ZC);return n.current===ZC&&(n.current=e(t)),n}const X5=[];function J5(e){C.useEffect(e,X5)}class mp{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new mp}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function ba(){const e=Q5(mp.create).current;return J5(e.disposeEffect),e}let yv=!0,i1=!1;const Z5=new mp,e3={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 t3(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&e3[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function n3(e){e.metaKey||e.altKey||e.ctrlKey||(yv=!0)}function r0(){yv=!1}function r3(){this.visibilityState==="hidden"&&i1&&(yv=!0)}function i3(e){e.addEventListener("keydown",n3,!0),e.addEventListener("mousedown",r0,!0),e.addEventListener("pointerdown",r0,!0),e.addEventListener("touchstart",r0,!0),e.addEventListener("visibilitychange",r3,!0)}function o3(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return yv||t3(t)}function bv(){const e=C.useCallback(i=>{i!=null&&i3(i.ownerDocument)},[]),t=C.useRef(!1);function n(){return t.current?(i1=!0,Z5.start(100,()=>{i1=!1}),t.current=!1,!0):!1}function r(i){return o3(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Dm(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=>{Dm(n,t)})},e)}function pt(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=ft(e,i,n)}),r}function s3(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 a3=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],l3=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,s3,s)},c3=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})),ek={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},u3={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},d3=e=>u3[e]||e,Ct=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiTypography"}),i=d3(r.color),o=vv(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=ek}=o,h=Le(o,a3),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]||ek[f])||"span",b=l3(g);return v.jsx(c3,A({as:E,ref:n,ownerState:g,className:Fe(b.root,a)},h))});function f3(e){return ft("MuiLink",e)}const p3=pt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);function h3(e){return Object.keys(e).length===0}function xx(e=null){const t=C.useContext(dp);return!t||h3(t)?e:t}const m3=hp();function wv(e=m3){return xx(e)}function g3({styles:e,themeId:t,defaultTheme:n={}}){const r=wv(n),i=typeof e=="function"?e(t&&r[t]||r):e;return v.jsx(UT,{styles:i})}const v3=["className","component"];function y3(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,o=ax("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(Wu);return C.forwardRef(function(l,c){const u=wv(n),d=vv(l),{className:f,component:m="div"}=d,h=Le(d,v3);return v.jsx(o,A({as:m,ref:c,className:Fe(f,i?i(r):r),theme:t&&u[t]||u},h))})}const b3=["ownerState"],w3=["variants"],x3=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function S3(e){return Object.keys(e).length===0}function _3(e){return typeof e=="string"&&e.charCodeAt(0)>96}function i0(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const C3=hp(),k3=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function uh({defaultTheme:e,theme:t,themeId:n}){return S3(t)?e:t[n]||t}function E3(e){return e?(t,n)=>n[e]:null}function Yh(e,t){let{ownerState:n}=t,r=Le(t,b3);const i=typeof e=="function"?e(A({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Yh(o,A({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=Le(i,w3);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 R3(e={}){const{themeId:t,defaultTheme:n=C3,rootShouldForwardProp:r=i0,slotShouldForwardProp:i=i0}=e,o=s=>Wu(A({},s,{theme:uh(A({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{WT(s,k=>k.filter(R=>!(R!=null&&R.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=E3(k3(c))}=a,m=Le(a,x3),h=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=d||!1;let E,b=i0;c==="Root"||c==="root"?b=r:c?b=i:_3(s)&&(b=void 0);const w=ax(s,A({shouldForwardProp:b,label:E},m)),y=k=>typeof k=="function"&&k.__emotion_real!==k||xs(k)?R=>Yh(k,A({},R,{theme:uh({theme:R.theme,defaultTheme:n,themeId:t})})):k,_=(k,...R)=>{let P=y(k);const L=R?R.map(y):[];l&&f&&L.push(N=>{const F=uh(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]=Yh(le,A({},N,{theme:F}))}),f(N,K)}),l&&!h&&L.push(N=>{var F;const z=uh(A({},N,{defaultTheme:n,themeId:t})),K=z==null||(F=z.components)==null||(F=F[l])==null?void 0:F.variants;return Yh({variants:K},A({},N,{theme:z}))}),g||L.push(o);const $=L.length-R.length;if(Array.isArray(k)&&$>0){const N=new Array($).fill("");P=[...k,...N],P.raw=[...k.raw,...N]}const j=w(P,...L);return s.muiName&&(j.muiName=s.muiName),j};return w.withConfig&&(_.withConfig=w.withConfig),_}}const P3=R3();function fO(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Bf(t.components[n].defaultProps,r)}function T3({props:e,name:t,defaultTheme:n,themeId:r}){let i=wv(n);return r&&(i=i[r]||i),fO({theme:i,name:t,props:e})}const ai=typeof window<"u"?C.useLayoutEffect:C.useEffect;function O3(e,t,n,r,i){const[o,s]=C.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return ai(()=>{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 pO=C.useSyncExternalStore;function j3(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 pO(l,a,s)}function Sx(e,t={}){const n=xx(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=fO({name:"MuiUseMediaQuery",props:t,theme:n});let l=typeof e=="function"?e(n):e;return l=l.replace(/^@media( ?)/m,""),(pO!==void 0?j3:O3)(l,i,o,s,a)}function o1(...e){return e.reduce((t,n)=>n==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function xv(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 L3(e,t){return()=>null}function Jd(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 Kn(e){return e&&e.ownerDocument||document}function rs(e){return Kn(e).defaultView||window}function I3(e,t){return()=>null}let tk=0;function M3(e){const[t,n]=C.useState(e),r=e||t;return C.useEffect(()=>{t==null&&(tk+=1,n(`mui-${tk}`))},[t]),r}const nk=am.useId;function gp(e){if(nk!==void 0){const t=nk();return e??t}return M3(e)}function N3(e,t,n,r,i){return null}function Cu({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 qi(e){const t=C.useRef(e);return ai(()=>{t.current=e}),C.useRef((...n)=>(0,t.current)(...n)).current}function hO(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const mO=e=>{const t=C.useRef({});return C.useEffect(()=>{t.current=e}),t.current};function $3(e){return C.Children.toArray(e).filter(t=>C.isValidElement(t))}function ku(e){return typeof e=="string"}function Xc(e,t,n){return e===void 0||ku(e)?t:A({},t,{ownerState:A({},t.ownerState,n)})}function Bm(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 rk(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 gO(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const m=Fe(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=Bm(A({},i,r)),a=rk(r),l=rk(i),c=t(s),u=Fe(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}}function vO(e,t,n){return typeof e=="function"?e(t,n):e}const A3=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Io(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Le(e,A3),a=o?{}:vO(r,i),{props:l,internalRef:c}=gO(A({},s,{externalSlotProps:a})),u=un(c,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return Xc(n,A({},l,{ref:u}),i)}const yO=C.createContext(null);function bO(){return C.useContext(yO)}const D3=typeof Symbol=="function"&&Symbol.for,B3=D3?Symbol.for("mui.nested"):"__THEME_NESTED__";function F3(e,t){return typeof t=="function"?t(e):A({},e,t)}function z3(e){const{children:t,theme:n}=e,r=bO(),i=C.useMemo(()=>{const o=r===null?n:F3(r,n);return o!=null&&(o[B3]=r!==null),o},[n,r]);return v.jsx(yO.Provider,{value:i,children:t})}const U3=["value"],wO=C.createContext();function W3(e){let{value:t}=e,n=Le(e,U3);return v.jsx(wO.Provider,A({value:t??!0},n))}const _x=()=>{const e=C.useContext(wO);return e??!1},ik={};function ok(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 G3(e){const{children:t,theme:n,themeId:r}=e,i=xx(ik),o=bO()||ik,s=ok(r,i,n),a=ok(r,o,n,!0),l=s.direction==="rtl";return v.jsx(z3,{theme:a,children:v.jsx(dp.Provider,{value:s,children:v.jsx(W3,{value:l,children:v.jsx(K5,{value:s==null?void 0:s.components,children:t})})})})}function Ff(e){"@babel/helpers - typeof";return Ff=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},Ff(e)}function H3(e,t){if(Ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function V3(e){var t=H3(e,"string");return Ff(t)=="symbol"?t:t+""}const K3=["component","direction","spacing","divider","children","className","useFlexGap"],q3=hp(),Y3=P3("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function Q3(e){return T3({props:e,name:"MuiStack",defaultTheme:q3})}function X3(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],Z3=({ownerState:e,theme:t})=>{let n=A({display:"flex",flexDirection:"column"},Lo({theme:t},t0({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=px(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=t0({values:e.direction,base:i}),s=t0({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=Gr(n,Lo({theme:t},s,(l,c)=>e.useFlexGap?{gap:Vl(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${J3(c?o[c]:e.direction)}`]:Vl(r,l)}}))}return n=ZB(t.breakpoints,n),n};function eF(e={}){const{createStyledComponent:t=Y3,useThemeProps:n=Q3,componentName:r="MuiStack"}=e,i=()=>mt({root:["root"]},l=>ft(r,l),{}),o=t(Z3);return C.forwardRef(function(l,c){const u=n(l),d=vv(u),{component:f="div",direction:m="column",spacing:h=0,divider:g,children:E,className:b,useFlexGap:w=!1}=d,y=Le(d,K3),_={direction:m,spacing:h,useFlexGap:w},k=i();return v.jsx(o,A({as:f,ownerState:_,ref:c,className:Fe(k.root,b)},y,{children:g?X3(E,g):E}))})}const xO={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},tF=e=>xO[e]||e,nF=({theme:e,ownerState:t})=>{const n=tF(t.color),r=Su(e,`palette.${n}`,!1)||t.color,i=Su(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:$t(r,.4)},rF=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],iF=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,f3,t)},oF=Ee(Ct,{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:nF({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"},[`&.${p3.focusVisible}`]:{outline:"auto"}})),_o=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=Le(r,rF),{isFocusVisibleRef:h,onBlur:g,onFocus:E,ref:b}=bv(),[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}),L=iF(P);return v.jsx(oF,A({color:o,className:Fe(L.root,i),classes:c,component:s,onBlur:k,onFocus:R,ref:_,ownerState:P,variant:d,sx:[...Object.keys(xO).includes(o)?[]:[{color:o}],...Array.isArray(f)?f:[f]]},m))}),sk=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function Mi(){const e=wv(wx);return e[_u]||e}function sF(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 aF=["className","component","elevation","square","variant"],lF=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return mt(o,sF,i)},cF=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(${$t("#fff",sk(t.elevation))}, ${$t("#fff",sk(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),as=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=Le(r,aF),u=A({},r,{component:o,elevation:s,square:a,variant:l}),d=lF(u);return v.jsx(cF,A({as:o,ownerState:u,className:Fe(d.root,i),ref:n},c))});function uF(e){return ft("MuiAppBar",e)}pt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const dF=["className","color","enableColorOnDark","position"],fF=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${we(t)}`,`position${we(n)}`]};return mt(i,uF,r)},dh=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,pF=Ee(as,{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:dh(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:dh(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:dh(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:dh(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"}))}),hF=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=Le(r,dF),c=A({},r,{color:o,position:a,enableColorOnDark:s}),u=fF(c);return v.jsx(pF,A({square:!0,component:"header",ownerState:c,elevation:4,className:Fe(u.root,i,a==="fixed"&&"mui-fixed"),ref:n},l))});function mF(e){return ft("MuiToolbar",e)}pt("MuiToolbar",["root","gutters","regular","dense"]);const gF=["className","component","disableGutters","variant"],vF=e=>{const{classes:t,disableGutters:n,variant:r}=e;return mt({root:["root",!n&&"gutters",r]},mF,t)},yF=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),bF=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=Le(r,gF),c=A({},r,{component:o,disableGutters:s,variant:a}),u=vF(c);return v.jsx(yF,A({as:o,className:Fe(u.root,i),ref:n,ownerState:c},l))});function zf(e,t){return zf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},zf(e,t)}function vp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,zf(e,t)}const ak={disabled:!1},Fm=jt.createContext(null);var wF=function(t){return t.scrollTop},Ad="unmounted",ml="exited",gl="entering",Lc="entered",s1="exiting",lo=function(e){vp(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=ml,o.appearStatus=gl):l=Lc:r.unmountOnExit||r.mountOnEnter?l=Ad:l=ml,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Ad?{status:ml}: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!==gl&&s!==Lc&&(o=gl):(s===gl||s===Lc)&&(o=s1)}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===gl){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Nd.findDOMNode(this);s&&wF(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ml&&this.setState({status:Ad})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[Nd.findDOMNode(this),a],c=l[0],u=l[1],d=this.getTimeouts(),f=a?d.appear:d.enter;if(!i&&!s||ak.disabled){this.safeSetState({status:Lc},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:gl},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:Lc},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:Nd.findDOMNode(this);if(!o||ak.disabled){this.safeSetState({status:ml},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:s1},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:ml},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:Nd.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===Ad)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=Le(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return jt.createElement(Fm.Provider,{value:null},typeof s=="function"?s(i,a):jt.cloneElement(jt.Children.only(s),a))},t}(jt.Component);lo.contextType=Fm;lo.propTypes={};function Sc(){}lo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Sc,onEntering:Sc,onEntered:Sc,onExit:Sc,onExiting:Sc,onExited:Sc};lo.UNMOUNTED=Ad;lo.EXITED=ml;lo.ENTERING=gl;lo.ENTERED=Lc;lo.EXITING=s1;function xF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cx(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 SF(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 Wi=pt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),PF=["center","classes","className"];let Sv=e=>e,lk,ck,uk,dk;const a1=550,TF=80,OF=tv(lk||(lk=Sv` - 0% { - transform: scale(0); - opacity: 0.1; - } - - 100% { - transform: scale(1); - opacity: 0.3; - } -`)),jF=tv(ck||(ck=Sv` - 0% { - opacity: 1; - } - - 100% { - opacity: 0; - } -`)),LF=tv(uk||(uk=Sv` - 0% { - transform: scale(1); - } - - 50% { - transform: scale(0.92); - } - - 100% { - transform: scale(1); - } -`)),IF=Ee("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),MF=Ee(RF,{name:"MuiTouchRipple",slot:"Ripple"})(dk||(dk=Sv` - opacity: 0; - position: absolute; - - &.${0} { - opacity: 0.3; - transform: scale(1); - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; - } - - &.${0} { - animation-duration: ${0}ms; - } - - & .${0} { - opacity: 1; - display: block; - width: 100%; - height: 100%; - border-radius: 50%; - background-color: currentColor; - } - - & .${0} { - opacity: 0; - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; - } - - & .${0} { - position: absolute; - /* @noflip */ - left: 0px; - top: 0; - animation-name: ${0}; - animation-duration: 2500ms; - animation-timing-function: ${0}; - animation-iteration-count: infinite; - animation-delay: 200ms; - } -`),Wi.rippleVisible,OF,a1,({theme:e})=>e.transitions.easing.easeInOut,Wi.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Wi.child,Wi.childLeaving,jF,a1,({theme:e})=>e.transitions.easing.easeInOut,Wi.childPulsate,LF,({theme:e})=>e.transitions.easing.easeInOut),NF=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=Le(r,PF),[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=ba(),h=C.useRef(null),g=C.useRef(null),E=C.useCallback(_=>{const{pulsate:k,rippleX:R,rippleY:P,rippleSize:L,cb:$}=_;c(j=>[...j,v.jsx(MF,{classes:{ripple:Fe(o.ripple,Wi.ripple),rippleVisible:Fe(o.rippleVisible,Wi.rippleVisible),ripplePulsate:Fe(o.ripplePulsate,Wi.ripplePulsate),child:Fe(o.child,Wi.child),childLeaving:Fe(o.childLeaving,Wi.childLeaving),childPulsate:Fe(o.childPulsate,Wi.childPulsate)},timeout:a1,pulsate:k,rippleX:R,rippleY:P,rippleSize:L},u.current)]),u.current+=1,d.current=$},[o]),b=C.useCallback((_={},k={},R=()=>{})=>{const{pulsate:P=!1,center:L=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 j=$?null:g.current,N=j?j.getBoundingClientRect():{width:0,height:0,left:0,top:0};let F,z,K;if(L||_===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(L)K=Math.sqrt((2*N.width**2+N.height**2)/3),K%2===0&&(K+=1);else{const Z=Math.max(Math.abs((j?j.clientWidth:0)-F),F)*2+2,le=Math.max(Math.abs((j?j.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(TF,()=>{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(IF,A({className:Fe(Wi.root,o.root,s),ref:g},a,{children:v.jsx(kx,{component:null,exit:!0,children:l})}))});function $F(e){return ft("MuiButtonBase",e)}const AF=pt("MuiButtonBase",["root","disabled","focusVisible"]),DF=["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"],BF=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=mt({root:["root",t&&"disabled",n&&"focusVisible"]},$F,i);return n&&r&&(s.root+=` ${r}`),s},FF=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"},[`&.${AF.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Mo=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:E,onDragLeave:b,onFocus:w,onFocusVisible:y,onKeyDown:_,onKeyUp:k,onMouseDown:R,onMouseLeave:P,onMouseUp:L,onTouchEnd:$,onTouchMove:j,onTouchStart:N,tabIndex:F=0,TouchRippleProps:z,touchRippleRef:K,type:Z}=r,le=Le(r,DF),ce=C.useRef(null),H=C.useRef(null),V=un(H,K),{isFocusVisibleRef:ae,onFocus:Oe,onBlur:He,ref:je}=bv(),[_e,Ke]=C.useState(!1);c&&_e&&Ke(!1),C.useImperativeHandle(i,()=>({focusVisible:()=>{Ke(!0),ce.current.focus()}}),[]);const[Re,ct]=C.useState(!1);C.useEffect(()=>{ct(!0)},[]);const ht=Re&&!u&&!c;C.useEffect(()=>{_e&&f&&!u&&Re&&H.current.pulsate()},[u,f,_e,Re]);function Pe(Te,et,Rt=d){return qi(en=>(et&&et(en),!Rt&&H.current&&H.current[Te](en),!0))}const Tt=Pe("start",R),ut=Pe("stop",E),Ue=Pe("stop",b),Ze=Pe("stop",L),yt=Pe("stop",Te=>{_e&&Te.preventDefault(),P&&P(Te)}),ee=Pe("start",N),he=Pe("stop",$),Ce=Pe("stop",j),We=Pe("stop",Te=>{He(Te),ae.current===!1&&Ke(!1),h&&h(Te)},!1),W=qi(Te=>{ce.current||(ce.current=Te.currentTarget),Oe(Te),ae.current===!0&&(Ke(!0),y&&y(Te)),w&&w(Te)}),S=()=>{const Te=ce.current;return l&&l!=="button"&&!(Te.tagName==="A"&&Te.href)},O=C.useRef(!1),D=qi(Te=>{f&&!O.current&&_e&&H.current&&Te.key===" "&&(O.current=!0,H.current.stop(Te,()=>{H.current.start(Te)})),Te.target===Te.currentTarget&&S()&&Te.key===" "&&Te.preventDefault(),_&&_(Te),Te.target===Te.currentTarget&&S()&&Te.key==="Enter"&&!c&&(Te.preventDefault(),g&&g(Te))}),q=qi(Te=>{f&&Te.key===" "&&H.current&&_e&&!Te.defaultPrevented&&(O.current=!1,H.current.stop(Te,()=>{H.current.pulsate(Te)})),k&&k(Te),g&&Te.target===Te.currentTarget&&S()&&Te.key===" "&&!Te.defaultPrevented&&g(Te)});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 ze=un(n,je,ce),rt=A({},r,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:F,focusVisible:_e}),Xe=BF(rt);return v.jsxs(FF,A({as:X,className:Fe(Xe.root,a),ownerState:rt,onBlur:We,onClick:g,onContextMenu:ut,onFocus:W,onKeyDown:D,onKeyUp:q,onMouseDown:Tt,onMouseLeave:yt,onMouseUp:Ze,onDragLeave:Ue,onTouchEnd:he,onTouchMove:Ce,onTouchStart:ee,ref:ze,tabIndex:c?-1:F,type:Z},pe,le,{children:[s,ht?v.jsx(NF,A({ref:V,center:o},z)):null]}))});function zF(e){return ft("MuiIconButton",e)}const UF=pt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),WF=["edge","children","className","color","disabled","disableFocusRipple","size"],GF=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,zF,t)},HF=Ee(Mo,{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})`:$t(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})`:$t(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)},{[`&.${UF.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Ao=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=Le(r,WF),f=A({},r,{edge:i,color:a,disabled:l,disableFocusRipple:c,size:u}),m=GF(f);return v.jsx(HF,A({className:Fe(m.root,s),centerRipple:!0,focusRipple:!c,disabled:l,ref:n},d,{ownerState:f,children:o}))});var Ex={},o0={};function VF(e){return ft("MuiSvgIcon",e)}pt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const KF=["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 mt(i,VF,r)},YF=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]}}),l1=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=Le(r,KF),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(YF,A({as:a,className:Fe(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]}))});l1.muiName="SvgIcon";function Un(e,t){function n(r,i){return v.jsx(l1,A({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=l1.muiName,C.memo(C.forwardRef(n))}const QF={configure:e=>{mx.configure(e)}},XF=Object.freeze(Object.defineProperty({__proto__:null,capitalize:we,createChainedFunction:o1,createSvgIcon:Un,debounce:xv,deprecatedPropType:L3,isMuiElement:Jd,ownerDocument:Kn,ownerWindow:rs,requirePropFactory:I3,setRef:Dm,unstable_ClassNameGenerator:QF,unstable_useEnhancedEffect:ai,unstable_useId:gp,unsupportedProp:N3,useControlled:Cu,useEventCallback:qi,useForkRef:un,useIsFocusVisible:bv},Symbol.toStringTag,{value:"Module"})),JF=Hs(XF);var fk;function ls(){return fk||(fk=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=JF}(o0)),o0}var ZF=oo;Object.defineProperty(Ex,"__esModule",{value:!0});var SO=Ex.default=void 0,e6=ZF(ls()),t6=v;SO=Ex.default=(0,e6.default)((0,t6.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");function n6(e){const t=Kn(e);return t.body===e?rs(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Zd(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function pk(e){return parseInt(rs(e).getComputedStyle(e).paddingRight,10)||0}function r6(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 hk(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=o.indexOf(s)===-1,l=!r6(s);a&&l&&Zd(s,i)})}function s0(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function i6(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(n6(r)){const s=hO(Kn(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${pk(r)+s}px`;const a=Kn(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${pk(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Kn(r).body;else{const s=r.parentElement,a=rs(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 o6(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class s6{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&&Zd(t.modalRef,!1);const i=o6(n);hk(n,t.mount,t.modalRef,i,!0);const o=s0(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=s0(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=i6(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=s0(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&&Zd(t.modalRef,n),hk(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&&Zd(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const a6=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function l6(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 c6(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 u6(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||c6(e))}function d6(e){const t=[],n=[];return Array.from(e.querySelectorAll(a6)).forEach((r,i)=>{const o=l6(r);o===-1||!u6(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 f6(){return!0}function p6(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=d6,isEnabled:s=f6,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=Kn(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=Kn(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 L=[];if((y.activeElement===c.current||y.activeElement===u.current)&&(L=o(h.current)),L.length>0){var $,j;const N=!!(($=E.current)!=null&&$.shiftKey&&((j=E.current)==null?void 0:j.key)==="Tab"),F=L[0],z=L[L.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 h6(e){return typeof e=="function"?e():e}const Rx=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(ai(()=>{o||a(h6(i)||document.body)},[i,o]),ai(()=>{if(s&&!o)return Dm(n,s),()=>{Dm(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&&Ag.createPortal(r,s)})}),Px=e=>e.scrollTop;function $a(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 m6=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],g6={entering:{opacity:1},entered:{opacity:1}},_O=C.forwardRef(function(t,n){const r=Mi(),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=lo}=t,y=Le(t,m6),_=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),L=R((K,Z)=>{Px(K);const le=$a({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),j=R(g),N=R(K=>{const Z=$a({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:L,onEntered:$,onEntering:P,onExit:N,onExited:F,onExiting:j,addEndListener:z,timeout:b},y,{children:(K,Z)=>C.cloneElement(a,A({style:A({opacity:0,visibility:K==="exited"&&!c?"hidden":void 0},g6[K],E,a.props.style),ref:k},Z))}))});function v6(e){return ft("MuiBackdrop",e)}pt("MuiBackdrop",["root","invisible"]);const y6=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],b6=e=>{const{classes:t,invisible:n}=e;return mt({root:["root",n&&"invisible"]},v6,t)},w6=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"})),CO=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:E=_O,transitionDuration:b}=s,w=Le(s,y6),y=A({},s,{component:c,invisible:f}),_=b6(y),k=(r=h.root)!=null?r:d.root;return v.jsx(E,A({in:m,timeout:b},w,{children:v.jsx(w6,A({"aria-hidden":!0},k,{as:(i=(o=g.root)!=null?o:u.Root)!=null?i:c,className:Fe(_.root,l,k==null?void 0:k.className),ownerState:A({},y,k==null?void 0:k.ownerState),classes:_,ref:n,children:a}))}))});function x6(e){return typeof e=="function"?e():e}function S6(e){return e?e.props.hasOwnProperty("in"):!1}const _6=new s6;function C6(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=_6,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=S6(l);let y=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(y=!1);const _=()=>Kn(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=qi(()=>{const le=x6(t)||_().body;i.add(k(),le),h.current&&R()}),L=C.useCallback(()=>i.isTopModal(k()),[i]),$=qi(le=>{m.current=le,le&&(u&&L()?R():h.current&&Zd(h.current,y))}),j=C.useCallback(()=>{i.remove(k(),y)},[y,i]);C.useEffect(()=>()=>{j()},[j]),C.useEffect(()=>{u?P():(!w||!o)&&j()},[u,j,w,o,P]);const N=le=>ce=>{var H;(H=le.onKeyDown)==null||H.call(le,ce),!(ce.key!=="Escape"||ce.which===229||!L())&&(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=Bm(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&&j()};return{onEnter:o1(le,l==null?void 0:l.props.onEnter),onExited:o1(ce,l==null?void 0:l.props.onExited)}},rootRef:g,portalRef:$,isTopModal:L,exited:E,hasTransition:w}}function k6(e){return ft("MuiModal",e)}pt("MuiModal",["root","hidden","backdrop"]);const E6=["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"],R6=e=>{const{open:t,exited:n,classes:r}=e;return mt({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},k6,r)},P6=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"})),T6=Ee(CO,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),_v=C.forwardRef(function(t,n){var r,i,o,s,a,l;const c=gt({name:"MuiModal",props:t}),{BackdropComponent:u=T6,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:L=!1,hideBackdrop:$=!1,keepMounted:j=!1,onBackdropClick:N,open:F,slotProps:z,slots:K}=c,Z=Le(c,E6),le=A({},c,{closeAfterTransition:m,disableAutoFocus:y,disableEnforceFocus:_,disableEscapeKeyDown:k,disablePortal:R,disableRestoreFocus:P,disableScrollLock:L,hideBackdrop:$,keepMounted:j}),{getRootProps:ce,getBackdropProps:H,getTransitionProps:V,portalRef:ae,isTopModal:Oe,exited:He,hasTransition:je}=C6(A({},le,{rootRef:n})),_e=A({},le,{exited:He}),Ke=R6(_e),Re={};if(h.props.tabIndex===void 0&&(Re.tabIndex="-1"),je){const{onEnter:Ze,onExited:yt}=V();Re.onEnter=Ze,Re.onExited=yt}const ct=(r=(i=K==null?void 0:K.root)!=null?i:b.Root)!=null?r:P6,ht=(o=(s=K==null?void 0:K.backdrop)!=null?s:b.Backdrop)!=null?o:u,Pe=(a=z==null?void 0:z.root)!=null?a:w.root,Tt=(l=z==null?void 0:z.backdrop)!=null?l:w.backdrop,ut=Io({elementType:ct,externalSlotProps:Pe,externalForwardedProps:Z,getSlotProps:ce,additionalProps:{ref:n,as:E},ownerState:_e,className:Fe(f,Pe==null?void 0:Pe.className,Ke==null?void 0:Ke.root,!_e.open&&_e.exited&&(Ke==null?void 0:Ke.hidden))}),Ue=Io({elementType:ht,externalSlotProps:Tt,additionalProps:d,getSlotProps:Ze=>H(A({},Ze,{onClick:yt=>{N&&N(yt),Ze!=null&&Ze.onClick&&Ze.onClick(yt)}})),className:Fe(Tt==null?void 0:Tt.className,d==null?void 0:d.className,Ke==null?void 0:Ke.backdrop),ownerState:_e});return!j&&!F&&(!je||He)?null:v.jsx(Rx,{ref:ae,container:g,disablePortal:R,children:v.jsxs(ct,A({},ut,{children:[!$&&u?v.jsx(ht,A({},Ue)):null,v.jsx(p6,{disableEnforceFocus:_,disableAutoFocus:y,disableRestoreFocus:P,isEnabled:Oe,open:F,children:C.cloneElement(h,Re)})]}))})}),O6=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function j6(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=rs(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 L6(e){return typeof e=="function"?e():e}function fh(e,t,n){const r=L6(n),i=j6(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const I6=C.forwardRef(function(t,n){const r=Mi(),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=lo}=t,R=Le(t,O6),P=C.useRef(null),L=un(l.ref,P,n),$=H=>V=>{H&&(V===void 0?H(P.current):H(P.current,V))},j=$((H,V)=>{fh(u,H,c),Px(H),m&&m(H,V)}),N=$((H,V)=>{const ae=$a({timeout:_,style:y,easing:d},{mode:"enter"});H.style.webkitTransition=r.transitions.create("-webkit-transform",A({},ae)),H.style.transition=r.transitions.create("transform",A({},ae)),H.style.webkitTransform="none",H.style.transform="none",g&&g(H,V)}),F=$(h),z=$(w),K=$(H=>{const V=$a({timeout:_,style:y,easing:d},{mode:"exit"});H.style.webkitTransition=r.transitions.create("-webkit-transform",V),H.style.transition=r.transitions.create("transform",V),fh(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&&fh(u,P.current,c)},[u,c]);return C.useEffect(()=>{if(f||u==="down"||u==="right")return;const H=xv(()=>{P.current&&fh(u,P.current,c)}),V=rs(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:j,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:L,style:A({visibility:H==="exited"&&!f?"hidden":void 0},y,l.props.style)},V))}))});function M6(e){return ft("MuiDrawer",e)}pt("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const N6=["BackdropProps"],$6=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],kO=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},A6=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,M6,t)},D6=Ee(_v,{name:"MuiDrawer",slot:"Root",overridesResolver:kO})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),mk=Ee("div",{shouldForwardProp:cr,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:kO})({flex:"0 0 auto"}),B6=Ee(as,{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}`})),EO={left:"right",right:"left",top:"down",bottom:"up"};function F6(e){return["left","right"].indexOf(e)!==-1}function z6({direction:e},t){return e==="rtl"&&F6(t)?EO[t]:t}const U6=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiDrawer"}),i=Mi(),o=_x(),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=I6,transitionDuration:y=s,variant:_="temporary"}=r,k=Le(r.ModalProps,N6),R=Le(r,$6),P=C.useRef(!1);C.useEffect(()=>{P.current=!0},[]);const L=z6({direction:o?"rtl":"ltr"},a),j=A({},r,{anchor:a,elevation:d,open:g,variant:_},R),N=A6(j),F=v.jsx(B6,A({elevation:_==="temporary"?d:0,square:!0},E,{className:Fe(N.paper,E.className),ownerState:j,children:c}));if(_==="permanent")return v.jsx(mk,A({className:Fe(N.root,N.docked,u),ownerState:j,ref:n},R,{children:F}));const z=v.jsx(w,A({in:g,direction:EO[L],timeout:y,appear:P.current},b,{children:F}));return _==="persistent"?v.jsx(mk,A({className:Fe(N.root,N.docked,u),ownerState:j,ref:n},R,{children:z})):v.jsx(D6,A({BackdropProps:A({},l,m,{transitionDuration:y}),className:Fe(N.root,N.modal,u),open:g,ownerState:j,onClose:h,hideBackdrop:f,ref:n},R,k,{children:z}))}),Po=C.createContext({});function W6(e){return ft("MuiList",e)}pt("MuiList",["root","padding","dense","subheader"]);const G6=["children","className","component","dense","disablePadding","subheader"],H6=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return mt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},W6,t)},V6=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})),ef=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=Le(r,G6),d=C.useMemo(()=>({dense:a}),[a]),f=A({},r,{component:s,dense:a,disablePadding:l}),m=H6(f);return v.jsx(Po.Provider,{value:d,children:v.jsxs(V6,A({as:s,className:Fe(m.root,o),ref:n,ownerState:f},u,{children:[c,i]}))})});function K6(e){return ft("MuiListItem",e)}const Ic=pt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function q6(e){return ft("MuiListItemButton",e)}const Mc=pt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Y6=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Q6=(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]},X6=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"]},q6,n);return A({},n,c)},J6=Ee(Mo,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Q6})(({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"}},[`&.${Mc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:$t(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Mc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:$t(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Mc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:$t(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})`:$t(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Mc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Mc.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})),Z6=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=Le(r,Y6),g=C.useContext(Po),E=C.useMemo(()=>({dense:l||g.dense||!1,alignItems:i,disableGutters:c}),[i,g.dense,l,c]),b=C.useRef(null);ai(()=>{o&&b.current&&b.current.focus()},[o]);const w=A({},r,{alignItems:i,dense:E.dense,disableGutters:c,divider:u,selected:f}),y=X6(w),_=un(b,n);return v.jsx(Po.Provider,{value:E,children:v.jsx(J6,A({ref:_,href:h.href||h.to,component:(h.href||h.to)&&s==="div"?"button":s,focusVisibleClassName:Fe(y.focusVisible,d),ownerState:w,className:Fe(y.root,m)},h,{classes:y,children:a}))})});function ez(e){return ft("MuiListItemSecondaryAction",e)}pt("MuiListItemSecondaryAction",["root","disableGutters"]);const tz=["className"],nz=e=>{const{disableGutters:t,classes:n}=e;return mt({root:["root",t&&"disableGutters"]},ez,n)},rz=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})),RO=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Le(r,tz),s=C.useContext(Po),a=A({},r,{disableGutters:s.disableGutters}),l=nz(a);return v.jsx(rz,A({className:Fe(l.root,i),ownerState:a,ref:n},o))});RO.muiName="ListItemSecondaryAction";const iz=["className"],oz=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],sz=(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]},az=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"]},K6,r)},lz=Ee("div",{name:"MuiListItem",slot:"Root",overridesResolver:sz})(({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&&{[`& > .${Mc.root}`]:{paddingRight:48}},{[`&.${Ic.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ic.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:$t(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ic.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:$t(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ic.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"}},[`&.${Ic.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:$t(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})`:$t(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),cz=Ee("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),bo=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:E=!1,disablePadding:b=!1,divider:w=!1,focusVisibleClassName:y,secondaryAction:_,selected:k=!1,slotProps:R={},slots:P={}}=r,L=Le(r.ContainerProps,iz),$=Le(r,oz),j=C.useContext(Po),N=C.useMemo(()=>({dense:h||j.dense||!1,alignItems:i,disableGutters:E}),[i,j.dense,h,E]),F=C.useRef(null);ai(()=>{o&&F.current&&F.current.focus()},[o]);const z=C.Children.toArray(a),K=z.length&&Jd(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=az(Z),ce=un(F,n),H=P.root||u.Root||lz,V=R.root||d.root||{},ae=A({className:Fe(le.root,V.className,l),disabled:g},$);let Oe=c||"li";return s&&(ae.component=c||"div",ae.focusVisibleClassName=Fe(Ic.focusVisible,y),Oe=Mo),K?(Oe=!ae.component&&!c?"div":Oe,f==="li"&&(Oe==="li"?Oe="div":ae.component==="li"&&(ae.component="div")),v.jsx(Po.Provider,{value:N,children:v.jsxs(cz,A({as:f,className:Fe(le.container,m),ref:ce,ownerState:Z},L,{children:[v.jsx(H,A({},V,!ku(H)&&{as:Oe,ownerState:A({},Z,V.ownerState)},ae,{children:z})),z.pop()]}))})):v.jsx(Po.Provider,{value:N,children:v.jsxs(H,A({},V,{as:Oe,ref:ce},!ku(H)&&{ownerState:A({},Z,V.ownerState)},ae,{children:[z,_&&v.jsx(RO,{children:_})]}))})});function uz(e){return ft("MuiListItemText",e)}const zm=pt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),dz=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],fz=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"]},uz,t)},pz=Ee("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${zm.primary}`]:t.primary},{[`& .${zm.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})),bs=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=Le(r,dz),{dense:m}=C.useContext(Po);let h=l??i,g=u;const E=A({},r,{disableTypography:s,inset:a,primary:!!h,secondary:!!g,dense:m}),b=fz(E);return h!=null&&h.type!==Ct&&!s&&(h=v.jsx(Ct,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!==Ct&&!s&&(g=v.jsx(Ct,A({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},d,{children:g}))),v.jsxs(pz,A({className:Fe(b.root,o),ownerState:E,ref:n},f,{children:[h,g]}))});function hz(e){return ft("MuiDivider",e)}const gk=pt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),mz=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],gz=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"]},hz,r)},vz=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)`:$t(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%"}})),yz=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)`})),To=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=Le(r,mz),g=A({},r,{absolute:i,component:a,flexItem:l,light:c,orientation:u,role:d,textAlign:f,variant:m}),E=gz(g);return v.jsx(vz,A({as:a,className:Fe(E.root,s),role:d,ref:n,ownerState:g},h,{children:o?v.jsx(yz,{className:E.wrapper,ownerState:g,children:o}):null}))});To.muiSkipListHighlight=!0;const bz=["theme"];function wz(e){let{theme:t}=e,n=Le(e,bz);const r=t[_u];return v.jsx(G3,A({},n,{themeId:r?_u:void 0,theme:r||t}))}var on={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Tx=Symbol.for("react.element"),Ox=Symbol.for("react.portal"),Cv=Symbol.for("react.fragment"),kv=Symbol.for("react.strict_mode"),Ev=Symbol.for("react.profiler"),Rv=Symbol.for("react.provider"),Pv=Symbol.for("react.context"),xz=Symbol.for("react.server_context"),Tv=Symbol.for("react.forward_ref"),Ov=Symbol.for("react.suspense"),jv=Symbol.for("react.suspense_list"),Lv=Symbol.for("react.memo"),Iv=Symbol.for("react.lazy"),Sz=Symbol.for("react.offscreen"),PO;PO=Symbol.for("react.module.reference");function co(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Tx:switch(e=e.type,e){case Cv:case Ev:case kv:case Ov:case jv:return e;default:switch(e=e&&e.$$typeof,e){case xz:case Pv:case Tv:case Iv:case Lv:case Rv:return e;default:return t}}case Ox:return t}}}on.ContextConsumer=Pv;on.ContextProvider=Rv;on.Element=Tx;on.ForwardRef=Tv;on.Fragment=Cv;on.Lazy=Iv;on.Memo=Lv;on.Portal=Ox;on.Profiler=Ev;on.StrictMode=kv;on.Suspense=Ov;on.SuspenseList=jv;on.isAsyncMode=function(){return!1};on.isConcurrentMode=function(){return!1};on.isContextConsumer=function(e){return co(e)===Pv};on.isContextProvider=function(e){return co(e)===Rv};on.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Tx};on.isForwardRef=function(e){return co(e)===Tv};on.isFragment=function(e){return co(e)===Cv};on.isLazy=function(e){return co(e)===Iv};on.isMemo=function(e){return co(e)===Lv};on.isPortal=function(e){return co(e)===Ox};on.isProfiler=function(e){return co(e)===Ev};on.isStrictMode=function(e){return co(e)===kv};on.isSuspense=function(e){return co(e)===Ov};on.isSuspenseList=function(e){return co(e)===jv};on.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Cv||e===Ev||e===kv||e===Ov||e===jv||e===Sz||typeof e=="object"&&e!==null&&(e.$$typeof===Iv||e.$$typeof===Lv||e.$$typeof===Rv||e.$$typeof===Pv||e.$$typeof===Tv||e.$$typeof===PO||e.getModuleId!==void 0)};on.typeOf=co;function _z(e){return ft("MuiCollapse",e)}pt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Cz=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],kz=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return mt(r,_z,n)},Ez=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"})),Rz=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%"})),Pz=Ee("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>A({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),TO=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:E,orientation:b="vertical",style:w,timeout:y=cO.standard,TransitionComponent:_=lo}=r,k=Le(r,Cz),R=A({},r,{orientation:b,collapsedSize:a}),P=kz(R),L=Mi(),$=ba(),j=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=Re=>ct=>{if(Re){const ht=Z.current;ct===void 0?Re(ht):Re(ht,ct)}},H=()=>j.current?j.current[z?"clientWidth":"clientHeight"]:0,V=ce((Re,ct)=>{j.current&&z&&(j.current.style.position="absolute"),Re.style[K]=F,d&&d(Re,ct)}),ae=ce((Re,ct)=>{const ht=H();j.current&&z&&(j.current.style.position="");const{duration:Pe,easing:Tt}=$a({style:w,timeout:y,easing:c},{mode:"enter"});if(y==="auto"){const ut=L.transitions.getAutoHeightDuration(ht);Re.style.transitionDuration=`${ut}ms`,N.current=ut}else Re.style.transitionDuration=typeof Pe=="string"?Pe:`${Pe}ms`;Re.style[K]=`${ht}px`,Re.style.transitionTimingFunction=Tt,m&&m(Re,ct)}),Oe=ce((Re,ct)=>{Re.style[K]="auto",f&&f(Re,ct)}),He=ce(Re=>{Re.style[K]=`${H()}px`,h&&h(Re)}),je=ce(g),_e=ce(Re=>{const ct=H(),{duration:ht,easing:Pe}=$a({style:w,timeout:y,easing:c},{mode:"exit"});if(y==="auto"){const Tt=L.transitions.getAutoHeightDuration(ct);Re.style.transitionDuration=`${Tt}ms`,N.current=Tt}else Re.style.transitionDuration=typeof ht=="string"?ht:`${ht}ms`;Re.style[K]=F,Re.style.transitionTimingFunction=Pe,E&&E(Re)}),Ke=Re=>{y==="auto"&&$.start(N.current||0,Re),i&&i(Z.current,Re)};return v.jsx(_,A({in:u,onEnter:V,onEntered:Oe,onEntering:ae,onExit:He,onExited:je,onExiting:_e,addEndListener:Ke,nodeRef:Z,timeout:y==="auto"?null:y},k,{children:(Re,ct)=>v.jsx(Ez,A({as:l,className:Fe(P.root,s,{entered:P.entered,exited:!u&&F==="0px"&&P.hidden}[Re]),style:A({[z?"minWidth":"minHeight"]:F},w),ref:le},ct,{ownerState:A({},R,{state:Re}),children:v.jsx(Rz,{ownerState:A({},R,{state:Re}),className:P.wrapper,ref:j,children:v.jsx(Pz,{ownerState:A({},R,{state:Re}),className:P.wrapperInner,children:o})})}))}))});TO.muiSupportAuto=!0;const OO=C.createContext({}),Tz=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],Oz=["component","slots","slotProps"],jz=["component"];function c1(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:s,internalForwardedProps:a}=t,l=Le(t,Tz),{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0}}=o,f=Le(o,Oz),m=u[e]||r,h=vO(d[e],i),g=gO(A({className:n},l,{externalForwardedProps:e==="root"?f:void 0,externalSlotProps:h})),{props:{component:E},internalRef:b}=g,w=Le(g.props,jz),y=un(b,h==null?void 0:h.ref,t.ref),_=s?s(w):{},k=A({},i,_),R=e==="root"?E||c:E,P=Xc(m,A({},e==="root"&&!c&&!u[e]&&a,e!=="root"&&!u[e]&&a,w,R&&{as:R},{ref:y}),k);return Object.keys(_).forEach(L=>{delete P[L]}),[m,P]}function Lz(e){return ft("MuiAccordion",e)}const ph=pt("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),Iz=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],Mz=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"]},Lz,t)},Nz=Ee(as,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ph.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"}},[`&.${ph.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${ph.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:{[`&.${ph.expanded}`]:{margin:"16px 0"}}}]})),$z=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,E=Le(r,Iz),[b,w]=Cu({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}),L=Mz(P),$=A({transition:h},f),j=A({transition:g},m),[N,F]=c1("transition",{elementType:TO,externalForwardedProps:{slots:$,slotProps:j},ownerState:P});return v.jsxs(Nz,A({className:Fe(L.root,o),ref:n,ownerState:P,square:d},E,{children:[v.jsx(OO.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:L.region,children:k})}))]}))});function Az(e){return ft("MuiAccordionDetails",e)}pt("MuiAccordionDetails",["root"]);const Dz=["className"],Bz=e=>{const{classes:t}=e;return mt({root:["root"]},Az,t)},Fz=Ee("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(1,2,2)})),zz=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiAccordionDetails"}),{className:i}=r,o=Le(r,Dz),s=r,a=Bz(s);return v.jsx(Fz,A({className:Fe(a.root,i),ref:n,ownerState:s},o))});function Uz(e){return ft("MuiAccordionSummary",e)}const Jc=pt("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),Wz=["children","className","expandIcon","focusVisibleClassName","onClick"],Gz=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"]},Uz,t)},Hz=Ee(Mo,{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),[`&.${Jc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Jc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${Jc.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${Jc.expanded}`]:{minHeight:64}}}]}}),Vz=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}),[`&.${Jc.expanded}`]:{margin:"20px 0"}}}]})),Kz=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}),[`&.${Jc.expanded}`]:{transform:"rotate(180deg)"}})),qz=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiAccordionSummary"}),{children:i,className:o,expandIcon:s,focusVisibleClassName:a,onClick:l}=r,c=Le(r,Wz),{disabled:u=!1,disableGutters:d,expanded:f,toggle:m}=C.useContext(OO),h=b=>{m&&m(b),l&&l(b)},g=A({},r,{expanded:f,disabled:u,disableGutters:d}),E=Gz(g);return v.jsxs(Hz,A({focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":f,className:Fe(E.root,o),focusVisibleClassName:Fe(E.focusVisible,a),onClick:h,ref:n,ownerState:g},c,{children:[v.jsx(Vz,{className:E.content,ownerState:g,children:i}),s&&v.jsx(Kz,{className:E.expandIconWrapper,ownerState:g,children:s})]}))});function Yz(e){return ft("MuiAlert",e)}const vk=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"]),Qz=Un(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"),Xz=Un(v.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Jz=Un(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"),Zz=Un(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"),e8=Un(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"),t8=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],n8=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,Yz,i)},r8=Ee(as,{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"?Nm:$m,n=e.palette.mode==="light"?$m:Nm;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),[`& .${vk.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}`,[`& .${vk.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)})}))]})}),i8=Ee("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),o8=Ee("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),yk=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}),bk={success:v.jsx(Qz,{fontSize:"inherit"}),warning:v.jsx(Xz,{fontSize:"inherit"}),error:v.jsx(Jz,{fontSize:"inherit"}),info:v.jsx(Zz,{fontSize:"inherit"})},s8=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=bk,onClose:m,role:h="alert",severity:g="success",slotProps:E={},slots:b={},variant:w="standard"}=r,y=Le(r,t8),_=A({},r,{color:l,severity:g,variant:w,colorSeverity:l||g}),k=n8(_),R={slots:A({closeButton:c.CloseButton,closeIcon:c.CloseIcon},b),slotProps:A({},u,E)},[P,L]=c1("closeButton",{elementType:Ao,externalForwardedProps:R,ownerState:_}),[$,j]=c1("closeIcon",{elementType:e8,externalForwardedProps:R,ownerState:_});return v.jsxs(r8,A({role:h,elevation:0,ownerState:_,className:Fe(k.root,s),ref:n},y,{children:[d!==!1?v.jsx(i8,{ownerState:_,className:k.icon,children:d||f[g]||bk[g]}):null,v.jsx(o8,{ownerState:_,className:k.message,children:o}),i!=null?v.jsx(yk,{ownerState:_,className:k.action,children:i}):null,i==null&&m?v.jsx(yk,{ownerState:_,className:k.action,children:v.jsx(P,A({size:"small","aria-label":a,title:a,color:"inherit",onClick:m},L,{children:v.jsx($,A({fontSize:"small"},j))}))}):null]}))});var jx={};Object.defineProperty(jx,"__esModule",{value:!0});var jO=jx.default=void 0,a8=c8(C),l8=GT;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 c8(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 u8(e){return Object.keys(e).length===0}function d8(e=null){const t=a8.useContext(l8.ThemeContext);return!t||u8(t)?e:t}jO=jx.default=d8;var ii="top",to="bottom",no="right",oi="left",Lx="auto",yp=[ii,to,no,oi],Eu="start",Uf="end",f8="clippingParents",IO="viewport",xd="popper",p8="reference",wk=yp.reduce(function(e,t){return e.concat([t+"-"+Eu,t+"-"+Uf])},[]),MO=[].concat(yp,[Lx]).reduce(function(e,t){return e.concat([t,t+"-"+Eu,t+"-"+Uf])},[]),h8="beforeRead",m8="read",g8="afterRead",v8="beforeMain",y8="main",b8="afterMain",w8="beforeWrite",x8="write",S8="afterWrite",_8=[h8,m8,g8,v8,y8,b8,w8,x8,S8];function is(e){return e?(e.nodeName||"").toLowerCase():null}function Pi(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Kl(e){var t=Pi(e).Element;return e instanceof t||e instanceof Element}function Qi(e){var t=Pi(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Ix(e){if(typeof ShadowRoot>"u")return!1;var t=Pi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function C8(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];!Qi(o)||!is(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 k8(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},{});!Qi(i)||!is(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const E8={name:"applyStyles",enabled:!0,phase:"write",fn:C8,effect:k8,requires:["computeStyles"]};function ns(e){return e.split("-")[0]}var Ll=Math.max,Um=Math.min,Ru=Math.round;function u1(){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 NO(){return!/^((?!chrome|android).)*safari/i.test(u1())}function Pu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Qi(e)&&(i=e.offsetWidth>0&&Ru(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Ru(r.height)/e.offsetHeight||1);var s=Kl(e)?Pi(e):window,a=s.visualViewport,l=!NO()&&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 Mx(e){var t=Pu(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 $O(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ix(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ds(e){return Pi(e).getComputedStyle(e)}function R8(e){return["table","td","th"].indexOf(is(e))>=0}function Ka(e){return((Kl(e)?e.ownerDocument:e.document)||window.document).documentElement}function Mv(e){return is(e)==="html"?e:e.assignedSlot||e.parentNode||(Ix(e)?e.host:null)||Ka(e)}function xk(e){return!Qi(e)||Ds(e).position==="fixed"?null:e.offsetParent}function P8(e){var t=/firefox/i.test(u1()),n=/Trident/i.test(u1());if(n&&Qi(e)){var r=Ds(e);if(r.position==="fixed")return null}var i=Mv(e);for(Ix(i)&&(i=i.host);Qi(i)&&["html","body"].indexOf(is(i))<0;){var o=Ds(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 bp(e){for(var t=Pi(e),n=xk(e);n&&R8(n)&&Ds(n).position==="static";)n=xk(n);return n&&(is(n)==="html"||is(n)==="body"&&Ds(n).position==="static")?t:n||P8(e)||t}function Nx(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function tf(e,t,n){return Ll(e,Um(t,n))}function T8(e,t,n){var r=tf(e,t,n);return r>n?n:r}function AO(){return{top:0,right:0,bottom:0,left:0}}function DO(e){return Object.assign({},AO(),e)}function BO(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var O8=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,DO(typeof t!="number"?t:BO(t,yp))};function j8(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=ns(n.placement),l=Nx(a),c=[oi,no].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var d=O8(i.padding,n),f=Mx(o),m=l==="y"?ii:oi,h=l==="y"?to:no,g=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],E=s[l]-n.rects.reference[l],b=bp(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=tf(_,R,k),L=l;n.modifiersData[r]=(t={},t[L]=P,t.centerOffset=P-R,t)}}function L8(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)||$O(t.elements.popper,i)&&(t.elements.arrow=i))}const I8={name:"arrow",enabled:!0,phase:"main",fn:j8,effect:L8,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Tu(e){return e.split("-")[1]}var M8={top:"auto",right:"auto",bottom:"auto",left:"auto"};function N8(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Ru(n*i)/i||0,y:Ru(r*i)/i||0}}function Sk(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=oi,_=ii,k=window;if(c){var R=bp(n),P="clientHeight",L="clientWidth";if(R===Pi(n)&&(R=Ka(n),Ds(R).position!=="static"&&a==="absolute"&&(P="scrollHeight",L="scrollWidth")),R=R,i===ii||(i===oi||i===no)&&o===Uf){_=to;var $=d&&R===k&&k.visualViewport?k.visualViewport.height:R[P];g-=$-r.height,g*=l?1:-1}if(i===oi||(i===ii||i===to)&&o===Uf){y=no;var j=d&&R===k&&k.visualViewport?k.visualViewport.width:R[L];m-=j-r.width,m*=l?1:-1}}var N=Object.assign({position:a},c&&M8),F=u===!0?N8({x:m,y:g},Pi(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 $8(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:ns(t.placement),variation:Tu(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,Sk(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,Sk(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 A8={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:$8,data:{}};var hh={passive:!0};function D8(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=Pi(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,hh)}),a&&l.addEventListener("resize",n.update,hh),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,hh)}),a&&l.removeEventListener("resize",n.update,hh)}}const B8={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:D8,data:{}};var F8={left:"right",right:"left",bottom:"top",top:"bottom"};function Qh(e){return e.replace(/left|right|bottom|top/g,function(t){return F8[t]})}var z8={start:"end",end:"start"};function _k(e){return e.replace(/start|end/g,function(t){return z8[t]})}function $x(e){var t=Pi(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ax(e){return Pu(Ka(e)).left+$x(e).scrollLeft}function U8(e,t){var n=Pi(e),r=Ka(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=NO();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Ax(e),y:l}}function W8(e){var t,n=Ka(e),r=$x(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ll(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Ll(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Ax(e),l=-r.scrollTop;return Ds(i||n).direction==="rtl"&&(a+=Ll(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Dx(e){var t=Ds(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function FO(e){return["html","body","#document"].indexOf(is(e))>=0?e.ownerDocument.body:Qi(e)&&Dx(e)?e:FO(Mv(e))}function nf(e,t){var n;t===void 0&&(t=[]);var r=FO(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Pi(r),s=i?[o].concat(o.visualViewport||[],Dx(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(nf(Mv(s)))}function d1(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function G8(e,t){var n=Pu(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 Ck(e,t,n){return t===IO?d1(U8(e,n)):Kl(t)?G8(t,n):d1(W8(Ka(e)))}function H8(e){var t=nf(Mv(e)),n=["absolute","fixed"].indexOf(Ds(e).position)>=0,r=n&&Qi(e)?bp(e):e;return Kl(r)?t.filter(function(i){return Kl(i)&&$O(i,r)&&is(i)!=="body"}):[]}function V8(e,t,n,r){var i=t==="clippingParents"?H8(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var u=Ck(e,c,r);return l.top=Ll(u.top,l.top),l.right=Um(u.right,l.right),l.bottom=Um(u.bottom,l.bottom),l.left=Ll(u.left,l.left),l},Ck(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 zO(e){var t=e.reference,n=e.element,r=e.placement,i=r?ns(r):null,o=r?Tu(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case ii:l={x:s,y:t.y-n.height};break;case to:l={x:s,y:t.y+t.height};break;case no:l={x:t.x+t.width,y:a};break;case oi:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?Nx(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Eu:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Uf:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Wf(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?f8:a,c=n.rootBoundary,u=c===void 0?IO:c,d=n.elementContext,f=d===void 0?xd:d,m=n.altBoundary,h=m===void 0?!1:m,g=n.padding,E=g===void 0?0:g,b=DO(typeof E!="number"?E:BO(E,yp)),w=f===xd?p8:xd,y=e.rects.popper,_=e.elements[h?w:f],k=V8(Kl(_)?_:_.contextElement||Ka(e.elements.popper),l,u,s),R=Pu(e.elements.reference),P=zO({reference:R,element:y,strategy:"absolute",placement:i}),L=d1(Object.assign({},y,P)),$=f===xd?L:R,j={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===xd&&N){var F=N[i];Object.keys(j).forEach(function(z){var K=[no,to].indexOf(z)>=0?1:-1,Z=[ii,to].indexOf(z)>=0?"y":"x";j[z]+=F[Z]*K})}return j}function K8(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?MO:l,u=Tu(r),d=u?a?wk:wk.filter(function(h){return Tu(h)===u}):yp,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]=Wf(e,{placement:g,boundary:i,rootBoundary:o,padding:s})[ns(g)],h},{});return Object.keys(m).sort(function(h,g){return m[h]-m[g]})}function q8(e){if(ns(e)===Lx)return[];var t=Qh(e);return[_k(e),t,_k(t)]}function Y8(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=ns(E),w=b===E,y=l||(w||!h?[Qh(E)]:q8(E)),_=[E].concat(y).reduce(function(_e,Ke){return _e.concat(ns(Ke)===Lx?K8(t,{placement:Ke,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:g}):Ke)},[]),k=t.rects.reference,R=t.rects.popper,P=new Map,L=!0,$=_[0],j=0;j<_.length;j++){var N=_[j],F=ns(N),z=Tu(N)===Eu,K=[ii,to].indexOf(F)>=0,Z=K?"width":"height",le=Wf(t,{placement:N,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),ce=K?z?no:oi:z?to:ii;k[Z]>R[Z]&&(ce=Qh(ce));var H=Qh(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,L=!1;break}P.set(N,V)}if(L)for(var ae=h?3:1,Oe=function(Ke){var Re=_.find(function(ct){var ht=P.get(ct);if(ht)return ht.slice(0,Ke).every(function(Pe){return Pe})});if(Re)return $=Re,"break"},He=ae;He>0;He--){var je=Oe(He);if(je==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Q8={name:"flip",enabled:!0,phase:"main",fn:Y8,requiresIfExists:["offset"],data:{_skip:!1}};function kk(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 Ek(e){return[ii,no,to,oi].some(function(t){return e[t]>=0})}function X8(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Wf(t,{elementContext:"reference"}),a=Wf(t,{altBoundary:!0}),l=kk(s,r),c=kk(a,i,o),u=Ek(l),d=Ek(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 J8={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:X8};function Z8(e,t,n){var r=ns(e),i=[oi,ii].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,[oi,no].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function eU(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=MO.reduce(function(u,d){return u[d]=Z8(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 tU={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:eU};function nU(e){var t=e.state,n=e.name;t.modifiersData[n]=zO({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const rU={name:"popperOffsets",enabled:!0,phase:"read",fn:nU,data:{}};function iU(e){return e==="x"?"y":"x"}function oU(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=Wf(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=ns(t.placement),w=Tu(t.placement),y=!w,_=Nx(b),k=iU(_),R=t.modifiersData.popperOffsets,P=t.rects.reference,L=t.rects.popper,$=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,j=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"?ii:oi,Z=_==="y"?to:no,le=_==="y"?"height":"width",ce=R[_],H=ce+E[K],V=ce-E[Z],ae=m?-L[le]/2:0,Oe=w===Eu?P[le]:L[le],He=w===Eu?-L[le]:-P[le],je=t.elements.arrow,_e=m&&je?Mx(je):{width:0,height:0},Ke=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:AO(),Re=Ke[K],ct=Ke[Z],ht=tf(0,P[le],_e[le]),Pe=y?P[le]/2-ae-ht-Re-j.mainAxis:Oe-ht-Re-j.mainAxis,Tt=y?-P[le]/2+ae+ht+ct+j.mainAxis:He+ht+ct+j.mainAxis,ut=t.elements.arrow&&bp(t.elements.arrow),Ue=ut?_==="y"?ut.clientTop||0:ut.clientLeft||0:0,Ze=(z=N==null?void 0:N[_])!=null?z:0,yt=ce+Pe-Ze-Ue,ee=ce+Tt-Ze,he=tf(m?Um(H,yt):H,ce,m?Ll(V,ee):V);R[_]=he,F[_]=he-ce}if(a){var Ce,We=_==="x"?ii:oi,W=_==="x"?to:no,S=R[k],O=k==="y"?"height":"width",D=S+E[We],q=S-E[W],X=[ii,oi].indexOf(b)!==-1,pe=(Ce=N==null?void 0:N[k])!=null?Ce:0,ze=X?D:S-P[O]-L[O]-pe+j.altAxis,rt=X?S+P[O]+L[O]-pe-j.altAxis:q,Xe=m&&X?T8(ze,S,rt):tf(m?ze:D,S,m?rt:q);R[k]=Xe,F[k]=Xe-S}t.modifiersData[r]=F}}const sU={name:"preventOverflow",enabled:!0,phase:"main",fn:oU,requiresIfExists:["offset"]};function aU(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lU(e){return e===Pi(e)||!Qi(e)?$x(e):aU(e)}function cU(e){var t=e.getBoundingClientRect(),n=Ru(t.width)/e.offsetWidth||1,r=Ru(t.height)/e.offsetHeight||1;return n!==1||r!==1}function uU(e,t,n){n===void 0&&(n=!1);var r=Qi(t),i=Qi(t)&&cU(t),o=Ka(t),s=Pu(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((is(t)!=="body"||Dx(o))&&(a=lU(t)),Qi(t)?(l=Pu(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Ax(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function dU(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 fU(e){var t=dU(e);return _8.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function pU(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function hU(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 Rk={placement:"bottom",modifiers:[],strategy:"absolute"};function Pk(){for(var e=arguments.length,t=new Array(e),n=0;n{const{classes:t}=e;return mt({root:["root"]},yU,t)},CU={},kU=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=Le(t,bU),b=C.useRef(null),w=un(b,n),y=C.useRef(null),_=un(y,f),k=C.useRef(_);ai(()=>{k.current=_},[_]),C.useImperativeHandle(f,()=>y.current,[]);const R=xU(u,s),[P,L]=C.useState(R),[$,j]=C.useState(f1(i));C.useEffect(()=>{y.current&&y.current.forceUpdate()}),C.useEffect(()=>{i&&j(f1(i))},[i]),ai(()=>{if(!$||!c)return;const Z=H=>{L(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=vU($,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=_U(t),z=(r=h.root)!=null?r:"div",K=Io({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}))}),EU=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=CU,popperRef:m,style:h,transition:g=!1,slotProps:E={},slots:b={}}=t,w=Le(t,wU),[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 j=f1(r);P=j&&SU(j)?Kn(j).body:Kn(null).body}const L=!u&&l&&(!g||y)?"none":void 0,$=g?{in:u,onEnter:k,onExited:R}:void 0;return v.jsx(Rx,{disablePortal:a,container:P,children:v.jsx(kU,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:L},h),TransitionProps:$,children:i}))})}),RU=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],PU=Ee(EU,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),UO=C.forwardRef(function(t,n){var r;const i=jO(),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:E,popperRef:b,transition:w,slots:y,slotProps:_}=o,k=Le(o,RU),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(PU,A({as:a,direction:i==null?void 0:i.direction,slots:{root:R},slotProps:_??c},P,{ref:n}))});function TU(e){return ft("MuiListSubheader",e)}pt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const OU=["className","color","component","disableGutters","disableSticky","inset"],jU=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,TU,t)},LU=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})),WO=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=Le(r,OU),d=A({},r,{color:o,component:s,disableGutters:a,disableSticky:l,inset:c}),f=jU(d);return v.jsx(LU,A({as:s,className:Fe(f.root,i),ref:n,ownerState:d},u))});WO.muiSkipListHighlight=!0;const IU=Un(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 MU(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"]),NU=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],$U=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,MU,t)},AU=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)`:$t(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)`:$t(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)`:$t(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}))`:$t(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}))`:$t(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}))`:$t(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)`:$t(e.palette[t.color].main,.7)}`,[`&.${Wt.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:$t(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})`:$t(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Wt.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:$t(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),DU=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 Tk(e){return e.key==="Backspace"||e.key==="Delete"}const Bx=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:E,size:b="medium",variant:w="filled",tabIndex:y,skipFocusWhenDisabled:_=!1}=r,k=Le(r,NU),R=C.useRef(null),P=un(R,n),L=V=>{V.stopPropagation(),h&&h(V)},$=V=>{V.currentTarget===V.target&&Tk(V)&&V.preventDefault(),g&&g(V)},j=V=>{V.currentTarget===V.target&&(h&&Tk(V)?h(V):V.key==="Escape"&&R.current&&R.current.blur()),E&&E(V)},N=s!==!1&&m?!0:s,F=N||h?Mo: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=$U(z),Z=F===Mo?A({component:l||"div",focusVisibleClassName:K.focusVisible},h&&{disableRipple:!0}):{};let le=null;h&&(le=c&&C.isValidElement(c)?C.cloneElement(c,{className:Fe(c.props.className,K.deleteIcon),onClick:L}):v.jsx(IU,{className:Fe(K.deleteIcon),onClick:L}));let ce=null;i&&C.isValidElement(i)&&(ce=C.cloneElement(i,{className:Fe(K.avatar,i.props.className)}));let H=null;return d&&C.isValidElement(d)&&(H=C.cloneElement(d,{className:Fe(K.icon,d.props.className)})),v.jsxs(AU,A({as:F,className:Fe(K.root,o),disabled:N&&u?!0:void 0,onClick:m,onKeyDown:$,onKeyUp:j,ref:P,tabIndex:_&&u?-1:y,ownerState:z},Z,k,{children:[ce||H,v.jsx(DU,{className:Fe(K.label),ownerState:z,children:f}),le]}))}),BU=["onChange","maxRows","minRows","style","value"];function mh(e){return parseInt(e,10)||0}const FU={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function zU(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const UU=C.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=t,l=Le(t,BU),{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=rs(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,R=mh(y.paddingBottom)+mh(y.paddingTop),P=mh(y.borderBottomWidth)+mh(y.borderTopWidth),L=_.scrollHeight;_.value="x";const $=_.scrollHeight;let j=L;o&&(j=Math.max(Number(o)*$,j)),i&&(j=Math.min(Number(i)*$,j)),j=Math.max(j,$);const N=j+(k==="border-box"?R+P:0),F=Math.abs(j-L)<=1;return{outerHeightStyle:N,overflowing:F}},[i,o,t.placeholder]),g=C.useCallback(()=>{const b=h();if(zU(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]);ai(()=>{const b=()=>{g()};let w;const y=xv(b),_=u.current,k=rs(_);k.addEventListener("resize",y);let R;return typeof ResizeObserver<"u"&&(R=new ResizeObserver(b),R.observe(_)),()=>{y.clear(),cancelAnimationFrame(w),k.removeEventListener("resize",y),R&&R.disconnect()}},[h,g]),ai(()=>{g()});const E=b=>{c||g(),r&&r(b)};return v.jsxs(C.Fragment,{children:[v.jsx("textarea",A({value:a,onChange:E,ref:d,rows:o,style:s},l)),v.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:m,tabIndex:-1,style:A({},FU.shadow,s,{paddingTop:0,paddingBottom:0})})]})});function rc({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 Fx=C.createContext(void 0);function qa(){return C.useContext(Fx)}function GO(e){return v.jsx(g3,A({},e,{defaultTheme:wx,themeId:_u}))}function Ok(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Wm(e,t=!1){return e&&(Ok(e.value)&&e.value!==""||t&&Ok(e.defaultValue)&&e.defaultValue!=="")}function WU(e){return e.startAdornment}function GU(e){return ft("MuiInputBase",e)}const Ou=pt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),HU=["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"],Nv=(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]},$v=(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]},VU=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,GU,t)},Av=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Nv})(({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",[`&.${Ou.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%"})),Dv=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:$v})(({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] + .${Ou.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},[`&.${Ou.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"})}),KU=v.jsx(GO,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),qU=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:E,inputComponent:b="input",inputProps:w={},inputRef:y,maxRows:_,minRows:k,multiline:R=!1,name:P,onBlur:L,onChange:$,onClick:j,onFocus:N,onKeyDown:F,onKeyUp:z,placeholder:K,readOnly:Z,renderSuffix:le,rows:ce,slotProps:H={},slots:V={},startAdornment:ae,type:Oe="text",value:He}=i,je=Le(i,HU),_e=w.value!=null?w.value:He,{current:Ke}=C.useRef(_e!=null),Re=C.useRef(),ct=C.useCallback(Xe=>{},[]),ht=un(Re,y,w.ref,ct),[Pe,Tt]=C.useState(!1),ut=qa(),Ue=rc({props:i,muiFormControl:ut,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ue.focused=ut?ut.focused:Pe,C.useEffect(()=>{!ut&&f&&Pe&&(Tt(!1),L&&L())},[ut,f,Pe,L]);const Ze=ut&&ut.onFilled,yt=ut&&ut.onEmpty,ee=C.useCallback(Xe=>{Wm(Xe)?Ze&&Ze():yt&&yt()},[Ze,yt]);ai(()=>{Ke&&ee({value:_e})},[_e,ee,Ke]);const he=Xe=>{if(Ue.disabled){Xe.stopPropagation();return}N&&N(Xe),w.onFocus&&w.onFocus(Xe),ut&&ut.onFocus?ut.onFocus(Xe):Tt(!0)},Ce=Xe=>{L&&L(Xe),w.onBlur&&w.onBlur(Xe),ut&&ut.onBlur?ut.onBlur(Xe):Tt(!1)},We=(Xe,...Te)=>{if(!Ke){const et=Xe.target||Re.current;if(et==null)throw new Error(Hl(1));ee({value:et.value})}w.onChange&&w.onChange(Xe,...Te),$&&$(Xe,...Te)};C.useEffect(()=>{ee(Re.current)},[]);const W=Xe=>{Re.current&&Xe.currentTarget===Xe.target&&Re.current.focus(),j&&j(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=UU);const D=Xe=>{ee(Xe.animationName==="mui-auto-fill-cancel"?Re.current:{value:"x"})};C.useEffect(()=>{ut&&ut.setAdornedStart(!!ae)},[ut,ae]);const q=A({},i,{color:Ue.color||"primary",disabled:Ue.disabled,endAdornment:h,error:Ue.error,focused:Ue.focused,formControl:ut,fullWidth:g,hiddenLabel:Ue.hiddenLabel,multiline:R,size:Ue.size,startAdornment:ae,type:Oe}),X=VU(q),pe=V.root||c.Root||Av,ze=H.root||u.root||{},rt=V.input||c.Input||Dv;return O=A({},O,(r=H.input)!=null?r:u.input),v.jsxs(C.Fragment,{children:[!m&&KU,v.jsxs(pe,A({},ze,!ku(pe)&&{ownerState:A({},q,ze.ownerState)},{ref:n,onClick:W},je,{className:Fe(X.root,ze.className,l,Z&&"MuiInputBase-readOnly"),children:[ae,v.jsx(Fx.Provider,{value:null,children:v.jsx(rt,A({ownerState:q,"aria-invalid":Ue.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:d,disabled:Ue.disabled,id:E,onAnimationStart:D,name:P,placeholder:K,readOnly:Z,required:Ue.required,rows:ce,value:_e,onKeyDown:F,onKeyUp:z,type:Oe},O,!ku(rt)&&{as:S,ownerState:A({},q,O.ownerState)},{ref:ht,className:Fe(X.input,O.className,Z&&"MuiInputBase-readOnly"),onBlur:Ce,onChange:We,onFocus:he}))}),h,le?le(A({},Ue,{startAdornment:ae})):null]}))]})}),zx=qU;function YU(e){return ft("MuiInput",e)}const Sd=A({},Ou,pt("MuiInput",["root","underline","input"]));function QU(e){return ft("MuiOutlinedInput",e)}const sa=A({},Ou,pt("MuiOutlinedInput",["root","notchedOutline","input"]));function XU(e){return ft("MuiFilledInput",e)}const cl=A({},Ou,pt("MuiFilledInput",["root","underline","input"])),JU=Un(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function ZU(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:i=!1}=e,o=mO({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 e9(e){return ft("MuiBadge",e)}const aa=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"]),t9=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],a0=10,l0=4,n9=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,e9,s)},r9=Ee("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),i9=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:a0*2,lineHeight:1,padding:"0 6px",height:a0*2,borderRadius:a0,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:l0,height:l0*2,minWidth:l0*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%",[`&.${aa.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%",[`&.${aa.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%",[`&.${aa.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%",[`&.${aa.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%",[`&.${aa.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%",[`&.${aa.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%",[`&.${aa.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%",[`&.${aa.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})}}]}}),o9=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:E="rectangular",color:b="default",invisible:w=!1,max:y=99,badgeContent:_,slots:k,slotProps:R,showZero:P=!1,variant:L="standard"}=c,$=Le(c,t9),{badgeContent:j,invisible:N,max:F,displayValue:z}=ZU({max:y,invisible:w,badgeContent:_,showZero:P}),K=mO({anchorOrigin:u,color:b,overlap:E,variant:L,badgeContent:_}),Z=N||j==null&&L!=="dot",{color:le=b,overlap:ce=E,anchorOrigin:H=u,variant:V=L}=Z?K:c,ae=V!=="dot"?z:void 0,Oe=A({},c,{badgeContent:j,invisible:Z,max:F,displayValue:ae,showZero:P,anchorOrigin:H,color:le,overlap:ce,variant:V}),He=n9(Oe),je=(r=(i=k==null?void 0:k.root)!=null?i:m.Root)!=null?r:r9,_e=(o=(s=k==null?void 0:k.badge)!=null?s:m.Badge)!=null?o:i9,Ke=(a=R==null?void 0:R.root)!=null?a:h.root,Re=(l=R==null?void 0:R.badge)!=null?l:h.badge,ct=Io({elementType:je,externalSlotProps:Ke,externalForwardedProps:$,additionalProps:{ref:n,as:f},ownerState:Oe,className:Fe(Ke==null?void 0:Ke.className,He.root,d)}),ht=Io({elementType:_e,externalSlotProps:Re,ownerState:Oe,className:Fe(He.badge,Re==null?void 0:Re.className)});return v.jsxs(je,A({},ct,{children:[g,v.jsx(_e,A({},ht,{children:ae}))]}))}),s9=pt("MuiBox",["root"]),a9=bx(),nn=y3({themeId:_u,defaultTheme:a9,defaultClassName:s9.root,generateClassName:mx.generate}),l9=Un(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"),c9=["slots","slotProps"],u9=Ee(Mo)(({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:r1(e.palette.grey[200],.12)}:{backgroundColor:r1(e.palette.grey[600],.12)})})),d9=Ee(l9)({width:24,height:16});function f9(e){const{slots:t={},slotProps:n={}}=e,r=Le(e,c9),i=e;return v.jsx("li",{children:v.jsx(u9,A({focusRipple:!0},r,{ownerState:i,children:v.jsx(d9,A({as:t.CollapsedIcon,ownerState:i},n.collapsedIcon))}))})}function p9(e){return ft("MuiBreadcrumbs",e)}const h9=pt("MuiBreadcrumbs",["root","ol","li","separator"]),m9=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],g9=e=>{const{classes:t}=e;return mt({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},p9,t)},v9=Ee(Ct,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${h9.li}`]:t.li},t.root]})({}),y9=Ee("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),b9=Ee("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function w9(e,t,n,r){return e.reduce((i,o,s)=>(s{const L=()=>{E(!0);const $=_.current.querySelector("a[href],button,[tabindex]");$&&$.focus()};return d+u>=P.length?P:[...P.slice(0,d),v.jsx(f9,{"aria-label":c,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:y},onClick:L},"ellipsis"),...P.slice(P.length-u,P.length)]},R=C.Children.toArray(i).filter(P=>C.isValidElement(P)).map((P,L)=>v.jsx("li",{className:w.li,children:P},`child-${L}`));return v.jsx(v9,A({ref:n,component:s,color:"text.secondary",className:Fe(w.root,o),ownerState:b},h,{children:v.jsx(y9,{className:w.ol,ref:_,ownerState:b,children:w9(g||f&&R.length<=f?R:k(R),w.separator,m,b)})}))});function x9(e){return ft("MuiButton",e)}const gh=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"]),HO=C.createContext({}),VO=C.createContext(void 0),S9=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],_9=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,x9,s);return A({},s,l)},KO=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}}),C9=Ee(Mo,{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})`:$t(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})`:$t(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})`:$t(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]}),[`&.${gh.focusVisible}`]:A({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${gh.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 ${$t(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"},[`&.${gh.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${gh.disabled}`]:{boxShadow:"none"}}),k9=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},KO(e))),E9=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},KO(e))),vn=C.forwardRef(function(t,n){const r=C.useContext(HO),i=C.useContext(VO),o=Bf(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:E=!1,size:b="medium",startIcon:w,type:y,variant:_="text"}=s,k=Le(s,S9),R=A({},s,{color:l,component:c,disabled:d,disableElevation:f,disableFocusRipple:m,fullWidth:E,size:b,type:y,variant:_}),P=_9(R),L=w&&v.jsx(k9,{className:P.startIcon,ownerState:R,children:w}),$=h&&v.jsx(E9,{className:P.endIcon,ownerState:R,children:h}),j=i||"";return v.jsxs(C9,A({ownerState:R,className:Fe(r.className,P.root,u,j),component:c,disabled:d,focusRipple:!m,focusVisibleClassName:Fe(P.focusVisible,g),ref:n,type:y},k,{classes:P,children:[L,a,$]}))});function R9(e){return ft("MuiButtonGroup",e)}const rr=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"]),P9=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],T9=(e,t)=>{const{ownerState:n}=e;return[{[`& .${rr.grouped}`]:t.grouped},{[`& .${rr.grouped}`]:t[`grouped${we(n.orientation)}`]},{[`& .${rr.grouped}`]:t[`grouped${we(n.variant)}`]},{[`& .${rr.grouped}`]:t[`grouped${we(n.variant)}${we(n.orientation)}`]},{[`& .${rr.grouped}`]:t[`grouped${we(n.variant)}${we(n.color)}`]},{[`& .${rr.firstButton}`]:t.firstButton},{[`& .${rr.lastButton}`]:t.lastButton},{[`& .${rr.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},O9=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,R9,t)},j9=Ee("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:T9})(({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"},{[`& .${rr.grouped}`]:A({minWidth:40,"&:hover":A({},t.variant==="contained"&&{boxShadow:"none"})},t.variant==="contained"&&{boxShadow:"none"}),[`& .${rr.firstButton},& .${rr.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)"}`,[`&.${rr.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)"}`,[`&.${rr.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)`:$t(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]}`,[`&.${rr.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]}`,[`&.${rr.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"})}),[`& .${rr.lastButton},& .${rr.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})})),Gf=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,E=Le(r,P9),b=A({},r,{color:s,component:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,orientation:m,size:h,variant:g}),w=O9(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]),_=$3(i),k=_.length,R=P=>{const L=P===0,$=P===k-1;return L&&$?"":L?w.firstButton:$?w.lastButton:w.middleButton};return v.jsx(j9,A({as:a,role:"group",className:Fe(w.root,o),ref:n,ownerState:b},E,{children:v.jsx(HO.Provider,{value:y,children:_.map((P,L)=>v.jsx(VO.Provider,{value:R(L),children:P},L))})}))});function L9(e){return ft("MuiCard",e)}pt("MuiCard",["root"]);const I9=["className","raised"],M9=e=>{const{classes:t}=e;return mt({root:["root"]},L9,t)},N9=Ee(as,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),qO=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Le(r,I9),a=A({},r,{raised:o}),l=M9(a);return v.jsx(N9,A({className:Fe(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a},s))});function $9(e){return ft("PrivateSwitchBase",e)}pt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const A9=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],D9=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,$9,t)},B9=Ee(Mo)(({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})),F9=Ee("input",{shouldForwardProp:cr})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),YO=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,L=Le(t,A9),[$,j]=Cu({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 ae=V.target.checked;j(ae),b&&b(V,ae)};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=D9(ce);return v.jsxs(B9,A({component:"span",className:Fe(H.root,s),centerRipple:!0,focusRipple:!c,disabled:Z,tabIndex:null,role:void 0,onFocus:F,onBlur:z,ownerState:ce,ref:n},L,{children:[v.jsx(F9,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=Un(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"),U9=Un(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"),W9=Un(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 G9(e){return ft("MuiCheckbox",e)}const c0=pt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),H9=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],V9=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,G9,t);return A({},t,s)},K9=Ee(YO,{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})`:$t(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${c0.checked}, &.${c0.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${c0.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),q9=v.jsx(U9,{}),Y9=v.jsx(z9,{}),Q9=v.jsx(W9,{}),Os=C.forwardRef(function(t,n){var r,i;const o=gt({props:t,name:"MuiCheckbox"}),{checkedIcon:s=q9,color:a="primary",icon:l=Y9,indeterminate:c=!1,indeterminateIcon:u=Q9,inputProps:d,size:f="medium",className:m}=o,h=Le(o,H9),g=c?u:l,E=c?u:s,b=A({},o,{color:a,indeterminate:c,size:f}),w=V9(b);return v.jsx(K9,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:Fe(w.root,m)},h,{classes:w}))});function jk(e){return e.substring(2).toLowerCase()}function X9(e,t){return t.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=un(t.ref,a),d=qi(h=>{const g=c.current;c.current=!1;const E=Kn(a.current);if(!l.current||!a.current||"clientX"in h&&X9(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=jk(o),g=Kn(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=jk(r),g=Kn(a.current);return g.addEventListener(h,d),()=>{g.removeEventListener(h,d)}}},[d,r]),v.jsx(C.Fragment,{children:C.cloneElement(t,m)})}const Z9=(e,t)=>A({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),eW=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}}),tW=(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:Z9(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:A({margin:0},eW(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 nW(e){const t=gt({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return v.jsxs(C.Fragment,{children:[v.jsx(GO,{styles:i=>tW(i,r)}),n]})}function rW(e){return ft("MuiDialog",e)}const u0=pt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),QO=C.createContext({}),iW=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],oW=Ee(CO,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),sW=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,rW,t)},aW=Ee(_v,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),lW=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"}})),cW=Ee(as,{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)`,[`&.${u0.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}`,[`&.${u0.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,[`&.${u0.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),uW=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiDialog"}),i=Mi(),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:_=as,PaperProps:k={},scroll:R="paper",TransitionComponent:P=_O,transitionDuration:L=o,TransitionProps:$}=r,j=Le(r,iW),N=A({},r,{disableEscapeKeyDown:f,fullScreen:m,fullWidth:h,maxWidth:g,scroll:R}),F=sW(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=gp(a),ce=C.useMemo(()=>({titleId:le}),[le]);return v.jsx(aW,A({className:Fe(F.root,d),closeAfterTransition:!0,components:{Backdrop:oW},componentsProps:{backdrop:A({transitionDuration:L,as:l},c)},disableEscapeKeyDown:f,onClose:w,open:y,ref:n,onClick:Z,ownerState:N},j,{children:v.jsx(P,A({appear:!0,in:y,timeout:L,role:"presentation"},$,{children:v.jsx(lW,{className:Fe(F.container),onMouseDown:K,ownerState:N,children:v.jsx(cW,A({as:_,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":le},k,{className:Fe(F.paper,k.className),ownerState:N,children:v.jsx(QO.Provider,{value:ce,children:u})}))})}))}))});function dW(e){return ft("MuiDialogContent",e)}pt("MuiDialogContent",["root","dividers"]);function fW(e){return ft("MuiDialogTitle",e)}const pW=pt("MuiDialogTitle",["root"]),hW=["className","dividers"],mW=e=>{const{classes:t,dividers:n}=e;return mt({root:["root",n&&"dividers"]},dW,t)},gW=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}`}:{[`.${pW.root} + &`]:{paddingTop:0}})),vW=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiDialogContent"}),{className:i,dividers:o=!1}=r,s=Le(r,hW),a=A({},r,{dividers:o}),l=mW(a);return v.jsx(gW,A({className:Fe(l.root,i),ownerState:a,ref:n},s))}),yW=["className","id"],bW=e=>{const{classes:t}=e;return mt({root:["root"]},fW,t)},wW=Ee(Ct,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),xW=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiDialogTitle"}),{className:i,id:o}=r,s=Le(r,yW),a=r,l=bW(a),{titleId:c=o}=C.useContext(QO);return v.jsx(wW,A({component:"h2",className:Fe(l.root,i),ownerState:a,ref:n,variant:"h6",id:o??c},s))});function SW(e){return ft("MuiFab",e)}const Lk=pt("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),_W=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],CW=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,SW,r);return A({},r,s)},kW=Ee(Mo,{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"},[`&.${Lk.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})=>({[`&.${Lk.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}})),EW=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=Le(r,_W),h=A({},r,{color:s,component:a,disabled:l,disableFocusRipple:c,size:d,variant:f}),g=CW(h);return v.jsx(kW,A({className:Fe(g.root,o),component:a,disabled:l,focusRipple:!c,focusVisibleClassName:Fe(g.focusVisible,u),ownerState:h,ref:n},m,{classes:g,children:i}))}),RW=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],PW=e=>{const{classes:t,disableUnderline:n}=e,i=mt({root:["root",!n&&"underline"],input:["input"]},XU,t);return A({},t,i)},TW=Ee(Av,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Nv(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}},[`&.${cl.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${cl.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"},[`&.${cl.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${cl.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(.${cl.disabled}, .${cl.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${cl.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}))}),OW=Ee(Dv,{name:"MuiFilledInput",slot:"Input",overridesResolver:$v})(({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})),Ux=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,E=Le(a,RW),b=A({},a,{fullWidth:u,inputComponent:d,multiline:f,type:g}),w=PW(a),y={root:{ownerState:b},input:{ownerState:b}},_=m??c?Gr(y,m??c):y,k=(r=(i=h.root)!=null?i:l.Root)!=null?r:TW,R=(o=(s=h.input)!=null?s:l.Input)!=null?o:OW;return v.jsx(zx,A({slots:{root:k,input:R},componentsProps:_,fullWidth:u,inputComponent:d,multiline:f,ref:n,type:g},E,{classes:w}))});Ux.muiName="Input";function jW(e){return ft("MuiFormControl",e)}pt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const LW=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],IW=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${we(n)}`,r&&"fullWidth"]};return mt(i,jW,t)},MW=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%"})),bl=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:E="outlined"}=r,b=Le(r,LW),w=A({},r,{color:s,component:a,disabled:l,error:c,fullWidth:d,hiddenLabel:f,margin:m,required:h,size:g,variant:E}),y=IW(w),[_,k]=C.useState(()=>{let z=!1;return i&&C.Children.forEach(i,K=>{if(!Jd(K,["Input","Select"]))return;const Z=Jd(K,["Select"])?K.props.input:K;Z&&WU(Z.props)&&(z=!0)}),z}),[R,P]=C.useState(()=>{let z=!1;return i&&C.Children.forEach(i,K=>{Jd(K,["Input","Select"])&&(Wm(K.props,!0)||Wm(K.props.inputProps,!0))&&(z=!0)}),z}),[L,$]=C.useState(!1);l&&L&&$(!1);const j=u!==void 0&&!l?u:L;let N;const F=C.useMemo(()=>({adornedStart:_,setAdornedStart:k,color:s,disabled:l,error:c,filled:R,focused:j,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,j,d,f,N,h,g,E]);return v.jsx(Fx.Provider,{value:F,children:v.jsx(MW,A({as:a,ownerState:w,className:Fe(y.root,o),ref:n},b,{children:i}))})}),Gm=eF({createStyledComponent:Ee("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>gt({props:e,name:"MuiStack"})});function NW(e){return ft("MuiFormControlLabel",e)}const Dd=pt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),$W=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],AW=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,NW,t)},DW=Ee("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Dd.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,[`&.${Dd.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},{[`& .${Dd.label}`]:{[`&.${Dd.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),BW=Ee("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${Dd.error}`]:{color:(e.vars||e).palette.error.main}})),js=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=Le(o,$W),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 _=rc({props:o,muiFormControl:E,states:["error"]}),k=A({},o,{disabled:b,labelPlacement:f,required:w,error:_.error}),R=AW(k),P=(i=h.typography)!=null?i:a.typography;let L=d;return L!=null&&L.type!==Ct&&!u&&(L=v.jsx(Ct,A({component:"span"},P,{className:Fe(R.label,P==null?void 0:P.className),children:L}))),v.jsxs(DW,A({className:Fe(R.root,s),ownerState:k,ref:n},g,{children:[C.cloneElement(l,y),w?v.jsxs(Gm,{display:"block",children:[L,v.jsxs(BW,{ownerState:k,"aria-hidden":!0,className:R.asterisk,children:[" ","*"]})]}):L]}))});function FW(e){return ft("MuiFormHelperText",e)}const Ik=pt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Mk;const zW=["children","className","component","disabled","error","filled","focused","margin","required","variant"],UW=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,FW,t)},WW=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,[`&.${Ik.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Ik.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),GW=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,a=Le(r,zW),l=qa(),c=rc({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=UW(u);return v.jsx(WW,A({as:s,ownerState:u,className:Fe(d.root,o),ref:n},a,{children:i===" "?Mk||(Mk=v.jsx("span",{className:"notranslate",children:"​"})):i}))});function HW(e){return ft("MuiFormLabel",e)}const rf=pt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),VW=["children","className","color","component","disabled","error","filled","focused","required"],KW=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,HW,t)},qW=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",[`&.${rf.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${rf.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${rf.error}`]:{color:(e.vars||e).palette.error.main}})),YW=Ee("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${rf.error}`]:{color:(e.vars||e).palette.error.main}})),QW=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,a=Le(r,VW),l=qa(),c=rc({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=KW(u);return v.jsxs(qW,A({as:s,ownerState:u,className:Fe(d.root,o),ref:n},a,{children:[i,c.required&&v.jsxs(YW,{ownerState:u,"aria-hidden":!0,className:d.asterisk,children:[" ","*"]})]}))}),XW=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function p1(e){return`scale(${e}, ${e**2})`}const JW={entering:{opacity:1,transform:p1(1)},entered:{opacity:1,transform:"none"}},d0=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Hf=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=lo}=t,b=Le(t,XW),w=ba(),y=C.useRef(),_=Mi(),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)}},L=P(u),$=P((Z,le)=>{Px(Z);const{duration:ce,delay:H,easing:V}=$a({style:h,timeout:g,easing:s},{mode:"enter"});let ae;g==="auto"?(ae=_.transitions.getAutoHeightDuration(Z.clientHeight),y.current=ae):ae=ce,Z.style.transition=[_.transitions.create("opacity",{duration:ae,delay:H}),_.transitions.create("transform",{duration:d0?ae:ae*.666,delay:H,easing:V})].join(","),l&&l(Z,le)}),j=P(c),N=P(m),F=P(Z=>{const{duration:le,delay:ce,easing:H}=$a({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:d0?V:V*.666,delay:d0?ce:ce||V*.333,easing:H})].join(","),Z.style.opacity=0,Z.style.transform=p1(.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:j,onEntering:L,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:p1(.75),visibility:Z==="exited"&&!a?"hidden":void 0},JW[Z],h,o.props.style),ref:R},le))}))});Hf.muiSupportAuto=!0;const ZW=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],eG=e=>{const{classes:t,disableUnderline:n}=e,i=mt({root:["root",!n&&"underline"],input:["input"]},YU,t);return A({},t,i)},tG=Ee(Av,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Nv(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"},[`&.${Sd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Sd.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(.${Sd.disabled}, .${Sd.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Sd.disabled}:before`]:{borderBottomStyle:"dotted"}})}),nG=Ee(Dv,{name:"MuiInput",slot:"Input",overridesResolver:$v})({}),Wx=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:E="text"}=a,b=Le(a,ZW),w=eG(a),_={root:{ownerState:{disableUnderline:l}}},k=h??u?Gr(h??u,_):_,R=(r=(i=g.root)!=null?i:c.Root)!=null?r:tG,P=(o=(s=g.input)!=null?s:c.Input)!=null?o:nG;return v.jsx(zx,A({slots:{root:R,input:P},slotProps:k,fullWidth:d,inputComponent:f,multiline:m,ref:n,type:E},b,{classes:w}))});Wx.muiName="Input";function rG(e){return ft("MuiInputLabel",e)}pt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const iG=["disableAnimation","margin","shrink","variant","className"],oG=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,rG,t);return A({},t,c)},sG=Ee(QW,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${rf.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)"}))),XO=C.forwardRef(function(t,n){const r=gt({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,shrink:o,className:s}=r,a=Le(r,iG),l=qa();let c=o;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=rc({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=oG(d);return v.jsx(sG,A({"data-shrink":c,ownerState:d,ref:n,className:Fe(f.root,s)},a,{classes:f}))});function aG(e){return ft("MuiListItemIcon",e)}const Nk=pt("MuiListItemIcon",["root","alignItemsFlexStart"]),lG=["className"],cG=e=>{const{alignItems:t,classes:n}=e;return mt({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},aG,n)},uG=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})),dG=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=Le(r,lG),s=C.useContext(Po),a=A({},r,{alignItems:s.alignItems}),l=cG(a);return v.jsx(uG,A({className:Fe(l.root,i),ownerState:a,ref:n},o))}),fG=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function f0(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function $k(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function JO(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 _d(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")||!JO(a,o)||l)a=i(e,a,n);else return a.focus(),!0}return!1}const ZO=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=Le(t,fG),m=C.useRef(null),h=C.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ai(()=>{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=Kn(_).activeElement;if(k==="ArrowDown")y.preventDefault(),_d(_,R,c,l,f0);else if(k==="ArrowUp")y.preventDefault(),_d(_,R,c,l,$k);else if(k==="Home")y.preventDefault(),_d(_,null,c,l,f0);else if(k==="End")y.preventDefault(),_d(_,null,c,l,$k);else if(k.length===1){const P=h.current,L=k.toLowerCase(),$=performance.now();P.keys.length>0&&($-P.lastTime>500?(P.keys=[],P.repeating=!0,P.previousKeyMatched=!0):P.repeating&&L!==P.keys[0]&&(P.repeating=!1)),P.lastTime=$,P.keys.push(L);const j=R&&!P.repeating&&JO(R,P);P.previousKeyMatched&&(j||_d(_,R,!1,l,f0,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(ef,A({role:"menu",ref:E,className:a,onKeyDown:g,tabIndex:i?0:-1},f,{children:w}))});function pG(e){return ft("MuiPopover",e)}pt("MuiPopover",["root","paper"]);const hG=["onEntering"],mG=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],gG=["slotProps"];function Ak(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function Dk(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function Bk(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function p0(e){return typeof e=="function"?e():e}const vG=e=>{const{classes:t}=e;return mt({root:["root"],paper:["paper"]},pG,t)},yG=Ee(_v,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ej=Ee(as,{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}),bG=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:E=16,open:b,PaperProps:w={},slots:y,slotProps:_,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:R=Hf,transitionDuration:P="auto",TransitionProps:{onEntering:L}={},disableScrollLock:$=!1}=s,j=Le(s.TransitionProps,hG),N=Le(s,mG),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:j}),le=vG(Z),ce=C.useCallback(()=>{if(d==="anchorPosition")return u;const Ze=p0(l),ee=(Ze&&Ze.nodeType===1?Ze:Kn(z.current).body).getBoundingClientRect();return{top:ee.top+Ak(ee,c.vertical),left:ee.left+Dk(ee,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),H=C.useCallback(Ze=>({vertical:Ak(Ze,k.vertical),horizontal:Dk(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:Bk(ee)};const he=ce();let Ce=he.top-ee.vertical,We=he.left-ee.horizontal;const W=Ce+yt.height,S=We+yt.width,O=rs(p0(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&&Weq){const X=S-q;We-=X,ee.horizontal+=X}return{top:`${Math.round(Ce)}px`,left:`${Math.round(We)}px`,transformOrigin:Bk(ee)}},[l,d,ce,H,E]),[ae,Oe]=C.useState(b),He=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,Oe(!0)},[V]);C.useEffect(()=>($&&window.addEventListener("scroll",He),()=>window.removeEventListener("scroll",He)),[l,$,He]);const je=(Ze,yt)=>{L&&L(Ze,yt),He()},_e=()=>{Oe(!1)};C.useEffect(()=>{b&&He()}),C.useImperativeHandle(a,()=>b?{updatePosition:()=>{He()}}:null,[b,He]),C.useEffect(()=>{if(!b)return;const Ze=xv(()=>{He()}),yt=rs(l);return yt.addEventListener("resize",Ze),()=>{Ze.clear(),yt.removeEventListener("resize",Ze)}},[l,b,He]);let Ke=P;P==="auto"&&!R.muiSupportAuto&&(Ke=void 0);const Re=h||(l?Kn(p0(l)).body:void 0),ct=(i=y==null?void 0:y.root)!=null?i:yG,ht=(o=y==null?void 0:y.paper)!=null?o:ej,Pe=Io({elementType:ht,externalSlotProps:A({},F,{style:ae?F.style:A({},F.style,{opacity:0})}),additionalProps:{elevation:g,ref:K},ownerState:Z,className:Fe(le.paper,F==null?void 0:F.className)}),Tt=Io({elementType:ct,externalSlotProps:(_==null?void 0:_.root)||{},externalForwardedProps:N,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:Re,open:b},ownerState:Z,className:Fe(le.root,m)}),{slotProps:ut}=Tt,Ue=Le(Tt,gG);return v.jsx(ct,A({},Ue,!ku(ct)&&{slotProps:ut,disableScrollLock:$},{children:v.jsx(R,A({appear:!0,in:b,onEntering:je,onExited:_e,timeout:Ke},j,{children:v.jsx(ht,A({},Pe,{children:f}))}))}))});function wG(e){return ft("MuiMenu",e)}pt("MuiMenu",["root","paper","list"]);const xG=["onEntering"],SG=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],_G={vertical:"top",horizontal:"right"},CG={vertical:"top",horizontal:"left"},kG=e=>{const{classes:t}=e;return mt({root:["root"],paper:["paper"],list:["list"]},wG,t)},EG=Ee(bG,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),RG=Ee(ej,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),PG=Ee(ZO,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Bv=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:E}={},variant:b="selectedMenu",slots:w={},slotProps:y={}}=o,_=Le(o.TransitionProps,xG),k=Le(o,SG),R=_x(),P=A({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:E,PaperProps:m,transitionDuration:g,TransitionProps:_,variant:b}),L=kG(P),$=s&&!c&&f,j=C.useRef(null),N=(H,V)=>{j.current&&j.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:RG,Z=(i=y.paper)!=null?i:m,le=Io({elementType:w.root,externalSlotProps:y.root,ownerState:P,className:[L.root,l]}),ce=Io({elementType:K,externalSlotProps:Z,ownerState:P,className:L.paper});return v.jsx(EG,A({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:R?"right":"left"},transformOrigin:R?_G:CG,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(PG,A({onKeyDown:F,actions:j,autoFocus:s&&(z===-1||c),autoFocusItem:$,variant:b},u,{className:Fe(L.list,u.className),children:a}))}))});function TG(e){return ft("MuiMenuItem",e)}const Cd=pt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),OG=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],jG=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},LG=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"]},TG,s);return A({},s,l)},IG=Ee(Mo,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:jG})(({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"}},[`&.${Cd.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:$t(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Cd.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:$t(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Cd.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:$t(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})`:$t(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Cd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Cd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${gk.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${gk.inset}`]:{marginLeft:52},[`& .${zm.root}`]:{marginTop:0,marginBottom:0},[`& .${zm.inset}`]:{paddingLeft:36},[`& .${Nk.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&A({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Nk.root} svg`]:{fontSize:"1.25rem"}}))),vi=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=Le(r,OG),h=C.useContext(Po),g=C.useMemo(()=>({dense:s||h.dense||!1,disableGutters:l}),[h.dense,s,l]),E=C.useRef(null);ai(()=>{i&&E.current&&E.current.focus()},[i]);const b=A({},r,{dense:g.dense,divider:a,disableGutters:l}),w=LG(r),y=un(E,n);let _;return r.disabled||(_=d!==void 0?d:-1),v.jsx(Po.Provider,{value:g,children:v.jsx(IG,A({ref:y,role:u,tabIndex:_,component:o,focusVisibleClassName:Fe(w.focusVisible,c),className:Fe(w.root,f)},m,{ownerState:b,classes:w}))})});function MG(e){return ft("MuiNativeSelect",e)}const Gx=pt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),NG=["className","disabled","error","IconComponent","inputRef","variant"],$G=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,MG,t)},tj=({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"},[`&.${Gx.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}}),AG=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,{[`&.${Gx.multiple}`]:t.multiple}]}})(tj),nj=({ownerState:e,theme:t})=>A({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${Gx.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),DG=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]}})(nj),BG=C.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard"}=t,c=Le(t,NG),u=A({},t,{disabled:i,variant:l,error:o}),d=$G(u);return v.jsxs(C.Fragment,{children:[v.jsx(AG,A({ownerState:u,className:Fe(d.select,r),disabled:i,ref:a||n},c)),t.multiple?null:v.jsx(DG,{as:s,ownerState:u,className:d.icon})]})});var Fk;const FG=["children","classes","className","label","notched"],zG=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%"}),UG=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 WG(e){const{className:t,label:n,notched:r}=e,i=Le(e,FG),o=n!=null&&n!=="",s=A({},e,{notched:r,withLabel:o});return v.jsx(zG,A({"aria-hidden":!0,className:t,ownerState:s},i,{children:v.jsx(UG,{ownerState:s,children:o?v.jsx("span",{children:n}):Fk||(Fk=v.jsx("span",{className:"notranslate",children:"​"}))})}))}const GG=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],HG=e=>{const{classes:t}=e,r=mt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},QU,t);return A({},t,r)},VG=Ee(Av,{shouldForwardProp:e=>cr(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Nv})(({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 .${sa.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${sa.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${sa.focused} .${sa.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${sa.error} .${sa.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${sa.disabled} .${sa.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"}))}),KG=Ee(WG,{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}}),qG=Ee(Dv,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:$v})(({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})),Hx=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:E="text"}=l,b=Le(l,GG),w=HG(l),y=qa(),_=rc({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:VG,P=(o=(s=g.input)!=null?s:c.Input)!=null?o:qG;return v.jsx(zx,A({slots:{root:R,input:P},renderSuffix:L=>v.jsx(KG,{ownerState:k,className:w.notchedOutline,label:f!=null&&f!==""&&_.required?a||(a=v.jsxs(C.Fragment,{children:[f," ","*"]})):f,notched:typeof h<"u"?h:!!(L.startAdornment||L.filled||L.focused)}),fullWidth:u,inputComponent:d,multiline:m,ref:n,type:E},b,{classes:A({},w,{notchedOutline:null})}))});Hx.muiName="Input";function YG(e){return ft("MuiSelect",e)}const kd=pt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var zk;const QG=["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"],XG=Ee("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${kd.select}`]:t.select},{[`&.${kd.select}`]:t[n.variant]},{[`&.${kd.error}`]:t.error},{[`&.${kd.multiple}`]:t.multiple}]}})(tj,{[`&.${kd.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),JG=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]}})(nj),ZG=Ee("input",{shouldForwardProp:e=>uO(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 Uk(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function e7(e){return e==null||typeof e=="string"&&!e.trim()}const t7=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,YG,t)},n7=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:L,onOpen:$,open:j,readOnly:N,renderValue:F,SelectDisplayProps:z={},tabIndex:K,value:Z,variant:le="standard"}=t,ce=Le(t,QG),[H,V]=Cu({controlled:Z,default:d,name:"Select"}),[ae,Oe]=Cu({controlled:j,default:u,name:"Select"}),He=C.useRef(null),je=C.useRef(null),[_e,Ke]=C.useState(null),{current:Re}=C.useRef(j!=null),[ct,ht]=C.useState(),Pe=un(n,E),Tt=C.useCallback(Qe=>{je.current=Qe,Qe&&Ke(Qe)},[]),ut=_e==null?void 0:_e.parentNode;C.useImperativeHandle(Pe,()=>({focus:()=>{je.current.focus()},node:He.current,value:H}),[H]),C.useEffect(()=>{u&&ae&&_e&&!Re&&(ht(a?null:ut.clientWidth),je.current.focus())},[_e,a]),C.useEffect(()=>{s&&je.current.focus()},[s]),C.useEffect(()=>{if(!b)return;const Qe=Kn(je.current).getElementById(b);if(Qe){const wt=()=>{getSelection().isCollapsed&&je.current.focus()};return Qe.addEventListener("click",wt),()=>{Qe.removeEventListener("click",wt)}}},[b]);const Ue=(Qe,wt)=>{Qe?$&&$(wt):P&&P(wt),Re||(ht(a?null:ut.clientWidth),Oe(Qe))},Ze=Qe=>{Qe.button===0&&(Qe.preventDefault(),je.current.focus(),Ue(!0,Qe))},yt=Qe=>{Ue(!1,Qe)},ee=C.Children.toArray(l),he=Qe=>{const wt=ee.find(Ie=>Ie.props.value===Qe.target.value);wt!==void 0&&(V(wt.props.value),R&&R(Qe,wt))},Ce=Qe=>wt=>{let Ie;if(wt.currentTarget.hasAttribute("tabindex")){if(y){Ie=Array.isArray(H)?H.slice():[];const qt=H.indexOf(Qe.props.value);qt===-1?Ie.push(Qe.props.value):Ie.splice(qt,1)}else Ie=Qe.props.value;if(Qe.props.onClick&&Qe.props.onClick(wt),H!==Ie&&(V(Ie),R)){const qt=wt.nativeEvent||wt,Nn=new qt.constructor(qt.type,qt);Object.defineProperty(Nn,"target",{writable:!0,value:{value:Ie,name:_}}),R(Nn,Qe)}y||Ue(!1,wt)}},We=Qe=>{N||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Qe.key)!==-1&&(Qe.preventDefault(),Ue(!0,Qe))},W=_e!==null&&ae,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;(Wm({value:H})||m)&&(F?O=F(H):X=!0);const pe=ee.map(Qe=>{if(!C.isValidElement(Qe))return null;let wt;if(y){if(!Array.isArray(H))throw new Error(Hl(2));wt=H.some(Ie=>Uk(Ie,Qe.props.value)),wt&&X&&q.push(Qe.props.children)}else wt=Uk(H,Qe.props.value),wt&&X&&(D=Qe.props.children);return C.cloneElement(Qe,{"aria-selected":wt?"true":"false",onClick:Ce(Qe),onKeyUp:Ie=>{Ie.key===" "&&Ie.preventDefault(),Qe.props.onKeyUp&&Qe.props.onKeyUp(Ie)},role:"option",selected:wt,value:void 0,"data-value":Qe.props.value})});X&&(y?q.length===0?O=null:O=q.reduce((Qe,wt,Ie)=>(Qe.push(wt),Ie{const{classes:t}=e;return t},Vx={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>cr(e)&&e!=="variant",slot:"Root"},s7=Ee(Wx,Vx)(""),a7=Ee(Hx,Vx)(""),l7=Ee(Ux,Vx)(""),El=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=JU,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:L="outlined"}=r,$=Le(r,r7),j=w?BG:n7,N=qa(),F=rc({props:r,muiFormControl:N,states:["variant","error"]}),z=F.variant||L,K=A({},r,{variant:z,classes:s}),Z=o7(K),le=Le(Z,i7),ce=f||{standard:v.jsx(s7,{ownerState:K}),outlined:v.jsx(a7,{label:h,ownerState:K}),filled:v.jsx(l7,{ownerState:K})}[z],H=un(n,ce.ref);return v.jsx(C.Fragment,{children:C.cloneElement(ce,A({inputComponent:j,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?Gr(le,m.classes):le},f?f.props.inputProps:{})},(b&&w||c)&&z==="outlined"?{notched:!0}:{},{ref:H,className:Fe(ce.props.className,a,Z.root)},!f&&{variant:z},$))})});El.muiName="Select";function c7(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=ba();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=qi((b,w)=>{r==null||r(b,w)}),l=qi(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({},Bm(e),Bm(b));return A({role:"presentation"},b,w,{onBlur:f(w),onFocus:m(w),onMouseEnter:h(w),onMouseLeave:g(w)})},onClickAway:c}}function u7(e){return ft("MuiSnackbarContent",e)}pt("MuiSnackbarContent",["root","message","action"]);const d7=["action","className","message","role"],f7=e=>{const{classes:t}=e;return mt({root:["root"],action:["action"],message:["message"]},u7,t)},p7=Ee(as,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=r1(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}})}),h7=Ee("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),m7=Ee("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),g7=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:a="alert"}=r,l=Le(r,d7),c=r,u=f7(c);return v.jsxs(p7,A({role:a,square:!0,elevation:6,className:Fe(u.root,o),ownerState:c,ref:n},l,{children:[v.jsx(h7,{className:u.message,ownerState:c,children:s}),i?v.jsx(m7,{className:u.action,ownerState:c,children:i}):null]}))});function v7(e){return ft("MuiSnackbar",e)}pt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const y7=["onEnter","onExited"],b7=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],w7=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${we(n.vertical)}${we(n.horizontal)}`]};return mt(r,v7,t)},Wk=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"})})}),x7=C.forwardRef(function(t,n){const r=gt({props:t,name:"MuiSnackbar"}),i=Mi(),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=Hf,transitionDuration:w=o,TransitionProps:{onEnter:y,onExited:_}={}}=r,k=Le(r.TransitionProps,y7),R=Le(r,b7),P=A({},r,{anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:c,disableWindowBlurListener:h,TransitionComponent:b,transitionDuration:w}),L=w7(P),{getRootProps:$,onClickAway:j}=c7(A({},P)),[N,F]=C.useState(!0),z=Io({elementType:Wk,getSlotProps:$,externalForwardedProps:R,ownerState:P,additionalProps:{ref:n},className:[L.root,d]}),K=le=>{F(!0),_&&_(le)},Z=(le,ce)=>{F(!1),y&&y(le,ce)};return!E&&N?null:v.jsx(J9,A({onClickAway:j},f,{children:v.jsx(Wk,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(g7,A({message:g,action:s},m))}))}))}))});function S7(e){return ft("MuiTooltip",e)}const wa=pt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),_7=["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 C7(e){return Math.round(e*1e5)/1e5}const k7=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,S7,t)},E7=Ee(UO,{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"] .${wa.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${wa.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${wa.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"] .${wa.arrow}`]:A({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),R7=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:$t(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:`${C7(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${wa.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"})),[`.${wa.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"})),[`.${wa.popper}[data-popper-placement*="top"] &`]:A({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${wa.popper}[data-popper-placement*="bottom"] &`]:A({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),P7=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:$t(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let vh=!1;const Gk=new mp;let Ed={x:0,y:0};function yh(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Xh=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=gt({props:t,name:"MuiTooltip"}),{arrow:P=!1,children:L,components:$={},componentsProps:j={},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:ae,leaveDelay:Oe=0,leaveTouchDelay:He=1500,onClose:je,onOpen:_e,open:Ke,placement:Re="bottom",PopperComponent:ct,PopperProps:ht={},slotProps:Pe={},slots:Tt={},title:ut,TransitionComponent:Ue=Hf,TransitionProps:Ze}=R,yt=Le(R,_7),ee=C.isValidElement(L)?L:v.jsx("span",{children:L}),he=Mi(),Ce=_x(),[We,W]=C.useState(),[S,O]=C.useState(null),D=C.useRef(!1),q=K||V,X=ba(),pe=ba(),ze=ba(),rt=ba(),[Xe,Te]=Cu({controlled:Ke,default:!1,name:"Tooltip",state:"open"});let et=Xe;const Rt=gp(ae),en=C.useRef(),Qe=qi(()=>{en.current!==void 0&&(document.body.style.WebkitUserSelect=en.current,en.current=void 0),rt.clear()});C.useEffect(()=>Qe,[Qe]);const wt=Je=>{Gk.clear(),vh=!0,Te(!0),_e&&!et&&_e(Je)},Ie=qi(Je=>{Gk.start(800+Oe,()=>{vh=!1}),Te(!1),je&&et&&je(Je),X.start(he.transitions.duration.shortest,()=>{D.current=!1})}),qt=Je=>{D.current&&Je.type!=="touchstart"||(We&&We.removeAttribute("title"),pe.clear(),ze.clear(),le||vh&&ce?pe.start(vh?ce:le,()=>{wt(Je)}):wt(Je))},Nn=Je=>{pe.clear(),ze.start(Oe,()=>{Ie(Je)})},{isFocusVisibleRef:dr,onBlur:Ge,onFocus:Di,ref:Bi}=bv(),[,Zn]=C.useState(!1),fo=Je=>{Ge(Je),dr.current===!1&&(Zn(!1),Nn(Je))},Do=Je=>{We||W(Je.currentTarget),Di(Je),dr.current===!0&&(Zn(!0),qt(Je))},us=Je=>{D.current=!0;const At=ee.props;At.onTouchStart&&At.onTouchStart(Je)},Za=Je=>{us(Je),ze.clear(),X.clear(),Qe(),en.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",rt.start(H,()=>{document.body.style.WebkitUserSelect=en.current,qt(Je)})},ui=Je=>{ee.props.onTouchEnd&&ee.props.onTouchEnd(Je),Qe(),ze.start(He,()=>{Ie(Je)})};C.useEffect(()=>{if(!et)return;function Je(At){(At.key==="Escape"||At.key==="Esc")&&Ie(At)}return document.addEventListener("keydown",Je),()=>{document.removeEventListener("keydown",Je)}},[Ie,et]);const kr=un(ee.ref,Bi,W,n);!ut&&ut!==0&&(et=!1);const Er=C.useRef(),fr=Je=>{const At=ee.props;At.onMouseMove&&At.onMouseMove(Je),Ed={x:Je.clientX,y:Je.clientY},Er.current&&Er.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:Fe(yt.className,ee.props.className),onTouchStart:us,ref:kr},V?{onMouseMove:fr}:{}),me={};Z||(ie.onTouchStart=Za,ie.onTouchEnd=ui),z||(ie.onMouseOver=yh(qt,ie.onMouseOver),ie.onMouseLeave=yh(Nn,ie.onMouseLeave),q||(me.onMouseOver=qt,me.onMouseLeave=Nn)),F||(ie.onFocus=yh(Do,ie.onFocus),ie.onBlur=yh(fo,ie.onBlur),q||(me.onFocus=Do,me.onBlur=fo));const xe=C.useMemo(()=>{var Je;let At=[{name:"arrow",enabled:!!S,options:{element:S,padding:4}}];return(Je=ht.popperOptions)!=null&&Je.modifiers&&(At=At.concat(ht.popperOptions.modifiers)),A({},ht.popperOptions,{modifiers:At})},[S,ht]),Be=A({},R,{isRtl:Ce,arrow:P,disableInteractive:q,placement:Re,PopperComponentProp:ct,touch:D.current}),nt=k7(Be),at=(r=(i=Tt.popper)!=null?i:$.Popper)!=null?r:E7,$e=(o=(s=(a=Tt.transition)!=null?a:$.Transition)!=null?s:Ue)!=null?o:Hf,vt=(l=(c=Tt.tooltip)!=null?c:$.Tooltip)!=null?l:R7,it=(u=(d=Tt.arrow)!=null?d:$.Arrow)!=null?u:P7,ot=Xc(at,A({},ht,(f=Pe.popper)!=null?f:j.popper,{className:Fe(nt.popper,ht==null?void 0:ht.className,(m=(h=Pe.popper)!=null?h:j.popper)==null?void 0:m.className)}),Be),Ot=Xc($e,A({},Ze,(g=Pe.transition)!=null?g:j.transition),Be),Bt=Xc(vt,A({},(E=Pe.tooltip)!=null?E:j.tooltip,{className:Fe(nt.tooltip,(b=(w=Pe.tooltip)!=null?w:j.tooltip)==null?void 0:b.className)}),Be),Lt=Xc(it,A({},(y=Pe.arrow)!=null?y:j.arrow,{className:Fe(nt.arrow,(_=(k=Pe.arrow)!=null?k:j.arrow)==null?void 0:_.className)}),Be);return v.jsxs(C.Fragment,{children:[C.cloneElement(ee,ie),v.jsx(at,A({as:ct??UO,placement:Re,anchorEl:V?{getBoundingClientRect:()=>({top:Ed.y,left:Ed.x,right:Ed.x,bottom:Ed.y,width:0,height:0})}:We,popperRef:Er,open:We?et:!1,id:Rt,transition:!0},me,ot,{popperOptions:xe,children:({TransitionProps:Je})=>v.jsx($e,A({timeout:he.transitions.duration.shorter},Je,Ot,{children:v.jsxs(vt,A({},Bt,{children:[ut,P?v.jsx(it,A({},Lt,{ref:O})):null]}))}))}))]})});function T7(e){return ft("MuiSwitch",e)}const Fr=pt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),O7=["className","color","edge","size","sx"],j7=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,T7,t);return A({},t,l)},L7=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,[`& .${Fr.thumb}`]:{width:16,height:16},[`& .${Fr.switchBase}`]:{padding:4,[`&.${Fr.checked}`]:{transform:"translateX(16px)"}}}}]}),I7=Ee(YO,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Fr.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}),[`&.${Fr.checked}`]:{transform:"translateX(20px)"},[`&.${Fr.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Fr.checked} + .${Fr.track}`]:{opacity:.5},[`&.${Fr.disabled} + .${Fr.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Fr.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:$t(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:{[`&.${Fr.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:$t(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Fr.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?$m(e.palette[t].main,.62):Nm(e.palette[t].main,.55)}`}},[`&.${Fr.checked} + .${Fr.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),M7=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}`})),N7=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%"})),$7=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=Le(r,O7),u=A({},r,{color:o,edge:s,size:a}),d=j7(u),f=v.jsx(N7,{className:d.thumb,ownerState:u});return v.jsxs(L7,{className:Fe(d.root,i),sx:l,ownerState:u,children:[v.jsx(I7,A({type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:u},c,{classes:A({},d,{root:d.switchBase})})),v.jsx(M7,{className:d.track,ownerState:u})]})});function A7(e){return ft("MuiTextField",e)}pt("MuiTextField",["root"]);const D7=["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"],B7={standard:Wx,filled:Ux,outlined:Hx},F7=e=>{const{classes:t}=e;return mt({root:["root"]},A7,t)},z7=Ee(bl,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),U7=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:E,inputProps:b,InputProps:w,inputRef:y,label:_,maxRows:k,minRows:R,multiline:P=!1,name:L,onBlur:$,onChange:j,onFocus:N,placeholder:F,required:z=!1,rows:K,select:Z=!1,SelectProps:le,type:ce,value:H,variant:V="outlined"}=r,ae=Le(r,D7),Oe=A({},r,{autoFocus:o,color:l,disabled:u,error:d,fullWidth:m,multiline:P,required:z,select:Z,variant:V}),He=F7(Oe),je={};V==="outlined"&&(E&&typeof E.shrink<"u"&&(je.notched=E.shrink),je.label=_),Z&&((!le||!le.native)&&(je.id=void 0),je["aria-describedby"]=void 0);const _e=gp(g),Ke=h&&_e?`${_e}-helper-text`:void 0,Re=_&&_e?`${_e}-label`:void 0,ct=B7[V],ht=v.jsx(ct,A({"aria-describedby":Ke,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:m,multiline:P,name:L,rows:K,maxRows:k,minRows:R,type:ce,value:H,id:_e,inputRef:y,onBlur:$,onChange:j,onFocus:N,placeholder:F,inputProps:b},je,w));return v.jsxs(z7,A({className:Fe(He.root,a),disabled:u,error:d,fullWidth:m,ref:n,required:z,color:l,variant:V,ownerState:Oe},ae,{children:[_!=null&&_!==""&&v.jsx(XO,A({htmlFor:_e,id:Re},E,{children:_})),Z?v.jsx(El,A({"aria-describedby":Ke,id:_e,labelId:Re,value:H,input:ht},le,{children:s})):ht,h&&v.jsx(GW,A({id:Ke},f,{children:h}))]}))});function W7(e,t){for(var n=0;nr[e]:r=>{for(var i=r,o=0;o"u")return i}return i}}function rn(e){return Object.assign({},e)}function q7(e){return Object.keys(e)[0]}function Hm(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=>Hm(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]=Hm(e[r],t)}),n}return e}function h1(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]=h1(e[n]);return t}var r={};for(var i in e)r[i]=h1(e[i]);return r}var ro=h1;function Ls(e,t,n){return Object.defineProperty(e,t,{get:function(){return n}}),n}var qx=1;function Vu(){return{lwt:qx}}function No(){return""}function Y7(e){return Object.assign({},e,{_meta:void 0,_deleted:void 0,_rev:void 0})}function Q7(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 Oa([...this.words])}}const X7={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("")}},J7={parse(e){const t=e.length,n=[];for(let r=0;r>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new Oa(n,t)}},Z7={parse(e){return J7.parse(unescape(encodeURIComponent(e)))}};class eH{constructor(){this._data=new Oa,this._nDataBytes=0,this._minBufferSize=0,this.blockSize=512/32}reset(){this._data=new Oa,this._nDataBytes=0}_append(t){typeof t=="string"&&(t=Z7.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=ul[f-2],R=(k<<15|k>>>17)^(k<<13|k>>>19)^k>>>10;ul[f]=_+ul[f-7]+R+ul[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+nH[f]+ul[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 iH(e){return new rH().finalize(e).toString()}function oH(e){return Promise.resolve(iH(e))}async function sH(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 aH=typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof crypto.subtle.digest=="function",ij=aH?sH:oH;function lH(){return new Promise(e=>setTimeout(e,0))}function oj(e=0){return new Promise(t=>setTimeout(t,e))}function cH(e){return e&&typeof e.then=="function"?e:Promise.resolve(e)}var Fv=Promise.resolve(!0),Qo=Promise.resolve(!1),uH=Promise.resolve(null),_i=Promise.resolve();function zv(e=1e4){return typeof requestIdleCallback=="function"?new Promise(t=>{requestIdleCallback(()=>t(),{timeout:e})}):oj(0)}var m0=_i;function dH(e=void 0){return m0=m0.then(()=>zv(e)),m0}function fH(e,t){return e.reduce((n,r)=>n.then(r),Promise.resolve(t))}var pH=/\./g,Vk="abcdefghijklmnopqrstuvwxyz";function ic(e=10){for(var t="",n=0;n{var t=typeof e;return e!==null&&(t==="object"||t==="function")},g0=new Set(["__proto__","prototype","constructor"]),hH=new Set("0123456789");function aj(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(g0.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(g0.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"&&!hH.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(g0.has(n))return[];t.push(n);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}function lj(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 mH(e,t){if(lj(e,t))throw new Error("Cannot use string index")}function Da(e,t,n){if(Array.isArray(t)&&(t=t.join(".")),!t.includes(".")&&!t.includes("["))return e[t];if(!m1(e)||typeof t!="string")return n===void 0?e:n;var r=aj(t);if(r.length===0)return n;for(var i=0;i"u")throw new Error("missing value from map "+t);return n}function zs(e,t,n,r){var i=e.get(t);return typeof i>"u"&&(i=n(),e.set(t,i)),i}function ln(e){var t=e.split("-"),n="RxDB";return t.forEach(r=>{n+=sj(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 Kk(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 v0=0;function sr(){var e=Date.now();e=e+.01,e<=v0&&(e=v0+.01);var t=parseFloat(e.toFixed(2));return v0=t,t}function bt(e,t){if(!e)throw t||(t=""),new Error("ensureNotFalsy() is falsy: "+t);return e}var Yx={bufferSize:1,refCount:!0},uj="15.31.1",y0={},gH="6da4936d1425ff3a5c44c02342c6daf791d266be3ae8479b8ec59e261df41b93";function g1(e){return g1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g1(e)}function vH(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function dj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dj=function(){return!!e})()}function yH(e,t,n){if(dj())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&zf(i,n.prototype),i}function Km(e){var t=typeof Map=="function"?new Map:void 0;return Km=function(r){if(r===null||!vH(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 yH(r,arguments,g1(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),zf(i,r)},Km(e)}var yn={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 bH(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 fj(e,t,n){return"RxError ("+t+`): -`+e+` -`+bH(n)}var wH=function(e){function t(r,i,o={}){var s,a=fj(i,r,o);return s=e.call(this,a)||this,s.code=r,s.message=a,s.url=Qx(r),s.parameters=o,s.rxdb=!0,s}vp(t,e);var n=t.prototype;return n.toString=function(){return this.message},Qa(t,[{key:"name",get:function(){return"RxError ("+this.code+")"}},{key:"typeError",get:function(){return!1}}])}(Km(Error)),xH=function(e){function t(r,i,o={}){var s,a=fj(i,r,o);return s=e.call(this,a)||this,s.code=r,s.message=a,s.url=Qx(r),s.parameters=o,s.rxdb=!0,s}vp(t,e);var n=t.prototype;return n.toString=function(){return this.message},Qa(t,[{key:"name",get:function(){return"RxTypeError ("+this.code+")"}},{key:"typeError",get:function(){return!0}}])}(Km(TypeError));function Qx(e){return"https://rxdb.info/errors.html?console=errors#"+e}function pj(e){return` - You can find out more about this error here: `+Qx(e)+" "}function st(e,t){return new wH(e,yn.tunnelErrorMessage(e)+pj(e),t)}function wi(e,t){return new xH(e,yn.tunnelErrorMessage(e)+pj(e),t)}function Uv(e){return e&&e.status===409?e:!1}var SH={409:"document write conflict",422:"schema validation error",510:"attachment data missing"};function _H(e){return st("COL20",{name:SH[e.status],document:e.documentId,writeError:e})}var Kf={preAddRxPlugin:[],preCreateRxDatabase:[],createRxDatabase:[],preCreateRxCollection:[],createRxCollection:[],createRxState:[],postDestroyRxCollection:[],postRemoveRxCollection:[],preCreateRxSchema:[],createRxSchema:[],preCreateRxQuery:[],prePrepareQuery:[],createRxDocument:[],postCreateRxDocument:[],preCreateRxStorageInstance:[],preStorageWrite:[],preMigrateDocument:[],postMigrateDocument:[],preDestroyRxDatabase:[],postRemoveRxDatabase:[],postCleanup:[],preReplicationMasterWrite:[],preReplicationMasterWriteDocumentsHandle:[]};function io(e,t){Kf[e].length>0&&Kf[e].forEach(n=>n(t))}function Ba(e,t){return Promise.all(Kf[e].map(n=>n(t)))}function ju(e,t){var n=t;n=n.replace(pH,".properties."),n="properties."+n,n=Bd(n);var r=Da(e,n);return r}function CH(e,t,n){if(typeof t.primaryKey=="string")return n;var r=Xa(t,n),i=n[e];if(i&&i!==r)throw st("DOC19",{args:{documentData:n,existingPrimary:i,newPrimary:r},schema:t});return n[e]=r,n}function Ni(e){return typeof e=="string"?e:e.key}function kH(e){var t=Ni(e.primaryKey),n=ju(e,t);return bt(n.maxLength)}function Xa(e,t){if(typeof e.primaryKey=="string")return t[e.primaryKey];var n=e.primaryKey;return n.fields.map(r=>{var i=Da(t,r);if(typeof i>"u")throw st("DOC18",{args:{field:r,documentData:t}});return i}).join(n.separator)}function EH(e){var t=Hm(e,!0);return t}function RH(e){return["_deleted",e]}function Wv(e){e=rn(e);var t=Ni(e.primaryKey);e.properties=rn(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=PH,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=hj(e);ql(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=Kx(o)?o.slice(0):[o];return s.includes(t)||s.push(t),s[0]!=="_deleted"&&s.unshift("_deleted"),s});r.length===0&&r.push(RH(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 PH={type:"object",properties:{lwt:{type:"number",minimum:qx,maximum:1e15,multipleOf:.01}},additionalProperties:!0,required:["lwt"]};function hj(e){var t=Object.keys(e.properties).filter(r=>e.properties[r].final),n=Ni(e.primaryKey);return t.push(n),typeof e.primaryKey!="string"&&e.primaryKey.fields.forEach(r=>t.push(r)),t}function TH(e,t){for(var n=Object.keys(e.defaultValues),r=0;r"u")&&(t[i]=e.defaultValues[i])}return t}var mj=function(){function e(n,r){this.jsonSchema=n,this.hashFunction=r,this.indexes=OH(this.jsonSchema),this.primaryPath=Ni(this.jsonSchema.primaryKey),this.finalFields=hj(this.jsonSchema)}var t=e.prototype;return t.validateChange=function(r,i){this.finalFields.forEach(o=>{if(!Vm(r[o],i[o]))throw st("DOC9",{dataBefore:r,dataAfter:i,fieldName:o,schema:this.jsonSchema})})},t.getDocumentPrototype=function(){var r={},i=ju(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})}),Ls(this,"getDocumentPrototype",()=>r),r},t.getPrimaryOfDocumentData=function(r){return Xa(this.jsonSchema,r)},Qa(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),Ls(this,"defaultValues",n)}},{key:"hash",get:function(){return Ls(this,"hash",this.hashFunction(JSON.stringify(this.jsonSchema)))}}])}();function OH(e){return(e.indexes||[]).map(t=>Kx(t)?t:[t])}function jH(e,t,n=!0){n&&io("preCreateRxSchema",e);var r=Wv(e);r=EH(r),yn.deepFreezeWhenDevMode(r);var i=new mj(r,t);return io("createRxSchema",i),i}function jn(e){return typeof e=="function"}function LH(e){return jn(e==null?void 0:e.lift)}function Qs(e){return function(t){if(LH(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 v1=function(e,t){return v1=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])},v1(e,t)};function oc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");v1(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function IH(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 gj(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 Yl(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 Ql(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 au?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 NH(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 Lu=="function"?Lu(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 vj=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function yj(e){return jn(e==null?void 0:e.then)}function Xx(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 b0=Xx(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 y1(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Gv=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=Lu(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(jn(u))try{u()}catch(g){o=g instanceof b0?g.errors:[g]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=Lu(d),m=f.next();!m.done;m=f.next()){var h=m.value;try{qk(h)}catch(g){o=o??[],g instanceof b0?o=Ql(Ql([],Yl(o)),Yl(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 b0(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)qk(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)&&y1(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&y1(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),bj=Gv.EMPTY;function wj(e){return e instanceof Gv||e&&"closed"in e&&jn(e.remove)&&jn(e.add)&&jn(e.unsubscribe)}function qk(e){jn(e)?e():e.unsubscribe()}var xj={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Sj={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?bj:(this.currentObservers=null,a.push(n),new Gv(function(){r.currentObservers=null,y1(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 li;return n.source=this,n},t.create=function(n,r){return new Jk(n,r)},t}(li),Jk=function(e){oc(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:bj},t}(Pn);function Zk(){for(var e=[],t=0;t0&&(u=new Iu({next:function(R){return k.next(R)},error:function(R){g=!0,E(),d=x0(b,i,R),k.error(R)},complete:function(){h=!0,E(),d=x0(b,s),k.complete()}}),Ja(y).subscribe(u))})(c)}}function x0(e,t){for(var n=[],r=2;r!!e.queryParams.limit,IV=e=>e.queryParams.limit===1,MV=e=>!!(e.queryParams.skip&&e.queryParams.skip>0),NV=e=>e.changeEvent.operation==="DELETE",$V=e=>e.changeEvent.operation==="INSERT",AV=e=>e.changeEvent.operation==="UPDATE",DV=e=>Bj(e)&&e.previousResults.length>=e.queryParams.limit,BV=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)},UV=e=>{const t=rS(e.previousResults);return!!(t&&t[e.queryParams.primaryKey]===e.changeEvent.id)},WV=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},GV=e=>{const t=e.changeEvent.previous;if(!t)return!1;const n=rS(e.previousResults);return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)>0:!1},HV=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},VV=e=>{const t=e.changeEvent.doc;if(!t)return!1;const n=rS(e.previousResults);return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)>0:!1},KV=e=>{const t=e.changeEvent.previous;return t?e.queryParams.queryMatcher(t):!1},qV=e=>{const t=e.changeEvent.doc;return t?e.queryParams.queryMatcher(t):!1},YV=e=>e.previousResults.length===0,QV={0:$V,1:AV,2:NV,3:Bj,4:IV,5:MV,6:YV,7:DV,8:zV,9:UV,10:BV,11:FV,12:WV,13:GV,14:HV,15:VV,16:KV,17:qV};function XV(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 JV=e=>{},iS=e=>{e.previousResults.unshift(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},oS=e=>{e.previousResults.push(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},sS=e=>{const t=e.previousResults.shift();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},aS=e=>{const t=e.previousResults.pop();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},ZV=e=>{sS(e),oS(e)},eK=e=>{aS(e),iS(e)},tK=e=>{sS(e),iS(e)},nK=e=>{aS(e),oS(e)},Fj=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))},zj=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;XV(e.previousResults,n,e.queryParams.sortComparator,0)},oK=e=>{Fj(e),zj(e)},sK=e=>{throw new Error("Action runFullQueryAgain must be implemented by yourself")},aK=e=>{throw new Error("Action unknownAction should never be called")},lK=["doNothing","insertFirst","insertLast","removeFirstItem","removeLastItem","removeFirstInsertLast","removeLastInsertFirst","removeFirstInsertFirst","removeLastInsertLast","removeExisting","replaceExisting","alwaysWrong","insertAtSortPosition","removeExistingAndInsertAtSortPosition","runFullQueryAgain","unknownAction"],cK={doNothing:JV,insertFirst:iS,insertLast:oS,removeFirstItem:sS,removeLastItem:aS,removeFirstInsertLast:ZV,removeLastInsertFirst:eK,removeFirstInsertFirst:tK,removeLastInsertLast:nK,removeExisting:Fj,replaceExisting:rK,alwaysWrong:iK,insertAtSortPosition:zj,removeExistingAndInsertAtSortPosition:oK,runFullQueryAgain:sK,unknownAction:aK},uK=40;function S0(e){return e.charCodeAt(0)-uK}function dK(e){return e?"1":"0"}function tE(e,t){const n=[];for(let r=0,i=e.length;rpK(mK(),QV,e);function vK(e){const t=gK(e);return lK[t]}function yK(e,t,n,r,i){const o=cK[e];return o({queryParams:t,changeEvent:n,previousResults:r,keyDocumentMap:i}),r}var lu="￿",cu=Number.MIN_SAFE_INTEGER;function bK(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=ju(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?cu:lu;k={startKey:R,endKey:d?lu:cu,inclusiveStart:!0,inclusiveEnd:!0}}else _.forEach(P=>{if(lS.has(P)){var L=y[P],$=_K(P,L);k=Object.assign(k,$)}});return typeof k.startKey>"u"&&(k.startKey=cu),typeof k.endKey>"u"&&(k.endKey=lu),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:SK(u,t.selector,h,g)},b=CK(e,t,E);(b>=l||t.index)&&(l=b,c=E)}),!c)throw st("SNH",{query:t});return c}var lS=new Set(["$eq","$gt","$gte","$lt","$lte"]),wK=new Set(["$eq","$gt","$gte"]),xK=new Set(["$eq","$lt","$lte"]);function SK(e,t,n,r){var i=Object.entries(t),o=i.find(([P,L])=>{if(!e.includes(P))return!0;var $=Object.entries(L).find(([j,N])=>!lS.has(j));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=>wK.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=>xK.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 _K(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 CK(e,t,n){var r=0,i=u=>{u>0&&(r=r+u)},o=10,s=h0(n.startKeys,u=>u!==cu&&u!==lu);i(s*o);var a=h0(n.startKeys,u=>u!==lu&&u!==cu);i(a*o);var l=h0(n.startKeys,(u,d)=>u===n.endKeys[d]);i(l*o*1.5);var c=n.sortSatisfiedByIndex?5:0;return i(c),r}class Ku extends Error{}const kK=2147483647,EK=-2147483648,RK=Number.MAX_SAFE_INTEGER,PK=Number.MIN_SAFE_INTEGER,Jl=Symbol("missing"),Uj=Object.freeze(new Error("mingo: cycle detected while processing object/array")),TK="[object Object]",OK=/^\[object ([a-zA-Z0-9]+)\]$/,Vv=e=>{const t=$K(e);let n=0,r=t.length;for(;r;)n=(n<<5)-n^t.charCodeAt(--r);return n>>>0},Wj=new Set(["null","undefined","boolean","number","string","date","regexp"]),jK={null:0,undefined:0,number:1,string:2,object:3,array:4,boolean:5,date:6,regexp:7,function:8},$o=(e,t)=>{e===Jl&&(e=void 0),t===Jl&&(t=void 0);const[n,r]=[e,t].map(i=>jK[Yf(i).toLowerCase()]);return n!==r?n-r:n===1||n===2||n===6?et?1:0:Fa(e,t)?0:et?1:0};function Xi(e,t){if(!e)throw new Ku(t)}const Yf=e=>OK.exec(Object.prototype.toString.call(e))[1],C0=e=>typeof e=="boolean",Us=e=>typeof e=="string",ga=e=>!isNaN(e)&&typeof e=="number",Cr=Array.isArray,qn=e=>{if(!e)return!1;const t=Object.getPrototypeOf(e);return(t===Object.prototype||t===null)&&TK===Object.prototype.toString.call(e)},Kv=e=>e===Object(e),b1=e=>e instanceof Date,of=e=>e instanceof RegExp,Gj=e=>typeof e=="function",lr=e=>e==null,Mu=(e,t)=>e.includes(t),Hj=(e,t)=>!Mu(e,t),LK=(e,t=!0)=>!!e||t&&e==="",qu=e=>lr(e)||Us(e)&&!e||e instanceof Array&&e.length===0||qn(e)&&Object.keys(e).length===0,nE=e=>e===Jl,_p=e=>e instanceof Array?e:[e],La=(e,t)=>!!e&&Object.prototype.hasOwnProperty.call(e,t),cS=e=>typeof ArrayBuffer<"u"&&ArrayBuffer.isView(e),IK=[b1,of,cS],w1=(e,t)=>{if(lr(e))return e;if(t.has(e))throw Uj;const n=e.constructor;if(IK.some(r=>r(e)))return new n(e);try{if(t.add(e),Cr(e))return e.map(r=>w1(r,t));if(qn(e)){const r={};for(const i in e)r[i]=w1(e[i],t);return r}}finally{t.delete(e)}return e},rE=e=>w1(e,new Set),MK=(e,t)=>qn(e)&&qn(t)||Cr(e)&&Cr(t);function x1(e,t,n){if(n=n||{flatten:!1},nE(e)||lr(e))return t;if(nE(t)||lr(t))return e;if(!MK(e,t)){if(n.skipValidation)return t||e;throw Error("mismatched types. must both be array or object")}if(n.skipValidation=!0,Cr(e)){const r=e,i=t;if(n.flatten){let o=0,s=0;for(;o{const o=qj(r,t);n.has(o)?n.get(o).some(s=>Fa(e[s],r))||n.get(o).push(i):n.set(o,[i])}),n}function Vj(e,t=Vv){if(e.some(a=>a.length==0))return[];if(e.length===1)return Array.from(e);const n=AK(e.map((a,l)=>[l,a.length]),a=>a[1]),r=e[n[0][0]],i=iE(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 Fa(w,_)&&(u[y]++,hm===e.length-1?[c[h],d[h]]:Jl).filter(m=>m!==Jl))}),s.sort((a,l)=>{const[c,[u,d]]=a,[f,[m,h]]=l,g=$o(u,m);return g!==0?g:$o(d,h)}).map(a=>a[0])}function Kj(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 NK=e=>{let[t,n]=[Object.getPrototypeOf(e),Object.getOwnPropertyNames(e)],r=t;for(;!n.length&&t!==Object.prototype&&t!==Array.prototype;)r=t,n=Object.getOwnPropertyNames(t),t=Object.getPrototypeOf(t);const i={};return n.forEach(o=>i[o]=e[o]),[i,r]};function Fa(e,t){if(e===t||Object.is(e,t))return!0;const n=!!e&&e.constructor||e;if(e===null||t===null||e===void 0||t===void 0||n!==t.constructor||n===Function)return!1;if(n===Array||n===Object){const o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length||new Set([...o,...s]).size!=o.length)return!1;for(const a of o)if(!Fa(e[a],t[a]))return!1;return!0}const r=Object.getPrototypeOf(e);return(cS(e)||r!==Object.prototype&&r!==Array.prototype&&Object.prototype.hasOwnProperty.call(r,"toString"))&&e.toString()===t.toString()}const Zh=(e,t)=>{if(e===null)return"null";if(e===void 0)return"undefined";const n=e.constructor;switch(n){case RegExp:case Number:case Boolean:case Function:case Symbol:return e.toString();case String:return JSON.stringify(e);case Date:return e.toISOString()}if(cS(e))return n.name+"["+e.toString()+"]";if(t.has(e))throw Uj;try{if(t.add(e),Cr(e))return"["+e.map(s=>Zh(s,t)).join(",")+"]";if(n===Object)return"{"+Object.keys(e).sort().map(s=>s+":"+Zh(e[s],t)).join(",")+"}";const r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==Array.prototype&&Object.prototype.hasOwnProperty.call(r,"toString"))return n.name+"("+JSON.stringify(e.toString())+")";const[i,o]=NK(e);return n.name+Zh(i,t)}finally{t.delete(e)}},$K=e=>Zh(e,new Set);function qj(e,t){return t=t||Vv,lr(e)?null:t(e).toString()}function AK(e,t,n=$o){if(qu(e))return e;const r=new Array,i=new Array;for(let o=0;on(o[0],s[0])),Cp(i,r.map(o=>o[1]))}function DK(e,t,n=Vv){if(e.length<1)return new Map;const r=new Map,i=new Map;for(let o=0;oFa(u,a)):null;lr(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 k0=5e4;function Cp(e,...t){return e instanceof Array?t.reduce((n,r)=>{let i=Math.ceil(r.length/k0),o=0;for(;i-- >0;)Array.prototype.push.apply(n,r.slice(o,o+k0)),o+=k0;return n},e):t.filter(Kv).reduce((n,r)=>(Object.assign(n,r),n),e)}function S1(e,t){return Kv(e)?e[t]:void 0}function BK(e,t){if(t<1)return e;for(;t--&&e.length===1;)e=e[0];return e}function uS(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=S1(l,u);if(l===void 0)break}return l}const o=Wj.has(Yf(e).toLowerCase())?e:i(e,t.split("."));return o instanceof Array&&(n!=null&&n.unwrapArray)?BK(o,r):o}function em(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=S1(e,Number(i)),a&&(l=em(l,o,n)),l=[l];else{l=[];for(const u of e)c=em(u,t,n),n!=null&&n.preserveMissing?(c===void 0&&(c=Jl),l.push(c)):c!==void 0&&l.push(c)}else{if(c=S1(e,i),a&&(c=em(c,o,n)),c===void 0)return;l=n!=null&&n.preserveKeys?{...e}:{},l[i]=c}return l}function _1(e){if(e instanceof Array)for(let t=e.length-1;t>=0;t--)e[t]===Jl?e.splice(t,1):_1(e[t]);else if(qn(e))for(const t in e)La(e,t)&&_1(e[t])}const oE=/^\d+$/;function qm(e,t,n,r){const i=t.split("."),o=i[0],s=i.slice(1).join(".");if(i.length===1)(qn(e)||Cr(e)&&oE.test(o))&&n(e,o);else{r!=null&&r.buildGraph&&lr(e[o])&&(e[o]={});const a=e[o];if(!a)return;const l=!!(i.length>1&&oE.test(i[1]));a instanceof Array&&(r!=null&&r.descendArray)&&!l?a.forEach(c=>qm(c,s,n,r)):qm(a,s,n,r)}}function FK(e,t,n){qm(e,t,(r,i)=>{r[i]=Gj(n)?n(r[i]):n},{buildGraph:!0})}function sE(e,t,n){qm(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)qn(o)&&delete o[i]}else qn(r)&&delete r[i]},n)}const zK=/^\$[a-zA-Z0-9_]+$/;function Yu(e){return zK.test(e)}function Yj(e){if(Wj.has(Yf(e).toLowerCase()))return of(e)?{$regex:e}:{$eq:e};if(Kv(e)){if(!Object.keys(e).some(Yu))return{$eq:e};if(La(e,"$regex")){const n={...e};return n.$regex=new RegExp(e.$regex,e.$options),delete n.$options,n}}return e}var Fd=(e=>(e.CLONE_ALL="CLONE_ALL",e.CLONE_INPUT="CLONE_INPUT",e.CLONE_OUTPUT="CLONE_OUTPUT",e.CLONE_OFF="CLONE_OFF",e))(Fd||{});class Il{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 Il?new Il(t._opts,lr(t.root)?n:t.root,Object.assign({},t.local,r)):new Il(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?void 0:r.variables,n==null?void 0:n.variables)}),this}getOptions(){return Object.freeze({...this._opts,context:Zl.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?void 0:t.collation}get processingMode(){var t;return((t=this._opts)==null?void 0:t.processingMode)||"CLONE_OFF"}get useStrictMode(){var t;return(t=this._opts)==null?void 0:t.useStrictMode}get scriptEnabled(){var t;return(t=this._opts)==null?void 0:t.scriptEnabled}get useGlobalContext(){var t;return(t=this._opts)==null?void 0:t.useGlobalContext}get hashFunction(){var t;return(t=this._opts)==null?void 0:t.hashFunction}get collectionResolver(){var t;return(t=this._opts)==null?void 0:t.collectionResolver}get jsonSchemaValidator(){var t;return(t=this._opts)==null?void 0:t.jsonSchemaValidator}get variables(){var t;return(t=this._opts)==null?void 0:t.variables}get context(){var t;return(t=this._opts)==null?void 0:t.context}}function Qj(e){return e instanceof Il?e.getOptions():Object.freeze({idKey:"_id",scriptEnabled:!0,useStrictMode:!0,useGlobalContext:!0,processingMode:"CLONE_OFF",...e,context:e!=null&&e.context?Zl.from(e==null?void 0:e.context):Zl.init({})})}var Nu=(e=>(e.ACCUMULATOR="accumulator",e.EXPRESSION="expression",e.PIPELINE="pipeline",e.PROJECTION="projection",e.QUERY="query",e.WINDOW="window",e))(Nu||{});class Zl{constructor(t){this.operators={accumulator:{},expression:{},pipeline:{},projection:{},query:{},window:{}};for(const[n,r]of Object.entries(t))this.addOperators(n,r)}static init(t={}){return new Zl(t)}static from(t){return new Zl(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("accumulator",t)}addExpressionOps(t){return this.addOperators("expression",t)}addQueryOps(t){return this.addOperators("query",t)}addPipelineOps(t){return this.addOperators("pipeline",t)}addProjectionOps(t){return this.addOperators("projection",t)}addWindowOps(t){return this.addOperators("window",t)}getOperator(t,n){return t in this.operators&&this.operators[t][n]||null}}const vl=Zl.init();function aE(e,t){for(const[n,r]of Object.entries(t)){Xi(Gj(r)&&Yu(n),`'${n}' is not a valid operator`);const i=Ml(e,n,null);Xi(!i||r===i,`${n} already exists for '${e}' operators. Cannot change operator function once registered.`)}switch(e){case"accumulator":vl.addAccumulatorOps(t);break;case"expression":vl.addExpressionOps(t);break;case"pipeline":vl.addPipelineOps(t);break;case"projection":vl.addProjectionOps(t);break;case"query":vl.addQueryOps(t);break;case"window":vl.addWindowOps(t);break}}function Ml(e,t,n){const{context:r,useGlobalContext:i}=n||{},o=r?r.getOperator(e,t):null;return!o&&i?vl.getOperator(e,t):o}const lE={$$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)}},C1={$$KEEP(e,t,n){return e},$$PRUNE(e,t,n){},$$DESCEND(e,t,n){if(!La(t,"$cond"))return e;let r;for(const[i,o]of Object.entries(e))if(Kv(o)){if(o instanceof Array){const s=[];for(let a of o)qn(a)&&(a=cE(a,t,n.update(a))),lr(a)||s.push(a);r=s}else r=cE(o,t,n.update(o));lr(r)?delete e[i]:e[i]=r}return e}};function Yo(e,t,n,r){var o;const i=Il.init(r,e);if(n=n||"",Yu(n)){const s=Ml("expression",n,r);if(s)return s(e,t,i);const a=Ml("accumulator",n,r);if(a)return e instanceof Array||(e=Yo(e,t,null,i),t=null),Xi(e instanceof Array,`'${n}' target must be an array.`),a(e,t,i.update(null,i.local));throw new Ku(`operator '${n}' is not registered`)}if(Us(t)&&t.length>0&&t[0]==="$"){if(La(C1,t))return t;let s=i.root;const a=t.split(".");if(La(lE,a[0]))s=lE[a[0]](e,null,i),t=t.slice(a[0].length+1);else if(a[0].slice(0,2)==="$$"){s=Object.assign({},i.variables,{this:e},(o=i.local)==null?void 0:o.variables);const l=a[0].slice(2);Xi(La(s,l),`Use of undefined variable: ${l}`),t=t.slice(2)}else t=t.slice(1);return t===""?s:uS(s,t)}if(Cr(t))return t.map(s=>Yo(e,s,null,i));if(qn(t)){const s={};for(const[a,l]of Object.entries(t))if(s[a]=Yo(e,l,a,i),["expression","accumulator"].some(c=>!!Ml(c,a,r)))return Xi(Object.keys(t).length===1,"Invalid aggregation expression '"+JSON.stringify(t)+"'"),s[a];return s}return t}function cE(e,t,n){const r=Yo(e,t,null,n);return La(C1,r)?C1[r](e,t,n):r}function $u(e){return e instanceof uE?e:new uE(e)}function UK(...e){let t=0;return $u(()=>{for(;t{const i=r.next();if(i.done)throw k1;return i.value}}else if(t instanceof Array){const r=t,i=r.length;let o=0;n=()=>{if(o0?this.push(2,t):this}drop(t){return t>0?this.push(3,t):this}transform(t){const n=this;let r;return $u(()=>(r||(r=$u(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 VK{constructor(t,n){this.pipeline=t,this.options=Qj(n)}stream(t){let n=$u(t);const r=this.options.processingMode;(r==Fd.CLONE_ALL||r==Fd.CLONE_INPUT)&&n.map(rE);const i=new Array;if(!qu(this.pipeline))for(const o of this.pipeline){const s=Object.keys(o),a=s[0],l=Ml(Nu.PIPELINE,a,this.options);Xi(s.length===1&&!!l,`invalid pipeline operator ${a}`),i.push(a),n=l(n,o[a],this.options)}return(r==Fd.CLONE_OUTPUT||r==Fd.CLONE_ALL&&Vj([["$group","$unwind"],i]).length)&&n.map(rE),n}run(t){return this.stream(t).value()}}class KK{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:(qn(this.projection)&&this.operators.push({$project:this.projection}),this.result=$u(this.source).filter(this.predicate),this.operators.length>0&&(this.result=new VK(this.operators,this.options).stream(this.result)),this.result)}fetchAll(){const t=$u([...this.buffer]);return this.buffer=[],UK(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={...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 kp{constructor(t,n){this.condition=t,this.options=Qj(n),this.compiled=[],this.compile()}compile(){Xi(qn(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(Mu(["$and","$or","$nor","$expr","$jsonSchema"],n))this.processOperator(n,n,r);else{Xi(!Yu(n),`unknown top level operator: ${n}`);for(const[i,o]of Object.entries(Yj(r)))this.processOperator(n,i,o)}t.field&&this.processOperator(t.field,t.field,t.expr)}}processOperator(t,n,r){const i=Ml(Nu.QUERY,n,this.options);if(!i)throw new Ku(`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 qK=(e,t,n)=>{if(qu(t)||!qn(t))return e;let r=$o;const i=n.collation;return qn(i)&&Us(i.locale)&&(r=QK(i)),e.transform(o=>{const s=Object.keys(t);for(const a of s.reverse()){const l=DK(o,u=>uS(u,a),n.hashFunction),c=Array.from(l.keys()).sort(r);t[a]===-1&&c.reverse(),o=[],c.reduce((u,d)=>Cp(u,l.get(d)),o)}return o})},YK={1:"base",2:"accent",3:"variant"};function QK(e){const t={sensitivity:YK[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(!Us(r)||!Us(i))return $o(r,i);const o=n.compare(r,i);return o<0?-1:o>0?1:0}}function Kr(e){const t=(n,r,i)=>{const o={unwrapArray:!0},s=Math.max(1,n.split(".").length-1);return a=>{const l=uS(a,n,o);return e(l,r,{...i,depth:s})}};return t.op="query",t}function Xj(e,t,n){if(Fa(e,t)||lr(e)&&lr(t))return!0;if(e instanceof Array){const r=Fa.bind(null,t);return e.some(r)||Kj(e,n==null?void 0:n.depth).some(r)}return!1}function XK(e,t,n){return!Xj(e,t,n)}function Jj(e,t,n){return lr(e)?t.some(r=>r===null):Vj([_p(e),t],n==null?void 0:n.hashFunction).length>0}function JK(e,t,n){return!Jj(e,t,n)}function ZK(e,t,n){return qv(e,t,(r,i)=>$o(r,i)<0)}function eq(e,t,n){return qv(e,t,(r,i)=>$o(r,i)<=0)}function tq(e,t,n){return qv(e,t,(r,i)=>$o(r,i)>0)}function nq(e,t,n){return qv(e,t,(r,i)=>$o(r,i)>=0)}function rq(e,t,n){return _p(e).some(r=>t.length===2&&r%t[0]===t[1])}function iq(e,t,n){const r=_p(e),i=o=>Us(o)&&LK(t.exec(o),n==null?void 0:n.useStrictMode);return r.some(i)||Kj(r,1).some(i)}function oq(e,t,n){return(t===!1||t===0)&&e===void 0||(t===!0||t===1)&&e!==void 0}function sq(e,t,n){if(!Cr(e)||!Cr(t)||!e.length||!t.length)return!1;let r=!0;for(const i of t){if(!r)break;qn(i)&&Mu(Object.keys(i),"$elemMatch")?r=Zj(e,i.$elemMatch,n):i instanceof RegExp?r=e.some(o=>typeof o=="string"&&i.test(o)):r=e.some(o=>Fa(i,o))}return r}function aq(e,t,n){return Array.isArray(e)&&e.length===t}function lq(e){return Yu(e)&&["$and","$or","$nor"].indexOf(e)===-1}function Zj(e,t,n){if(Cr(e)&&!qu(e)){let r=s=>s,i=t;Object.keys(t).every(lq)&&(i={temp:t},r=s=>({temp:s}));const o=new kp(i,n);for(let s=0,a=e.length;se===null,fE=e=>ga(e)&&e>=EK&&e<=kK&&e.toString().indexOf(".")===-1,pE=e=>ga(e)&&e>=PK&&e<=RK&&e.toString().indexOf(".")===-1,cq={array:Cr,bool:C0,boolean:C0,date:b1,decimal:ga,double:ga,int:fE,long:pE,number:ga,null:dE,object:qn,regex:of,regexp:of,string:Us,undefined:lr,function:e=>{throw new Ku("unsupported type key `function`.")},1:ga,2:Us,3:qn,4:Cr,6:lr,8:C0,9:b1,10:dE,11:of,16:fE,18:pE,19:ga};function hE(e,t,n){const r=cq[t];return r?r(e):!1}function uq(e,t,n){return Array.isArray(t)?t.findIndex(r=>hE(e,r))>=0:hE(e,t)}function qv(e,t,n){return _p(e).some(r=>Yf(r)===Yf(t)&&n(r,t))}const mE=(e,t)=>{const n={};return e.split("").forEach((r,i)=>n[r]=t*(i+1)),n};({...mE("ABCDEFGHIKLM",1),...mE("NOPQRSTUVWXY",-1)});const gE={undefined:null,null:null,NaN:NaN,Infinity:new Error,"-Infinity":new Error};function $i(e,t=gE){const n=Object.assign({},gE,t),r=new Set(Object.keys(n));return(i,o,s)=>{const a=Yo(i,o,null,s);if(r.has(`${a}`)){const l=n[`${a}`];if(l instanceof Error)throw new Ku(`cannot apply $${e.name} to -inf, value must in (-inf,inf)`);return l}return e(a)}}$i(Math.acos,{Infinity:1/0,0:new Error});$i(Math.acosh,{Infinity:1/0,0:new Error});$i(Math.asin);$i(Math.asinh,{Infinity:1/0,"-Infinity":-1/0});$i(Math.atan);$i(Math.atanh,{1:1/0,"-1":-1/0});$i(Math.cos);$i(Math.cosh,{"-Infinity":1/0,Infinity:1/0});const dq=Math.PI/180;$i(e=>e*dq,{Infinity:1/0,"-Infinity":1/0});const fq=180/Math.PI;$i(e=>e*fq,{Infinity:1/0,"-Infinity":-1/0});$i(Math.sin);$i(Math.sinh,{"-Infinity":-1/0,Infinity:1/0});$i(Math.tan);const pq=(e,t,n)=>{if(qu(t))return e;let r=Object.keys(t),i=!1;eL(t,n);const o=n.idKey;if(Mu(r,o)){const a=t[o];(a===0||a===!1)&&(r=r.filter(Hj.bind(null,[o])),i=r.length==0)}else r.push(o);const s=Il.init(n);return e.map(a=>E1(a,t,s.update(a),r,i))};function E1(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&&Mu([0,!1],d)&&(a=!0),c===n.idKey&&qu(d))u=e[c];else if(Us(d))u=Yo(e,d,c,n);else if(!Mu([1,!0],d))if(d instanceof Array)u=d.map(m=>{const h=Yo(e,m,null,n);return lr(h)?null:h});else if(qn(d)){const m=d,h=Object.keys(d),g=h.length==1?h[0]:"",E=Ml(Nu.PROJECTION,g,n);if(E)g==="$slice"?_p(m[g]).every(ga)?(u=E(e,m[g],c,n),s=!0):u=Yo(e,m,c,n):u=E(e,m[g],c,n);else if(Yu(g))u=Yo(e,m[g],g,n);else if(La(e,c)){eL(m,n);let b=e[c];b instanceof Array?u=b.map(w=>E1(w,m,n,h,!1)):(b=qn(b)?b:e,u=E1(b,m,n,h,!1))}else u=Yo(e,d,null,n)}else{l.push(c);continue}const f=em(e,c,{preserveMissing:!0});f!==void 0&&x1(o,f,{flatten:!0}),Hj([0,1,!1,!0],d)&&(u===void 0?sE(o,c,{descendArray:!0}):FK(o,c,u))}if(_1(o),(s||a||i)&&(o=Cp({},e,o),l.length>0))for(const c of l)sE(o,c,{descendArray:!0});return o}function eL(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),Xi(!(n[0]&&n[1]),"Projection cannot have a mix of inclusion and exclusion.")}}const hq=(e,t,n)=>{Xi(Cr(t),"Invalid expression: $and expects value to be an Array.");const r=t.map(i=>new kp(i,n));return i=>r.every(o=>o.test(i))},tL=(e,t,n)=>{Xi(Cr(t),"Invalid expression. $or expects value to be an Array");const r=t.map(i=>new kp(i,n));return i=>r.some(o=>o.test(i))},mq=(e,t,n)=>{Xi(Cr(t),"Invalid expression. $nor expects value to be an array.");const r=tL("$or",t,n);return i=>!r(i)},gq=(e,t,n)=>{const r={};r[e]=Yj(t);const i=new kp(r,n);return o=>!i.test(o)},vq=Kr(Xj),yq=Kr(tq),bq=Kr(nq),wq=Kr(Jj),xq=Kr(ZK),Sq=Kr(eq),_q=Kr(XK),Cq=Kr(JK),kq=Kr(rq),Eq=Kr(iq);Kr(sq);const Rq=Kr(Zj),Pq=Kr(aq),Tq=Kr(oq),Oq=Kr(uq);var vE=!1;function jq(e){return vE||(aE(Nu.PIPELINE,{$sort:qK,$project:pq}),aE(Nu.QUERY,{$and:hq,$eq:vq,$elemMatch:Rq,$exists:Tq,$gt:yq,$gte:bq,$in:wq,$lt:xq,$lte:Sq,$ne:_q,$nin:Cq,$mod:kq,$nor:mq,$not:gq,$or:tL,$regex:Eq,$size:Pq,$type:Oq}),vE=!0),new kp(e)}function Ym(e,t){var n=Ni(e.primaryKey);t=rn(t);var r=ro(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=Vf(r.index);i.includes(n)||i.push(n),r.index=i}if(r.sort){var l=r.sort.find(c=>q7(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=>lS.has(f)):d=!0,d&&o.add(c)});var s=-1,a;e.indexes.forEach(c=>{var u=Kx(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 nL(e,t){if(!t.sort)throw st("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:K7(o)})});var r=(i,o)=>{for(var s=0;sn.test(i);return r}async function Rd(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 Lq(e,t){return!t.sort||t.sort.length===0?[e]:t.sort.map(n=>Object.keys(n)[0])}var Iq=new WeakMap;function Mq(e){return zs(Iq,e,()=>{var t=e.collection,n=Ym(t.storageInstance.schema,ro(e.mangoQuery)),r=t.schema.primaryPath,i=nL(t.schema.jsonSchema,n),o=(c,u)=>{var d={docA:c,docB:u,rxQuery:e};return i(d.docA,d.docB)},s=dS(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:Lq(r,n),sortComparator:o,queryMatcher:a};return l})}function Nq(e,t){if(!e.collection.database.eventReduce)return{runFullQueryAgain:!0};var n=Mq(e),r=bt(e._result).docsData.slice(0),i=bt(e._result).docsDataMap,o=!1,s=t.map(l=>PV(l)).filter(rj),a=s.find(l=>{var c={queryParams:n,changeEvent:l,previousResults:r,keyDocumentMap:i},u=vK(c);if(u==="runFullQueryAgain")return!0;if(u!=="doNothing")return o=!0,yK(u,n,l,r,i),!1});return a?{runFullQueryAgain:!0}:{runFullQueryAgain:!1,changed:o,newResults:r}}var $q=function(){function e(){this._map=new Map}var t=e.prototype;return t.getByQuery=function(r){var i=r.toString();return zs(this._map,i,()=>r)},e}();function Aq(){return new $q}function yE(e,t){t.uncached=!0;var n=t.toString();e._map.delete(n)}function Dq(e){return e.refCount$.observers.length}var Bq=100,Fq=30*1e3,zq=(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=>yE(r,d))}}},rL=zq(Bq,Fq),E0=new WeakSet;function Uq(e){E0.has(e)||(E0.add(e),lH().then(()=>dH(200)).then(()=>{e.destroyed||e.cacheReplacementPolicy(e,e._queryCache),E0.delete(e)}))}var iL=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=Fs(this.cacheItemByDocId,r);return i[1]},t.getLatestDocumentDataIfExists=function(r){this.processTasks();var i=this.cacheItemByDocId.get(r);if(i)return i[1]},Qa(e,[{key:"getCachedRxDocuments",get:function(){var n=bE(this);return Ls(this,"getCachedRxDocuments",n)}},{key:"getCachedRxDocument",get:function(){var n=bE(this);return Ls(this,"getCachedRxDocument",r=>n([r])[0])}}])}();function bE(e){var t=e.primaryPath,n=e.cacheItemByDocId,r=e.registry,i=yn.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 oL(e,t){var n=e.getCachedRxDocuments;return n(t)}var Wq=typeof WeakRef=="function",Gq=Wq?Hq:Vq;function Hq(e){return new WeakRef(e)}function Vq(e){return{deref(){return e}}}var wE=function(){function e(n,r,i){this.time=sr(),this.query=n,this.count=i,this.documents=oL(this.query.collection._docCache,r)}var t=e.prototype;return t.getValue=function(r){var i=this.query.op;if(i==="count")return this.count;if(i==="findOne"){var o=this.documents.length===0?null:this.documents[0];if(!o&&r)throw st("QU10",{collection:this.query.collection.name,query:this.query.mangoQuery,op:i});return o}else return i==="findByIds"?this.docsMap:this.documents.slice(0)},Qa(e,[{key:"docsData",get:function(){return Ls(this,"docsData",this.documents.map(n=>n._data))}},{key:"docsDataMap",get:function(){var n=new Map;return this.documents.forEach(r=>{n.set(r.primary,r._data)}),Ls(this,"docsDataMap",n)}},{key:"docsMap",get:function(){for(var n=new Map,r=this.documents,i=0;i{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=Xq(this);return c.then(u=>(this._lastExecEnd=sr(),u))},t.exec=async function(r){if(r&&this.op!=="findOne")throw st("QU9",{collection:this.collection.name,query:this.mangoQuery,op:this.op});await xE(this);var i=bt(this._result);return i.getValue(r)},t.toString=function(){var r=Hm({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:Ym(this.collection.schema.jsonSchema,this.mangoQuery)};r.mangoQuery.selector._deleted={$eq:!1},r.mangoQuery.index&&r.mangoQuery.index.unshift("_deleted"),io("prePrepareQuery",r);var i=fS(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 Rd(this.asRxQuery,r=>r.incrementalRemove())},t.update=function(r){throw ln("update")},t.patch=function(r){return Rd(this.asRxQuery,i=>i.patch(r))},t.incrementalPatch=function(r){return Rd(this.asRxQuery,i=>i.incrementalPatch(r))},t.modify=function(r){return Rd(this.asRxQuery,i=>i.modify(r))},t.incrementalModify=function(r){return Rd(this.asRxQuery,i=>i.incrementalModify(r))},t.where=function(r){throw ln("query-builder")},t.sort=function(r){throw ln("query-builder")},t.skip=function(r){throw ln("query-builder")},t.limit=function(r){throw ln("query-builder")},Qa(e,[{key:"$",get:function(){if(!this._$){var n=this.collection.$.pipe(Gt(r=>!r.isLocal),Hv(null),os(()=>xE(this)),Kt(()=>this._result),nS(Yx),qf((r,i)=>!!(r&&r.time===bt(i).time)),Gt(r=>!!r),Kt(r=>bt(r).getValue()));this._$=OV(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=Ym(this.collection.schema.jsonSchema,this.mangoQuery);return Ls(this,"queryMatcher",dS(n,r))}},{key:"asRxQuery",get:function(){return this}}])}();function tm(){return{selector:{}}}function Yq(e){return e.collection._queryCache.getByQuery(e)}function Nc(e,t,n,r){io("preCreateRxQuery",{op:e,queryObj:t,collection:n,other:r});var i=new sL(e,t,n,r);return i=Yq(i),Uq(n),i}function aL(e){var t=e.asRxQuery.collection._changeEventBuffer.getCounter();return e._latestChangeEvent>=t}async function xE(e){return e.collection.awaitBeforeReads.size>0&&await Promise.all(Array.from(e.collection.awaitBeforeReads).map(t=>t())),e.collection.database.destroyed||aL(e)?!1:(e._ensureEqualQueue=e._ensureEqualQueue.then(()=>Qq(e)),e._ensureEqualQueue)}function Qq(e){if(e._lastEnsureEqual=sr(),e.collection.database.destroyed||aL(e))return Qo;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=bt(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=Nq(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||!Q7(e.collection.schema.primaryPath,l,e._result.docsData))&&(t=!0,e._setResultData(l)),t))):Promise.resolve(t)}function fS(e,t){if(!t.sort)throw st("SNH",{query:t});var n=bK(e,t);return{query:t,queryPlan:n}}async function Xq(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);ql(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 Jq(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 Zq="_rxdb_internal";async function Yv(e,t){var n=await e.findDocumentsById([t],!1),r=n[0];if(r)return r}async function Qv(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=Ni(e.schema.primaryKey),s=Ti(o,[t],r),a=s[0];return a}}function Qf(e){return Object.assign({},...e)}function Qm(e,t,n,r){if(r)throw r.status===409?st("CONFLICT",{collection:e.name,id:t,writeError:r,data:n}):r.status===422?st("VD2",{collection:e.name,id:t,writeError:r,data:n}):r}function eY(e,t,n,r,i,o,s){for(var a=!!e.schema.attachments,l=[],c=[],u=[],d=ic(10),f={id:d,events:[],checkpoint:null,context:i,startTime:sr(),endTime:0},m=f.events,h=[],g=[],E=[],b=n.size>0,w,y=r.length,_=function(){var R=r[k],P=R.document,L=R.previous,$=P[t],j=P._deleted,N=L&&L._deleted,F=void 0;b&&(F=n.get($));var z;if(F){var le=F._rev;if(!L||L&&le!==L._rev){var ce={isError:!0,status:409,documentId:$,writeRow:R,documentInDb:F};return u.push(ce),1}var H=a?R0(R):R;a&&(j?L&&Object.keys(L._attachments).forEach(je=>{g.push({documentId:$,attachmentId:je,digest:bt(L)._attachments[je].digest})}):(Object.entries(P._attachments).find(([je,_e])=>{var Ke=L?L._attachments[je]:void 0;return!Ke&&!_e.data&&(z={documentId:$,documentInDb:F,isError:!0,status:510,writeRow:R,attachmentId:je}),!0}),z||Object.entries(P._attachments).forEach(([je,_e])=>{var Ke=L?L._attachments[je]:void 0;if(!Ke)h.push({documentId:$,attachmentId:je,attachmentData:_e,digest:_e.digest});else{var Re=H.document._attachments[je].digest;_e.data&&Ke.digest!==Re&&E.push({documentId:$,attachmentId:je,attachmentData:_e,digest:_e.digest})}}))),z?u.push(z):(a?c.push(R0(H)):c.push(H),w=H);var V=null,ae=null,Oe=null;if(N&&!j)Oe="INSERT",V=a?Xo(P):P;else if(L&&!N&&!j)Oe="UPDATE",V=a?Xo(P):P,ae=L;else if(j)Oe="DELETE",V=bt(P),ae=L;else throw st("SNH",{args:{writeRow:R}});var He={documentId:$,documentData:V,previousDocumentData:ae,operation:Oe};m.push(He)}else{var K=!!j;if(a&&Object.entries(P._attachments).forEach(([je,_e])=>{_e.data?h.push({documentId:$,attachmentId:je,attachmentData:_e,digest:_e.digest}):(z={documentId:$,isError:!0,status:510,writeRow:R,attachmentId:je},u.push(z))}),z||(a?l.push(R0(R)):l.push(R),w=R),!K){var Z={documentId:$,operation:"INSERT",documentData:a?Xo(P):P,previousDocumentData:a&&L?Xo(L):L};m.push(Z)}}},k=0;k{t._attachments[n]=nY(r)}),t}function Ep(e){return Object.assign({},e,{_meta:rn(e._meta)})}var lL=new WeakMap;function pS(e,t,n){yn.deepFreezeWhenDevMode(n);var r=Ni(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=sr(),u=0;ut.bulkWrite(l,s)).then(h=>{var g={error:[]},E=Ti(r,l,h);lL.set(g,E);var b=h.error.length===0?[]:h.error.filter(y=>y.status===409&&!y.writeRow.previous&&!y.writeRow.document._deleted&&bt(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:Bs(e.token,y.documentInDb)})}));return e.lockedRun(()=>t.bulkWrite(w,s)).then(y=>{ql(g.error,y.error);var _=Ti(r,w,y);return ql(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(bt(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:Vu(),_rev:No(),_attachments:{}}),a=rn(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 rY(e){if(e.schema.keyCompression)throw st("UT5",{args:{params:e}});if(cL(e.schema))throw st("UT6",{args:{params:e}});if(e.schema.attachments&&e.schema.attachments.compression)throw st("UT7",{args:{params:e}})}function cL(e){return!!(e.encrypted&&e.encrypted.length>0||e.attachments&&e.attachments.encrypted)}function iY(e,t,n){var r=Ni(e.schema.primaryKey),i=n?n.lwt:qx,o=n?n.id:"";return Ym(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 uL(e,t,n){if(e.getChangedDocumentsSince)return e.getChangedDocumentsSince(t,n);var r=Ni(e.schema.primaryKey),i=fS(e.schema,iY(e,t,n)),o=await e.query(i),s=o.documents,a=G7(s);return{documents:s,checkpoint:a?{id:a[r],lwt:a._meta.lwt}:n||{id:"",lwt:0}}}function Ti(e,t,n){var r=lL.get(n);if(r)return r;var i=[];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};bt(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=oY(a.map(d=>d.lastKnownDocumentState)),c=l;for(var u of a)try{c=await u.modifier(ro(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(Ti(this.primaryPath,r,o).map(s=>{var a=s[this.primaryPath];this.postWrite(s);var l=Fs(i,a);l.forEach(c=>c.resolve(s))})),o.error.forEach(s=>{var a=s.documentId,l=Fs(i,a),c=Uv(s);if(c){var u=zs(this.queueByDocId,a,()=>[]);l.reverse().forEach(f=>{f.lastKnownDocumentState=bt(c.documentInDb),bt(u).unshift(f)})}else{var d=_H(s);l.forEach(f=>f.reject(d))}}),this.isRunning=!1,this.triggerRun()}},e}();function SE(e){var t=async n=>{var r=Y7(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 oY(e){var t=e[0],n=Aa(t._rev);return e.forEach(r=>{var i=Aa(r._rev);i>n&&(t=r,n=i)}),t}var Xv={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(Kt(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),Kt(t=>Dj(t)),Hv(e.collection._docCache.getLatestDocumentData(this.primary)),qf((t,n)=>t._rev===n._rev),Kt(t=>this.collection._docCache.getCachedRxDocument(t)),nS(Yx))},get $$(){var e=this,t=e.collection.database.getReactivityFactory();return t.fromObservable(e.$,e.getLatest()._data,e.collection.database)},get$(e){if(yn.isDevMode()){if(e.includes(".item."))throw st("DOC1",{path:e});if(e===this.primaryPath)throw st("DOC2");if(this.collection.schema.finalFields.includes(e))throw st("DOC3",{path:e});var t=ju(this.collection.schema.jsonSchema,e);if(!t)throw st("DOC4",{path:e})}return this.$.pipe(Kt(n=>Da(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=ju(this.collection.schema.jsonSchema,e),n=this.get(e);if(!n)return uH;if(!t)throw st("DOC5",{path:e});if(!t.ref)throw st("DOC6",{path:e,schemaObj:t});var r=this.collection.database.collections[t.ref];if(!r)throw st("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 zs(this._propertyCache,e,()=>{var t=Da(this._data,e);if(typeof t!="object"||t===null||Array.isArray(t))return yn.deepFreezeWhenDevMode(t);var n=this,r=new Proxy(rn(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$$(Bd(e+"."+a))}else if(s==="$"){var l=o.slice(0,-1);return n.get$(Bd(e+"."+l))}else if(s==="_"){var c=o.slice(0,-1);return n.populate(Bd(e+"."+c))}else return n.get(Bd(e+"."+o))}});return r})},toJSON(e=!1){if(e)return yn.deepFreezeWhenDevMode(this._data);var t=rn(this._data);return delete t._rev,delete t._attachments,delete t._deleted,delete t._meta,yn.deepFreezeWhenDevMode(t)},toMutableJSON(e=!1){return ro(this.toJSON(e))},update(e){throw ln("update")},incrementalUpdate(e){throw ln("update")},updateCRDT(e){throw ln("crdt")},putAttachment(){throw ln("attachments")},getAttachment(){throw ln("attachments")},allAttachments(){throw ln("attachments")},get allAttachments$(){throw ln("attachments")},async modify(e,t){var n=this._data,r=await SE(e)(n);return this._saveData(r,n)},incrementalModify(e,t){return this.collection.incrementalWriteQueue.addWrite(this._data,SE(e)).then(n=>this.collection._docCache.getCachedRxDocument(n))},patch(e){var t=this._data,n=ro(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=rn(e),this._data._deleted)throw st("DOC11",{id:this.primary,document:this});await pL(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 Qm(this.collection,this.primary,e,i),await this.collection._runHooks("post","save",e,this),this.collection._docCache.getCachedRxDocument(Ti(this.collection.schema.primaryPath,n,r)[0])},remove(){var e=this.collection;if(this.deleted)return Promise.reject(st("DOC13",{document:this,id:this.primary}));var t=rn(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 Qm(e,this.primary,t,o),Ti(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 st("DOC14")}};function fL(e=Xv){var t=function(r,i){this.collection=r,this._data=i,this._propertyCache=new Map,this.isInstanceOfRxDocument=!0};return t.prototype=e,t}function sY(e,t,n){var r=new e(t,n);return io("createRxDocument",r),r}function pL(e,t,n){return t._meta=Object.assign({},n._meta,t._meta),yn.isDevMode()&&e.schema.validateChange(n,t),e._runHooks("pre","save",t,n)}var Nl="collection",hS="storage-token",aY="rx-migration-status",lY="RxInternalDocument",mS=Wv({version:0,title:lY,primaryKey:{key:"id",fields:["context","key"],separator:"|"},type:"object",properties:{id:{type:"string",maxLength:200},key:{type:"string"},context:{type:"string",enum:[Nl,hS,aY,"OTHER"]},data:{type:"object",additionalProperties:!0}},indexes:[],required:["key","context","data"],additionalProperties:!1,sharding:{shards:1,mode:"collection"}});function Xf(e,t){return Xa(mS,{key:e,context:t})}async function hL(e){var t=fS(e.schema,{selector:{context:Nl,_deleted:{$eq:!1}},sort:[{id:"asc"}],skip:0}),n=await e.query(t),r=n.documents;return r}var mL="storageToken",cY=Xf(mL,hS);async function uY(e){var t=ic(10),n=e.password?await e.hashFunction(JSON.stringify(e.password)):void 0,r={id:cY,context:hS,key:mL,data:{rxdbVersion:e.rxdbVersion,token:t,instanceToken:e.token,passwordHash:n},_deleted:!1,_meta:Vu(),_rev:No(),_attachments:{}},i=[{document:r}],o=await e.internalStore.bulkWrite(i,"internal-add-storage-token");if(!o.error[0])return Ti("id",i,o)[0];var s=bt(o.error[0]);if(s.isError&&Uv(s)){var a=s;if(!dY(a.documentInDb.data.rxdbVersion,e.rxdbVersion))throw st("DM5",{args:{database:e.name,databaseStateVersion:a.documentInDb.data.rxdbVersion,codeVersion:e.rxdbVersion}});if(n&&n!==a.documentInDb.data.passwordHash)throw st("DB1",{passwordHash:n,existingPasswordHash:a.documentInDb.data.passwordHash});var l=a.documentInDb;return bt(l)}throw s}function dY(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 fY(e,t,n){if(e.schema.version!==n.version)throw st("SNH",{schema:n,version:e.schema.version,name:e.name,collection:e,args:{storageCollectionName:t}});for(var r=Xm(e.name,e.schema.jsonSchema),i=Xf(r,Nl);;){var o=await Yv(e.database.internalStore,i),s=ro(bt(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 Qv(e.database.internalStore,{previous:bt(o),document:s},"add-connected-storage-to-collection")}catch(l){if(!Uv(l))throw l}}}async function pY(e,t,n){if(e.schema.version!==n.version)throw st("SNH",{schema:n,version:e.schema.version,name:e.name,collection:e,args:{storageCollectionName:t}});for(var r=Xm(e.name,e.schema.jsonSchema),i=Xf(r,Nl);;){var o=await Yv(e.database.internalStore,i),s=ro(bt(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 Qv(e.database.internalStore,{previous:bt(o),document:s},"remove-connected-storage-from-collection")}catch(l){if(!Uv(l))throw l}}}function Xm(e,t){return e+"-"+t.version}function wh(e,t){return t=rn(t),t=TH(e,t),typeof e.jsonSchema.primaryKey!="string"&&(t=CH(e.primaryPath,e.jsonSchema,t)),t._meta=Vu(),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=No()),t}async function hY(e,t){t.multiInstance=e.multiInstance;var n=await e.storage.createStorageInstance(t);return n}async function gL(e,t,n,r,i,o,s){var a=await hL(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:yn.isDevMode()});await m.remove(),f.isCollection&&await Ba("postRemoveRxCollection",{storage:e,databaseName:r,collectionName:i})})),s){var d=l.map(f=>{var m=Ep(f);return m._deleted=!0,m._meta.lwt=sr(),m._rev=Bs(n,f),{previous:f,document:m}});await t.bulkWrite(d,"rx-database-remove-collection-all")}}function zi(e){if(e.destroyed)throw st("COL21",{collection:e.name,version:e.schema.version})}var mY=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&&zv().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):(ql(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 gY(e){return new mY(e)}var vY=new WeakMap;function yY(e){var t=e.schema.getDocumentPrototype(),n=xY(e),r=Xv,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 bY(e){return zs(vY,e,()=>fL(yY(e)))}function wY(e,t,n){var r=sY(t,e,yn.deepFreezeWhenDevMode(n));return e._runHooksSync("post","create",n,r),io("postCreateRxDocument",r),r}function xY(e){var t={};return Object.entries(e.methods).forEach(([n,r])=>{t[n]=r}),t}async function Jm(e,t){var n=Xa(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 Zm(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:Vu(),_rev:No()};for(i.id=Xa(e.input.metaInstance.schema,i);!e.events.canceled.getValue();){if(r&&(i.checkpointData=Qf([r.checkpointData,i.checkpointData])),i._meta.lwt=sr(),i._rev=Bs(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=Ti(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=bt(l.documentInDb),i._rev=Bs(await e.checkpointKey,r)}}}}),await e.checkpointQueue}async function SY(e){var t=await e.hashFunction([e.identifier,e.forkInstance.databaseName,e.forkInstance.collectionName].join("||"));return"rx_storage_replication_"+t}function _E(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:sr()}),_rev:n?r._rev:No()});return o._rev||(o._rev=Bs(e,i)),o}function pa(e,t,n){var r=rn(e);return t||delete r._attachments,n||(delete r._meta,delete r._rev),r}function R1(e,t){return e.hasAttachments?t.map(n=>{var r=ro(n.document);return r.docData=Xo(r.docData),{document:r,previous:n.previous}}):t}function P1(e){for(;;)if(e.underlyingPersistentStorage)e=e.underlyingPersistentStorage;else return e}var _Y="RxReplicationProtocolMetaData";function CY(e,t){var n=kH(e),r={title:_Y,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=Wv(r);return i}function vL(e,t){return e.input.metaInstance.findDocumentsById(t.map(n=>{var r=Xa(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 eg(e,t,n,r){var i=t[e.primaryPath],o=n?Ep(n):{id:"",isCheckpoint:"0",itemId:i,docData:t,_attachments:{},_deleted:!1,_rev:No(),_meta:{lwt:0}};o.docData=t,r&&(o.isResolvedConflict=r),o._meta.lwt=sr(),o.id=Xa(e.input.metaInstance.schema,o),o._rev=Bs(await e.checkpointKey,n);var s={previous:n,document:o};return s}async function kY(e){if(e.input.initialCheckpoint&&e.input.initialCheckpoint.downstream){var t=await Jm(e,"down");t||await Zm(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=bt(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(os(async h=>(await zn(e.events.active.up.pipe(Gt(g=>!g))),h))).subscribe(h=>{e.stats.down.masterChangeStreamEmit=e.stats.down.masterChangeStreamEmit+1,s(h)});zn(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(()=>Jm(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=Qf([h,E.checkpoint]),g.push(m(E.documents,h)),E.documents.length{if(b==="RESYNC")throw new Error("SNH");ql(g,b.documents),E=Qf([E,b.checkpoint])}),m(g,bt(E))}var d=_i,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 _i;var _=[],k={},R={},P=[];return Promise.all([e.input.forkInstance.findDocumentsById(y,!0),vL(e,y)]).then(([L,$])=>{var j=new Map;return L.forEach(N=>j.set(N[E],N)),Promise.all(y.map(async N=>{var F=j.get(N),z=F?pa(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(Oe=>Oe.isEqual);if(!le&&Z&&Z.docData._rev&&F&&F._meta[e.input.identifier]&&Aa(F._rev)===F._meta[e.input.identifier]&&(le=!0),F&&Z&&le===!1||F&&!Z)return _i;var ce=z?await e.input.conflictHandler({realMasterState:K,newDocumentState:z},"downstream-check-if-equal-1").then(Oe=>Oe.isEqual):!1;if(z&&ce)return(!Z||le===!1)&&P.push(await eg(e,z,Z?Z.metaDocument:void 0)),_i;var H=Object.assign({},K,F?{_meta:rn(F._meta),_attachments:e.hasAttachments&&K._attachments?K._attachments:{},_rev:No()}:{_meta:{lwt:sr()},_rev:No(),_attachments:e.hasAttachments&&K._attachments?K._attachments:{}});if(K._rev){var V=F?Aa(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 ae={previous:F,document:H};ae.document._rev=ae.document._rev?ae.document._rev:Bs(n,ae.previous),_.push(ae),k[N]=ae,R[N]=await eg(e,K,Z?Z.metaDocument:void 0)}))}).then(async()=>{if(_.length>0)return e.input.forkInstance.bulkWrite(_,await e.downstreamBulkWriteFlag).then(L=>{var $=Ti(e.primaryPath,_,L);$.forEach(j=>{var N=j[E];e.events.processed.down.next(k[N]),P.push(R[N])}),L.error.forEach(j=>{j.status!==409&&e.events.error.next(st("RC_PULL",{writeError:j}))})})}).then(()=>{if(P.length>0)return e.input.metaInstance.bulkWrite(R1(e,P),"replication-down-write-meta").then(L=>{L.error.forEach($=>{e.events.error.next(st("RC_PULL",{id:$.documentId,writeError:$}))})})}).then(()=>{Zm(e,"down",w)})}).catch(b=>e.events.error.next(b)),d}}var yL=function(e,t){var n=Xo(e.newDocumentState),r=Xo(e.realMasterState);return Vm(n,r)?Promise.resolve({isEqual:!0}):Promise.resolve({isEqual:!1,documentData:e.realMasterState})};async function EY(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:rn(n._meta),_rev:No(),_attachments:rn(n._attachments)});return o._meta.lwt=sr(),o._rev=Bs(await e.checkpointKey,n),{resolvedDoc:o,output:i}}}async function T1(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&&bt(r._attachments)[s].digest!==a.digest)&&!a.data){var l=await t.getAttachmentData(i,s,a.digest);a.data=l}})),n}async function RY(e){if(e.input.initialCheckpoint&&e.input.initialCheckpoint.upstream){var t=await Jm(e,"up");t||await Zm(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=Qo,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()});zn(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(()=>Jm(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 uL(e.input.forkInstance,e.input.pushBatchSize,f);if(b.documents.length===0)return 1;f=Qf([f,b.checkpoint]);var w=d(b.documents,bt(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=bt(o.shift());h.timeE.documentData)),m=Qf([m,h.task.checkpoint]))}var g=f.length===0?Qo: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 vL(e,E),w={},y=[],_={},k={};if(await Promise.all(E.map(async ce=>{var H=h[ce];k[ce]=H;var V=pa(H,e.hasAttachments,!!e.input.keepMeta),ae=b[ce];ae&&ae.metaDocument.isResolvedConflict!==H._rev&&(await e.input.conflictHandler({realMasterState:ae.docData,newDocumentState:V},"upstream-check-if-equal")).isEqual||ae&&ae.docData._rev&&Aa(H._rev)===H._meta[e.input.identifier]||(y.push(ce),w[ce]={assumedMasterState:ae?ae.docData:void 0,newDocumentState:V},_[ce]=await eg(e,V,ae?ae.metaDocument:void 0))})),y.length===0)return!1;var R=Object.values(w),P=new Set,L={},$=H7(R,e.input.pushBatchSize);await Promise.all($.map(async ce=>{e.hasAttachments&&await Promise.all(ce.map(async V=>{V.newDocumentState=await T1(e.primaryPath,e.input.forkInstance,ro(V.newDocumentState),V.assumedMasterState)}));var H=await n.masterWrite(ce);H.forEach(V=>{var ae=V[e.primaryPath];P.add(ae),L[ae]=V})}));var j=[];if(y.forEach(ce=>{P.has(ce)||(e.events.processed.up.next(w[ce]),j.push(_[ce]))}),e.events.canceled.getValue())return!1;j.length>0&&await e.input.metaInstance.bulkWrite(R1(e,j),"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(L).map(([ce,H])=>{var V=w[ce],ae={newDocumentState:V.newDocumentState,assumedMasterState:V.assumedMasterState,realMasterState:H};return EY(e,ae,k[ce]).then(async Oe=>{if(Oe){e.events.resolvedConflicts.next({input:ae,output:Oe.output}),F.push({previous:k[ce],document:Oe.resolvedDoc});var He=b[ce];z[ce]=await eg(e,bt(H),He?He.metaDocument:void 0,Oe.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=Ti(e.primaryPath,F,K);le.forEach(ce=>{var H=ce[e.primaryPath];Z.push(z[H])}),Z.length>0&&await e.input.metaInstance.bulkWrite(R1(e,Z),"replication-up-write-conflict-meta")}}return Zm(e,"up",g),N}).catch(h=>(e.events.error.next(h),!1)),s}}function PY(e){e=rn(e),e.forkInstance=P1(e.forkInstance),e.metaInstance=P1(e.metaInstance);var t=SY(e),n={primaryPath:Ni(e.forkInstance.schema.primaryKey),hasAttachments:!!e.forkInstance.schema.attachments,input:e,checkpointKey:t,downstreamBulkWriteFlag:t.then(r=>"replication-downstream-"+r),events:{canceled:new Ss(!1),active:{down:new Ss(!0),up:new Ss(!0)},processed:{down:new Pn,up:new Pn},resolvedConflicts:new Pn,error:new Pn},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 Ss(!1),up:new Ss(!1)},streamQueue:{down:_i,up:_i},checkpointQueue:_i,lastCheckpointDoc:{}};return kY(n),RY(n),n}function P0(e){return zn(Aj([e.firstSyncDone.down.pipe(Gt(t=>!!t)),e.firstSyncDone.up.pipe(Gt(t=>!!t))])).then(()=>{})}function CE(e){return Promise.all([e.streamQueue.up,e.streamQueue.down,e.checkpointQueue])}function TY(e,t,n,r=!1){e=P1(e);var i=!!e.schema.attachments,o=Ni(e.schema.primaryKey),s={masterChangeStream$:e.changeStream().pipe(os(async a=>{var l={checkpoint:a.checkpoint,documents:await Promise.all(a.events.map(async c=>{var u=pa(c.documentData,i,r);return i&&(u=await T1(o,e,ro(u),void 0)),u}))};return l})),masterChangesSince(a,l){return uL(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=pa(u,i,r);return i&&(d=await T1(o,e,ro(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(pa(b,i,r)):(await t({realMasterState:pa(b,i,r),newDocumentState:bt(E.assumedMasterState)},"rxStorageInstanceToReplicationHandler-masterWrite")).isEqual===!0?m.push({previous:b,document:_E(n,i,r,E.newDocumentState,b)}):f.push(pa(b,i,r)):m.push({document:_E(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(pa(bt(g.documentInDb),i,r))})}return f}};return s}async function OY(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 bL=["pre","post"],wL=["insert","save","remove","create"],kE=!1,xL=function(){function e(n,r,i,o,s={},a={},l={},c={},u={},d=rL,f={},m=yL){this.storageInstance={},this.timeouts=new Set,this.incrementalWriteQueue={},this.awaitBeforeReads=new Set,this._incrementalUpsertQueues=new Map,this.synced=!1,this.hooks={},this._subs=[],this._docCache={},this._queryCache=Aq(),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,jY(this.asRxCollection)}var t=e.prototype;return t.prepare=async function(){this.storageInstance=pS(this.database,this.internalStorageInstance,this.schema.jsonSchema),this.incrementalWriteQueue=new dL(this.storageInstance,this.schema.primaryPath,(l,c)=>pL(this,l,c),l=>this._runHooks("post","save",l));var r=this.database.eventBulks$.pipe(Gt(l=>l.collectionName===this.name));this.$=r.pipe(os(l=>l.events)),this.checkpoint$=r.pipe(Kt(l=>l.checkpoint)),this._changeEventBuffer=gY(this.asRxCollection);var i;this._docCache=new iL(this.schema.primaryPath,this.database.eventBulks$.pipe(Gt(l=>l.collectionName===this.name&&!l.events[0].isLocal),Kt(l=>l.events)),l=>(i||(i=bY(this.asRxCollection)),wY(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=yn.deepFreezeWhenDevMode,m=0;m{this.conflictHandler(l.input,l.context).then(c=>{this.storageInstance.resolveConflictResultionTask({id:l.id,output:c})})})),_i},t.cleanup=function(r){throw zi(this),ln("cleanup")},t.migrationNeeded=function(){throw ln("migration-schema")},t.getMigrationState=function(){throw ln("migration-schema")},t.startMigration=function(r=10){return zi(this),this.getMigrationState().startMigration(r)},t.migratePromise=function(r=10){return this.getMigrationState().migratePromise(r)},t.insert=async function(r){zi(this);var i=await this.bulkInsert([r]),o=i.error[0];Qm(this,r[this.schema.primaryPath],r,o);var s=bt(i.success[0]);return s},t.bulkInsert=async function(r){if(zi(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=wh(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){zi(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=rn(m);return h._deleted=!0,{previous:m,document:h}}),c=await this.storageInstance.bulkWrite(l,"rx-collection-bulk-remove"),u=Ti(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=>Fs(o,m));return{success:f,error:c.error}},t.bulkUpsert=async function(r){zi(this);var i=[],o=new Map;r.forEach(c=>{var u=wh(this.schema,c),d=u[this.schema.primaryPath];if(!d)throw st("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=Fs(o,u),f=bt(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){zi(this);var i=await this.bulkUpsert([r]);return Qm(this.asRxCollection,r[this.schema.primaryPath],r,i.error[0]),i.success[0]},t.incrementalUpsert=function(r){zi(this);var i=wh(this.schema,r),o=i[this.schema.primaryPath];if(!o)throw st("COL4",{data:r});var s=this._incrementalUpsertQueues.get(o);return s||(s=_i),s=s.then(()=>IY(this,o,i)).then(a=>a.inserted?a.doc:LY(a.doc,i)),this._incrementalUpsertQueues.set(o,s),s},t.find=function(r){if(zi(this),typeof r=="string")throw st("COL5",{queryObj:r});r||(r=tm());var i=Nc("find",r,this);return i},t.findOne=function(r){if(zi(this),typeof r=="number"||Array.isArray(r))throw wi("COL6",{queryObj:r});var i;if(typeof r=="string")i=Nc("findOne",{selector:{[this.schema.primaryPath]:r},limit:1},this);else{if(r||(r=tm()),r.limit)throw st("QU6");r=rn(r),r.limit=1,i=Nc("findOne",r,this)}return i},t.count=function(r){zi(this),r||(r=tm());var i=Nc("count",r,this);return i},t.findByIds=function(r){zi(this);var i={selector:{[this.schema.primaryPath]:{$in:r.slice(0)}}},o=Nc("findByIds",i,this);return o},t.exportJSON=function(){throw ln("json-dump")},t.importJSON=function(r){throw ln("json-dump")},t.insertCRDT=function(r){throw ln("crdt")},t.addPipeline=function(r){throw ln("pipeline")},t.addHook=function(r,i,o,s=!1){if(typeof o!="function")throw wi("COL7",{key:i,when:r});if(!bL.includes(r))throw wi("COL8",{key:i,when:r});if(!wL.includes(i))throw st("COL9",{key:i});if(r==="post"&&i==="create"&&s===!0)throw st("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 _i;var l=a.series.map(c=>()=>c(o,s));return fH(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?Qo:(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],Ba("postDestroyRxCollection",this).then(()=>!0))))},t.remove=async function(){await this.destroy(),await Promise.all(this.onRemove.map(r=>r())),await gL(this.database.storage,this.database.internalStore,this.database.token,this.database.name,this.name,this.database.password,this.database.hashFunction)},Qa(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 jY(e){if(!kE){kE=!0;var t=Object.getPrototypeOf(e);wL.forEach(n=>{bL.map(r=>{var i=r+sj(n);t[i]=function(o,s){return this.addHook(r,n,o,s)}})})}}function LY(e,t){return e.incrementalModify(n=>t)}function IY(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 MY({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=rL,conflictHandler:f=yL}){var m={databaseInstanceToken:e.token,databaseName:e.name,collectionName:t,schema:n.jsonSchema,options:r,multiInstance:e.multiInstance,password:e.password,devMode:yn.isDevMode()};return io("preCreateRxStorageInstance",m),hY(e,m).then(h=>{var g=new xL(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=_i;return o&&g.schema.version!==0&&(E=g.migratePromise()),E}).then(()=>(io("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 SL=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};SL.prototype={isIdle:function(){return this._qC{this._to=!1,$Y(this)},0))}clear(){this.map.clear()}}function $Y(e){const t=_L()-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=Qo,this.storageTokenDocument=Qo,this.emittedEventBulkIds=new gS(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=pS(this.asRxDatabase,u,mS),this.storageTokenDocument=uY(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 st("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 Yv(this.internalStore,Xf(Xm(r,i),Nl));if(!o)throw st("SNH",{name:r,schema:i});var s=Ep(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=jH(m,this.hashFunction);if(o[f]=h,this.collections[u])throw st("DB3",{name:u});var g=Xm(u,m),E={id:Xf(g,Nl),key:g,context:Nl,data:{name:f,schemaHash:await h.hash,schema:h.jsonSchema,version:h.version,connectedStorages:[]},_deleted:!1,_meta:Vu(),_rev:No(),_attachments:{}};s.push({document:E});var b=Object.assign({},d,{name:f,schema:h,database:this}),w=rn(d);w.database=this,w.name=u,io("preCreateRxCollection",w),b.conflictHandler=w.conflictHandler,a[f]=b}));var l=await this.internalStore.bulkWrite(s,"rx-database-add-collection");await zY(this),await Promise.all(l.error.map(async u=>{if(u.status!==409)throw st("DB12",{database:this.name,writeError:u});var d=bt(u.documentInDb),f=d.data.name,m=o[f];if(d.data.schemaHash!==await m.hash)throw st("DB6",{database:this.name,collection:f,previousSchemaHash:d.data.schemaHash,schemaHash:await m.hash,previousSchema:d.data.schema,schema:bt(i[f])})}));var c={};return await Promise.all(Object.keys(r).map(async u=>{var d=a[u],f=await MY(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 ln("json-dump")},t.addState=function(r){throw ln("state")},t.importJSON=function(r){throw ln("json-dump")},t.backup=function(r){throw ln("backup")},t.leaderElector=function(){throw ln("leader-election")},t.isLeader=function(){throw ln("leader-election")},t.waitForLeadership=function(){throw ln("leader-election")},t.migrationStates=function(){throw ln("migration-schema")},t.destroy=async function(){return this.destroyed||(this.destroyed=!0,await Ba("preDestroyRxDatabase",this),this.eventBulks$.complete(),this._subs.map(r=>r.unsubscribe()),this.name==="pseudoInstance")?Qo: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(()=>tg.delete(this.storage.name+"|"+this.name)).then(()=>!0)},t.remove=function(){return this.destroy().then(()=>BY(this.name,this.storage,this.password))},Qa(e,[{key:"$",get:function(){return this.observable$}},{key:"asRxDatabase",get:function(){return this}}])}();function AY(e,t){var n=t.name+"|"+e;if(tg.has(n))throw st("DB8",{name:e,storage:t.name,link:"https://rxdb.info/rx-database.html#ignoreduplicate"})}async function CL(e,t,n,r,i,o){var s=await t.createStorageInstance({databaseInstanceToken:e,databaseName:n,collectionName:Zq,schema:mS,options:r,multiInstance:i,password:o,devMode:yn.isDevMode()});return s}function DY({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=ij,reactivity:f}){io("preCreateRxDatabase",{storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i,eventReduce:o,ignoreDuplicate:s,options:a,localDocuments:u}),s||AY(n,e),tg.add(e.name+"|"+n);var m=ic(10);return CL(m,e,n,t,i,r).catch(h=>{throw tg.delete(e.name+"|"+n),h}).then(h=>{var g=new vS(n,m,e,t,r,i,o,a,h,d,l,c,f);return Ba("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 BY(e,t,n){var r=ic(10),i=await CL(r,t,e,{},!1,n),o=await hL(i),s=new Set;o.forEach(l=>s.add(l.data.name));var a=Array.from(s);return await Promise.all(a.map(l=>gL(t,i,r,e,l,n))),await Ba("postRemoveRxDatabase",{databaseName:e,storage:t}),await i.remove(),a}function FY(e){return e instanceof vS}async function zY(e){if(await e.storageToken,e.startupErrors[0])throw e.startupErrors[0]}var UY={RxSchema:mj.prototype,RxDocument:Xv,RxQuery:sL.prototype,RxCollection:xL.prototype,RxDatabase:vS.prototype},O0=new Set,EE=new Set;function Qu(e){if(io("preAddRxPlugin",{plugin:e,plugins:O0}),!O0.has(e)){{if(EE.has(e.name))throw st("PL3",{name:e.name,plugin:e});O0.add(e),EE.add(e.name)}if(!e.rxdb)throw wi("PL1",{plugin:e});e.init&&e.init(),e.prototypes&&Object.entries(e.prototypes).forEach(([t,n])=>n(UY[t])),e.overwritable&&Object.assign(yn,e.overwritable),e.hooks&&Object.entries(e.hooks).forEach(([t,n])=>{n.after&&Kf[t].push(n.after),n.before&&Kf[t].unshift(n.before)})}}function WY(e){return e&&typeof e.then=="function"}Promise.resolve(!1);var GY=Promise.resolve(!0),Is=Promise.resolve();function Rl(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function HY(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Rp(){return Math.random().toString(36).substring(2)}var j0=0;function Pp(){var e=Date.now()*1e3;return e<=j0&&(e=j0+1),j0=e,e}function VY(){return typeof navigator<"u"&&typeof navigator.locks<"u"&&typeof navigator.locks.request=="function"}var KY=Pp,qY="native";function YY(e){var t={time:Pp(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function QY(e){e.bc.close(),e.subFns=[]}function XY(e,t){try{return e.bc.postMessage(t,!1),Is}catch(n){return Promise.reject(n)}}function JY(e,t){e.messagesCallback=t}function ZY(){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 eQ(){return 150}var tQ={create:YY,close:QY,onMessage:JY,postMessage:XY,canBeUsed:ZY,type:qY,averageResponseTime:eQ,microSeconds:KY};function yS(){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 nQ=Pp,rQ="pubkey.broadcast-channel-0-",Ws="messages",Jv={durability:"relaxed"},iQ="idb";function kL(){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 bS(e){e.commit&&e.commit()}function oQ(e){var t=kL(),n=rQ+e,r=t.open(n);return r.onupgradeneeded=function(i){var o=i.target.result;o.createObjectStore(Ws,{keyPath:"id",autoIncrement:!0})},new Promise(function(i,o){r.onerror=function(s){return o(s)},r.onsuccess=function(){i(r.result)}})}function sQ(e,t,n){var r=Date.now(),i={uuid:t,time:r,data:n},o=e.transaction([Ws],"readwrite",Jv);return new Promise(function(s,a){o.oncomplete=function(){return s()},o.onerror=function(c){return a(c)};var l=o.objectStore(Ws);l.add(i),bS(o)})}function aQ(e,t){var n=e.transaction(Ws,"readonly",Jv),r=n.objectStore(Ws),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 fQ(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))}),Is})}function pQ(e){e.closed=!0,e.db.close()}function hQ(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return sQ(e.db,e.uuid,t)}).then(function(){HY(0,10)===0&&uQ(e)}),e.writeBlockPromise}function mQ(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,RL(e)}function gQ(){return!!kL()}function vQ(e){return e.idb.fallbackInterval*2}var yQ={create:dQ,close:pQ,onMessage:mQ,postMessage:hQ,canBeUsed:gQ,type:iQ,averageResponseTime:vQ,microSeconds:nQ},bQ=Pp,wQ="pubkey.broadcastChannel-",xQ="localstorage";function PL(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function TL(e){return wQ+e}function SQ(e,t){return new Promise(function(n){Rl().then(function(){var r=TL(e.channelName),i={token:Rp(),time:Date.now(),data:t,uuid:e.uuid},o=JSON.stringify(i);PL().setItem(r,o);var s=document.createEvent("Event");s.initEvent("storage",!0,!0),s.key=r,s.newValue=o,window.dispatchEvent(s),n()})})}function _Q(e,t){var n=TL(e),r=function(o){o.key===n&&t(JSON.parse(o.newValue))};return window.addEventListener("storage",r),r}function CQ(e){window.removeEventListener("storage",e)}function kQ(e,t){if(t=yS(t),!OL())throw new Error("BroadcastChannel: localstorage cannot be used");var n=Rp(),r=new gS(t.localstorage.removeTimeout),i={channelName:e,uuid:n,eMIs:r};return i.listener=_Q(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 OE(e,t,n){e._addEL[t].push(n),zQ(e)}function jE(e,t,n){e._addEL[t]=e._addEL[t].filter(function(r){return r!==n}),UQ(e)}function zQ(e){if(!e._iL&&ML(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 UQ(e){if(e._iL&&!ML(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}function WQ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var NL={exports:{}},Mn=NL.exports={},Go,Ho;function j1(){throw new Error("setTimeout has not been defined")}function L1(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Go=setTimeout:Go=j1}catch{Go=j1}try{typeof clearTimeout=="function"?Ho=clearTimeout:Ho=L1}catch{Ho=L1}})();function $L(e){if(Go===setTimeout)return setTimeout(e,0);if((Go===j1||!Go)&&setTimeout)return Go=setTimeout,setTimeout(e,0);try{return Go(e,0)}catch{try{return Go.call(null,e,0)}catch{return Go.call(this,e,0)}}}function GQ(e){if(Ho===clearTimeout)return clearTimeout(e);if((Ho===L1||!Ho)&&clearTimeout)return Ho=clearTimeout,clearTimeout(e);try{return Ho(e)}catch{try{return Ho.call(null,e)}catch{return Ho.call(this,e)}}}var ks=[],uu=!1,Pl,nm=-1;function HQ(){!uu||!Pl||(uu=!1,Pl.length?ks=Pl.concat(ks):nm=-1,ks.length&&AL())}function AL(){if(!uu){var e=$L(HQ);uu=!0;for(var t=ks.length;t;){for(Pl=ks,ks=[];++nm1)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,BL(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"),$l(this,"death")}};var zL=function(t,n){var r=this;this.broadcastChannel=t,this._options=n,this.isLeader=!1,this._hasLeader=!1,this.isDead=!1,this.token=Rp(),this._aplQ=Is,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)};zL.prototype={hasLeader:function(){return Promise.resolve(this._hasLeader)},applyOnce:function(t){var n=this;if(this.isLeader)return Rl(0,!0);if(this.isDead)return Rl(0,!1);if(this._aplQC>1)return this._aplQ;var r=function(){if(n.isLeader)return GY;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 $l(n,"apply").then(function(){return Promise.race([Rl(c),a.then(function(){return Promise.reject(new Error)})])}).then(function(){return $l(n,"apply")}).then(function(){return Promise.race([Rl(c),a.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return n.broadcastChannel.removeEventListener("internal",l),o?!1:BL(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=eX(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,$l(this,"death")}};function eX(e){return e.isLeader?Is: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 Rl(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 tX(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 nX(e,t){if(e._leaderElector)throw new Error("BroadcastChannel already has a leader-elector");t=tX(t,e);var n=VY()?new FL(e,t):new zL(e,t);return e._befC.push(function(){return n.die()}),e._leaderElector=n,n}var ng=new Map;function UL(e,t,n,r){var i=ng.get(t);return i||(i={bc:new xS(["RxDB:",e,n].join("|")),refs:new Set},ng.set(t,i)),i.refs.add(r),i.bc}function I1(e,t){var n=ng.get(e);if(n&&(n.refs.delete(t),n.refs.size===0))return ng.delete(e),n.bc.close()}function rX(e,t,n,r){if(t.multiInstance){var i=UL(e,t.databaseInstanceToken,n.databaseName,n),o=new Pn,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(kV(a))};var u=n.close.bind(n);n.close=async function(){return l=!0,c.unsubscribe(),i.removeEventListener("message",s),await I1(t.databaseInstanceToken,n),u()};var d=n.remove.bind(n);n.remove=async function(){return l=!0,c.unsubscribe(),i.removeEventListener("message",s),await I1(t.databaseInstanceToken,n),d()}}}var WL={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(xr,function(){var n=function(p,x){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,I){T.__proto__=I}||function(T,I){for(var M in I)Object.prototype.hasOwnProperty.call(I,M)&&(T[M]=I[M])})(p,x)},r=function(){return(r=Object.assign||function(p){for(var x,T=1,I=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,I){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},I))}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=[],I=0,M=x.length;I"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=mo[0],Fi=mo[1],mo=mo[2],Fi=Fi&&Fi.then,ze=pe&&pe.constructor,rt=!!mo,Xe=function(p,x){qt.push([p,x]),et&&(queueMicrotask(Za),et=!1)},Te=!0,et=!0,Rt=[],en=[],Qe=Ze,wt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ue,pgp:!1,env:{},finalize:Ue},Ie=wt,qt=[],Nn=0,dr=[];function Ge(p){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var x=this._PSD=Ie;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&&Zn(this,this._value))}this._state=null,this._value=null,++x.ref,function T(I,M){try{M(function(B){if(I._state===null){if(B===I)throw new TypeError("A promise cannot be resolved with itself.");var G=I._lib&&ui();B&&typeof B.then=="function"?T(I,function(Y,re){B instanceof Ge?B._then(Y,re):B.then(Y,re)}):(I._state=!0,I._value=B,fo(I)),G&&kr()}},Zn.bind(null,I))}catch(B){Zn(I,B)}}(this,p)}var Di={get:function(){var p=Ie,x=Be;function T(I,M){var B=this,G=!p.global&&(p!==Ie||x!==Be),Y=G&&!vt(),re=new Ge(function(te,ue){Do(B,new Bi(Je(I,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?Di:{get:function(){return p},set:Di.set})}};function Bi(p,x,T,I,M){this.onFulfilled=typeof p=="function"?p:null,this.onRejected=typeof x=="function"?x:null,this.resolve=T,this.reject=I,this.psd=M}function Zn(p,x){var T,I;en.push(x),p._state===null&&(T=p._lib&&ui(),x=Qe(x),p._state=!1,p._value=x,I=p,Rt.some(function(M){return M._value===I._value})||Rt.push(I),fo(p),T&&kr())}function fo(p){var x=p._listeners;p._listeners=[];for(var T=0,I=x.length;T.",po="String expected.",Pr=[],di="__dbnames",pr="readonly",ho="readwrite";function er(p,x){return p?x?function(){return p.apply(this,arguments)&&x.apply(this,arguments)}:p:x}var ds={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 sn(){throw Pe.Type()}function _t(p,x){try{var T=Yt(p),I=Yt(x);if(T!==I)return T==="Array"?1:I==="Array"?-1:T==="binary"?1:I==="binary"?-1:T==="string"?1:I==="string"?-1:T==="Date"?1:I!=="Date"?NaN:-1;switch(T){case"number":case"Date":case"string":return xbe+Se&&ve(be+de)})})}var ye=Zs(T)&&T.limit===1/0&&(typeof p!="function"||p===go)&&{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;$p(J,ye,se),$p(J,be,se),oe=J._dbSchema=be;var Se=fc(ye,be);Se.add.forEach(function(Ye){pc(se,Ye[0],Ye[1].primKey,Ye[1].indexes)}),Se.change.forEach(function(Ye){if(Ye.recreate)throw new Pe.Upgrade("Not yet support for changing primary key");var Me=se.objectStore(Ye.name);Ye.add.forEach(function(Et){return ra(Me,Et)}),Ye.change.forEach(function(Et){Me.deleteIndex(Et.name),ra(Me,Et)}),Ye.del.forEach(function(Et){return Me.deleteIndex(Et)})});var Ae=ve._cfg.contentUpgrade;if(Ae&&ve._cfg.version>de){_n(J,se),ne._memoizedTables={};var qe=L(be);Se.del.forEach(function(Ye){qe[Ye]=ye[Ye]}),hi(J,[J.Transaction.prototype]),Wn(J,[J.Transaction.prototype],s(qe),qe),ne.schema=qe;var De,Ve=Oe(Ae);return Ve&&$e(),Se=Ge.follow(function(){var Ye;(De=Ae(ne))&&Ve&&(Ye=vt.bind(null,null),De.then(Ye,Ye))}),De&&typeof De.then=="function"?Ge.resolve(De):Se.then(function(){return De})}}),fe.push(function(ye){var be,Se,Ae=ve._cfg.dbschema;be=Ae,Se=ye,[].slice.call(Se.db.objectStoreNames).forEach(function(qe){return be[qe]==null&&Se.db.deleteObjectStore(qe)}),hi(J,[J.Transaction.prototype]),Wn(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?Ge.resolve(fe.shift()(ne.idbtrans)).then(ve):Ge.resolve()}().then(function(){sd(oe,se)})):Ge.resolve();var J,de,ne,se,fe,oe}).catch(G)):(s(M).forEach(function(ue){pc(T,ue,M[ue].primKey,M[ue].indexes)}),_n(p,T),void Ge.follow(function(){return p.on.populate.fire(B)}).catch(G));var re,te})}function na(p,x){sd(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=ms(0,p.idbdb,x);$p(p,p._dbSchema,x);for(var I=0,M=fc(T,p._dbSchema).change;IMath.pow(2,62)?0:oe.oldVersion,J=oe<1,p.idbdb=fe.result,B&&na(p,ue),Np(p,oe/10,ue,ne))},ne),fe.onsuccess=zt(function(){ue=null;var oe,ve,ye,be,Se,Ae=p.idbdb=fe.result,qe=w(Ae.objectStoreNames);if(0"u"?Ge.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=[],Ge.resolve(uy(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||Ae.req.values)&&vM(Ae.req.query.range,ve.query.range)}),!1,ye,be];case"count":return Se=be.find(function(Ae){return ZS(Ae.req.query.range,ve.query.range)}),[Se,!!Se,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=I.query(B).then(function(se){var fe=se.result;if(ue&&(ue.res=fe),G){for(var oe=0,ve=fe.length;oe{var s=(async()=>{var a=rn(n);a.autoOpen=!1;var l=new N1(i,a),c={[rg]:cX(r),[oX]:"++sequence, id",[ME]:"id"};return l.version(1).stores(c),await l.open(),{dexieDb:l,dexieTable:l[rg],dexieAttachmentsTable:l[ME],booleanIndexes:uX(r)}})();return NE.set(i,o),rm.set(o,0),s});return o}async function aX(e){var t=await e,n=rm.get(e),r=n-1;r===0?(t.dexieDb.close(),rm.delete(e)):rm.set(e,r)}var $1="__";function Xu(e){var t=e.split(".");if(t.length>1)return t.map(r=>Xu(r)).join(".");if(e.startsWith("|")){var n=e.substring(1);return $1+n}else return e}function HL(e){var t=e.split(".");if(t.length>1)return t.map(r=>HL(r)).join(".");if(e.startsWith($1)){var n=e.substring($1.length);return"|"+n}else return e}function lX(e,t){if(!t)return t;var n=rn(t);return n=A1(n),e.forEach(r=>{var i=Da(t,r),o=i?"1":"0",s=Xu(r);cj(n,s,o)}),n}function VL(e,t){return t&&(t=rn(t),t=D1(t),e.forEach(n=>{var r=Da(t,n),i=r==="1";cj(t,n,i)}),t)}function A1(e){if(!e||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(n=>A1(n));if(typeof e=="object"){var t={};return Object.entries(e).forEach(([n,r])=>{typeof r=="object"&&(r=A1(r)),t[Xu(n)]=r}),t}}function D1(e){if(!e||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(n=>D1(n));if(typeof e=="object"){var t={};return Object.entries(e).forEach(([n,r])=>{(typeof r=="object"||Array.isArray(e))&&(r=D1(r)),t[HL(n)]=r}),t}}function cX(e){var t=[],n=Ni(e.primaryKey);t.push([n]),t.push(["_deleted",n]),e.indexes&&e.indexes.forEach(o=>{var s=Vf(o);t.push(s)}),t.push(["_meta.lwt",n]),t.push(["_meta.lwt"]),t=t.map(o=>o.map(s=>Xu(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 $E(e,t){var n=await e,r=await n.dexieTable.bulkGet(t);return r.map(i=>VL(n.booleanIndexes,i))}function xh(e,t){return e+"||"+t}function uX(e){var t=new Set,n=[];return e.indexes?(e.indexes.forEach(r=>{var i=Vf(r);i.forEach(o=>{if(!t.has(o)){t.add(o);var s=ju(e,o);s.type==="boolean"&&n.push(o)}})}),n.push("_deleted"),V7(n)):n}function AE(e){return e===cu?-1/0:e}function DE(e,t,n){if(e.includes(t)){var r=n===lu||n===!0?"1":"0";return r}else return n}function KL(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 DE(e,l,s)}).map(AE),i=t.endKeys.map((s,a)=>{var l=t.index[a];return DE(e,l,s)}).map(AE),o=n.bound(r,i,!t.inclusiveStart,!t.inclusiveEnd);return o}async function BE(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=dS(e.schema,t.query));var c=KL(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(rg),E,b;b="["+u.map(y=>Xu(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=VL(n.booleanIndexes,k.value);(!l||l(R))&&d.push(R),a.sortSatisfiedByIndex&&d.length===s?y():k.continue()}else y()}})}),!a.sortSatisfiedByIndex){var f=nL(e.schema,t.query);d=d.sort(f)}return d=d.slice(i,s),{documents:d}}async function dX(e,t){var n=await e.internals,r=t.queryPlan,i=r.index,o=KL(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(rg),u,d;d="["+i.map(m=>Xu(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 fX=sr(),L0=!1,pX=function(){function e(n,r,i,o,s,a,l,c){this.changes$=new Pn,this.instanceId=fX++,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=Ni(this.schema.primaryKey)}var t=e.prototype;return t.bulkWrite=async function(r,i){dl(this),!L0&&(!y0.premium||typeof y0.premium!="string"||await ij(y0.premium)!==gH)&&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(` -`)),L0=!0,r.forEach(u=>{if(!u.document._rev||u.previous&&!u.previous._rev)throw st("SNH",{args:{row:u}})});var o=await this.internals,s={error:[]};this.devMode&&(r=r.map(u=>{var d=Ep(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 $E(this.internals,a);d.forEach(h=>{var g=h;return g&&u.set(g[this.primaryPath],g),g}),l=eY(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=>lX(o.booleanIndexes,h)),f.length>0&&await o.dexieTable.bulkPut(f);var m=[];l.attachmentsAdd.forEach(h=>{m.push({id:xh(h.documentId,h.attachmentId),data:h.attachmentData.data})}),l.attachmentsUpdate.forEach(h=>{m.push({id:xh(h.documentId,h.attachmentId),data:h.attachmentData.data})}),await o.dexieAttachmentsTable.bulkPut(m),await o.dexieAttachmentsTable.bulkDelete(l.attachmentsRemove.map(h=>xh(h.documentId,h.attachmentId)))}),l=bt(l),l.eventBulk.events.length>0){var c=bt(l.newestRow).document;l.eventBulk.checkpoint={id:c[this.primaryPath],lwt:c._meta.lwt},l.eventBulk.endTime=sr(),this.changes$.next(l.eventBulk)}return s},t.findDocumentsById=async function(r,i){dl(this);var o=await this.internals,s=[];return await o.dexieDb.transaction("r",o.dexieTable,async()=>{var a=await $E(this.internals,r);a.forEach(l=>{l&&(!l._deleted||i)&&s.push(l)})}),s},t.query=function(r){return dl(this),BE(this,r)},t.count=async function(r){if(r.queryPlan.selectorSatisfiedByIndex){var i=await dX(this,r);return{count:i,mode:"fast"}}else{var o=await BE(this,r);return{count:o.documents.length,mode:"slow"}}},t.changeStream=function(){return dl(this),this.changes$.asObservable()},t.cleanup=async function(r){dl(this);var i=await this.internals;return await i.dexieDb.transaction("rw",i.dexieTable,async()=>{var o=sr()-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){dl(this);var s=await this.internals,a=xh(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(){dl(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 aX(this.internals)})(),this.closed)},t.conflictResultionTasks=function(){return new Pn},t.resolveConflictResultionTask=async function(r){},e}();async function hX(e,t,n){var r=sX(t.databaseName,t.collectionName,n,t.schema),i=new pX(e,t.databaseName,t.collectionName,t.schema,r,t.options,n,t.devMode);return await rX(GL,t,i),Promise.resolve(i)}function dl(e){if(e.closed)throw new Error("RxStorageInstanceDexie is closed "+e.databaseName+"-"+e.collectionName)}var mX=function(){function e(n){this.name=GL,this.rxdbVersion=uj,this.settings=n}var t=e.prototype;return t.createStorageInstance=function(r){return rY(r),hX(this,r,this.settings)},e}();function gX(e={}){var t=new mX(e);return t}var SS={minimumDeletedTime:1e3*60*60*24*31,minimumCollectionAge:1e3*60,runEach:1e3*60*5,awaitReplicationsInSync:!0,waitForLeadership:!0},qL=new WeakMap,vX=new WeakMap;function FE(e){return zs(vX,e,()=>nX(e))}function yX(){var e=UL(this.storage.name,this.token,this.name,this),t=this.destroy.bind(this);this.destroy=function(){return I1(this.token,this),t()};var n=FE(e);return n||(n=FE(e),qL.set(this,n)),this.leaderElector=()=>n,n}function bX(){return this.multiInstance?this.leaderElector().isLeader:!0}function wX(){return this.multiInstance?this.leaderElector().awaitLeadership().then(()=>!0):Fv}function xX(e){var t=qL.get(e);t&&t.die()}var SX=!0,_X={RxDatabase:e=>{e.leaderElector=yX,e.isLeader=bX,e.waitForLeadership=wX}},_S={name:"leader-election",rxdb:SX,prototypes:_X,hooks:{preDestroyRxDatabase:{after:xX}}},zE=e=>Promise.resolve(e);function UE(e,t){if(e==="_deleted")return t;t=rn(t);var n=!!t._deleted;return t[e]=n,delete t._deleted,t}function I0(e,t,n){return n.map(r=>{var i=rn(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]=Xa(e.schema.jsonSchema,i),i})}function WE(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 CS=new WeakMap,CX=function(){function e(n,r,i,o,s,a,l,c){this.subs=[],this.subjects={received:new Pn,sent:new Pn,error:new Pn,canceled:new Ss(!1),active:new Ss(!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 Pn,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=CY(this.collection.schema.jsonSchema,cL(this.collection.schema.jsonSchema));return{collectionName:f,schema:m}})();var u=zs(CS,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:zE,i=this.push&&this.push.modifier?this.push.modifier:zE,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:yn.isDevMode()}),fY(this.collection,s.collectionName,s.schema)]);this.metaInstance=a,this.internalReplicationState=PY({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),os(async l=>{if(l==="RESYNC")return l;var c=rn(l);return c.documents=I0(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=st("RC_PULL",{checkpoint:l,errors:Vf(h).map(g=>Kk(g)),direction:"pull"});this.subjects.error.next(f),await WE(this.collection,bt(this.retryTime))}if(this.isStopped())return{checkpoint:null,documents:[]};var m=rn(d);return m.documents=I0(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 Ba("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=UE(this.deletedField,g.newDocumentState),g.assumedMasterState&&(g.assumedMasterState=UE(this.deletedField,g.assumedMasterState))),g)))),d=u.filter(rj),f=null;for(d.length===0&&(c=!0,f=[]);!c&&!this.isStopped();)try{if(f=await this.push.handler(d),!Array.isArray(f))throw st("RC_PUSH_NO_AR",{pushRows:l,direction:"push",args:{result:f}});c=!0}catch(g){var m=g.rxdb?g:st("RC_PUSH",{pushRows:l,errors:Vf(g).map(E=>Kk(E)),direction:"push"});this.subjects.error.next(m),await WE(this.collection,bt(this.retryTime))}if(this.isStopped())return[];await Ba("preReplicationMasterWriteDocumentsHandle",{result:f,collection:this.collection});var h=I0(this.collection,this.deletedField,bt(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)}),Aj([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 P0(this.internalReplicationState),await CE(this.internalReplicationState),await this.cancel()),this.callOnStart()}},t.isStopped=function(){return!!this.subjects.canceled.getValue()},t.awaitInitialReplication=async function(){return await this.startPromise,P0(bt(this.internalReplicationState))},t.awaitInSync=async function(){await this.startPromise,await P0(bt(this.internalReplicationState));for(var r=2;r>0;)r--,await this.collection.database.requestIdlePromise(),await CE(bt(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 Qo;var r=this.onCancel.map(i=>cH(i()));return this.internalReplicationState&&await OY(this.internalReplicationState),this.metaInstance&&r.push(bt(this.internalReplicationState).checkpointQueue.then(()=>bt(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 bt(this.metaInstance).remove();var r=await this.metaInfoPromise;await this.cancel(),await pY(this.collection,r.collectionName,r.schema)},e}();function kX({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(Qu(_S),!r&&!i)throw st("UT3",{collection:t.name,args:{replicationIdentifier:e}});var c=new CX(e,t,n,r,i,o,s,l);return EX(a,c),c}function EX(e,t){var n=e&&t.collection.database.multiInstance,r=n?t.collection.database.waitForLeadership():Fv;return r.then(()=>{t.isStopped()||t.autoStart&&t.start()})}var M0=Fv;async function RX(e){var t=e.database,n=Object.assign({},SS,t.cleanupPolicy?t.cleanupPolicy:{});await YL(e,n),!e.destroyed&&(await QL(e,n),await PX(e,n))}async function YL(e,t){await e.promiseWait(t.minimumCollectionAge),!e.destroyed&&t.waitForLeadership&&await e.database.waitForLeadership()}async function QL(e,t){for(var n=e.database,r=e.storageInstance,i=!1;!i&&!e.destroyed;){if(t.awaitReplicationsInSync){var o=CS.get(e);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(e.destroyed)return;M0=M0.then(async()=>e.destroyed?!0:(await n.requestIdlePromise(),r.cleanup(t.minimumDeletedTime))),i=await M0}await Ba("postCleanup",{collectionName:e.name,databaseName:n.name})}async function PX(e,t){for(;!e.destroyed;){if(await e.promiseWait(t.runEach),e.destroyed)return;await QL(e,t)}}var N0=Fv;async function TX(e){var t=e.collection,n=t.database,r=Object.assign({},SS,n.cleanupPolicy?n.cleanupPolicy:{});await YL(t,r),!t.destroyed&&(await XL(e,r),await OX(e,r))}async function XL(e,t){for(var n=e.collection,r=n.database,i=!1;!i&&!n.destroyed;){if(t.awaitReplicationsInSync){var o=CS.get(n);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(n.destroyed)return;N0=N0.then(async()=>n.destroyed?!0:(await r.requestIdlePromise(),e._cleanup())),i=await N0}}async function OX(e,t){for(var n=e.collection;!n.destroyed;){if(await n.promiseWait(t.runEach),n.destroyed)return;await XL(e,t)}}var jX={name:"cleanup",rxdb:!0,prototypes:{RxCollection:e=>{e.cleanup=async function(t){var n=Object.assign({},SS,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=>{RX(e.collection)}},createRxState:{after:e=>{TX(e.state)}}}},LX=["__proto__","constructor","prototype"];function zd(e,t){Object.keys(t).forEach(n=>{LX.includes(n)||(typeof e[n]>"u"?e[n]=t[n]:af(t[n])?zd(e[n],t[n]):e[n]=t[n])})}function af(e){return e.toString()==="[object Object]"}var Zv=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 wi("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 wi("MQ2");var o,s,a;if(typeof arguments[0]=="function")this._ensurePath("elemMatch"),s=this._path,o=arguments[0];else if(af(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]&&af(arguments[1]))s=arguments[0],a=arguments[1];else throw wi("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;sGE(this.options,d,r[d])),this}throw wi("MQ3",{args:arguments})},t.merge=function(r){if(!r)return this;if(!HE(r))throw wi("MQ4",{source:r});return r instanceof e?(r._conditions&&zd(this._conditions,r._conditions),r._fields&&(this._fields||(this._fields={}),zd(this._fields,r._fields)),r.options&&(this.options||(this.options={}),zd(this.options,r.options)),r._distinct&&(this._distinct=r._distinct),this):(zd(this._conditions,r),this)},t.find=function(r){return HE(r)&&this.merge(r),this},t._ensurePath=function(r){if(!this._path)throw st("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=IX(this.options.sort)),{query:r,path:this._path}},e}();function IX(e){return Object.entries(e).map(([t,n])=>{var r=n===1?"asc":"desc",i={[t]:r};return i})}var JL=["limit","skip","maxScan","batchSize","comment"];JL.forEach(function(e){Zv.prototype[e]=function(t){return this.options[e]=t,this}});var ZL=["gt","gte","lt","lte","ne","in","nin","all","regex","size"];ZL.forEach(function(e){Zv.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 st("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 GE(e,t,n){if(Array.isArray(e.sort))throw wi("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+"]"),wi("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 MX(e,t,n){if(e.sort=e.sort||[],!Array.isArray(e.sort))throw wi("MQ8",{opts:e,field:t,value:n});e.sort.push([t,n])}function HE(e){return e instanceof Zv||af(e)}function NX(e,t){return new Zv(e,t)}var VE="queryBuilderPath";function $X(e,t,n){var r=NX(ro(e.mangoQuery),e.other[VE]);r[t](n);var i=r.toJSON();return Nc(e.op,i.query,e.collection,{...e.other,[VE]:i.path})}function $0(e,t){e[t]=function(n){if(yn.isDevMode()&&this.op==="findByIds")throw st("QU17",{collection:this.collection.name,query:this.mangoQuery});return $X(this,t,n)}}var AX={name:"query-builder",rxdb:!0,prototypes:{RxQuery(e){["where","equals","eq","or","nor","and","mod","exists","elemMatch","sort"].forEach(t=>{$0(e,t)}),JL.forEach(t=>{$0(e,t)}),ZL.forEach(t=>{$0(e,t)})}}},DX=fL(),BX=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 vp(t,e),t}(DX),lf={get isLocal(){return!0},get allAttachments$(){throw st("LD1",{document:this})},get primaryPath(){return"id"},get primary(){return this.id},get $(){var e=this,t=Fs(B1,this.parent);return e.parent.$.pipe(Gt(n=>n.documentId===this.primary),Gt(n=>n.isLocal),Kt(n=>Dj(n)),Hv(t.docCache.getLatestDocumentData(this.primary)),qf((n,r)=>n._rev===r._rev),Kt(n=>t.docCache.getCachedRxDocument(n)),nS(Yx))},get $$(){var e=this,t=A0(e),n=t.getReactivityFactory();return n.fromObservable(e.$,e.getLatest()._data,t)},get deleted$$(){var e=this,t=A0(e),n=t.getReactivityFactory();return n.fromObservable(e.deleted$,e.getLatest().deleted,t)},getLatest(){var e=Fs(B1,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 wi("LD2",{objPath:e});var t=Da(this._data,e);return t=yn.deepFreezeWhenDevMode(t),t}},get$(e){if(e="data."+e,yn.isDevMode()){if(e.includes(".item."))throw st("LD3",{objPath:e});if(e===this.primaryPath)throw st("LD4")}return this.$.pipe(Kt(t=>t._data),Kt(t=>Da(t,e)),qf())},get$$(e){var t=A0(this),n=t.getReactivityFactory();return n.fromObservable(this.get$(e),this.getLatest().get(e),t)},async incrementalModify(e){var t=await cf(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 cf(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=Ti(this.collection.schema.primaryPath,r,i)[0];e=rn(e),e._rev=o._rev})},async remove(){var e=await cf(this.parent),t=rn(this._data);return t._deleted=!0,Qv(e.storageInstance,{previous:this._data,document:t},"local-document-remove").then(n=>e.docCache.getCachedRxDocument(n))}},KE=!1,FX=()=>{if(!KE){KE=!0;var e=Xv,t=Object.getOwnPropertyNames(e);t.forEach(r=>{var i=Object.getOwnPropertyDescriptor(lf,r);if(!i){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(lf,r,o)}});var n=r=>()=>{throw st("LD6",{functionName:r})};["populate","update","putAttachment","getAttachment","allAttachments"].forEach(r=>lf[r]=n(r))}};function zX(e,t){FX();var n=new BX(e.id,e,t);return Object.setPrototypeOf(n,lf),n.prototype=lf,n}function A0(e){var t=e.parent;return FY(t)?t:t.database}var ig=new WeakMap,B1=new WeakMap;function qE(e){var t=e.database?e.database:e,n=e.database?e.name:"",r=(async()=>{var i=await eI(t.token,t.storage,t.name,n,t.instanceCreationOptions,t.multiInstance);i=pS(t,i,tI);var o=new iL("id",t.eventBulks$.pipe(Gt(u=>{var d=!1;return(n===""&&!u.collectionName||n!==""&&u.collectionName===n)&&(d=!0),d&&u.events[0].isLocal}),Kt(u=>u.events)),u=>zX(u,e)),s=new dL(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 QE(e,t,n){var r=ic(10),i=await eI(r,e,t,n,{},!1);await i.remove()}function UX(e){return"plugin-local-documents-"+e}var tI=Wv({title:"RxLocalDocument",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:128},data:{type:"object",additionalProperties:!0}},required:["id","data"]});async function XE(e,t){var n=await cf(this),r={id:e,data:t,_deleted:!1,_meta:Vu(),_rev:No(),_attachments:{}};return Qv(n.storageInstance,{document:r},"local-document-insert").then(i=>n.docCache.getCachedRxDocument(i))}function JE(e,t){return this.getLocal(e).then(n=>{if(n)return n.incrementalModify(()=>t);var r=this.insertLocal(e,t);return r})}async function ZE(e){var t=await cf(this),n=t.docCache,r=n.getLatestDocumentDataIfExists(e);return r?Promise.resolve(n.getCachedRxDocument(r)):Yv(t.storageInstance,e).then(i=>i?t.docCache.getCachedRxDocument(i):null)}function eR(e){return this.$.pipe(Hv(null),os(async t=>{if(t)return{changeEvent:t};var n=await this.getLocal(e);return{doc:n}}),os(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),Kt(t=>t.doc))}var WX={name:"local-documents",rxdb:!0,prototypes:{RxCollection:e=>{e.insertLocal=XE,e.upsertLocal=JE,e.getLocal=ZE,e.getLocal$=eR},RxDatabase:e=>{e.insertLocal=XE,e.upsertLocal=JE,e.getLocal=ZE,e.getLocal$=eR}},hooks:{createRxDatabase:{before:e=>{e.creator.localDocuments&&qE(e.database)}},createRxCollection:{before:e=>{e.creator.localDocuments&&qE(e.collection)}},preDestroyRxDatabase:{after:e=>YE(e)},postDestroyRxCollection:{after:e=>YE(e)},postRemoveRxDatabase:{after:e=>QE(e.storage,e.databaseName,"")},postRemoveRxCollection:{after:e=>QE(e.storage,e.databaseName,e.collectionName)}},overwritable:{}};async function GX(e,t,n){var r=await e([t,n].join("|"))>await e([n,t].join("|"));return r}function D0(e,t,n){var r=n.id,i=zn(e.response$.pipe(Gt(o=>o.peer===t),Gt(o=>o.response.id===r),Kt(o=>o.response)));return e.send(t,n),i}const HX="modulepreload",VX=function(e){return"/"+e},tR={},KX=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=VX(a),a in tR)return;tR[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":HX,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 Sh(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 nI={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 Sh=="function"&&Sh;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 Sh=="function"&&Sh,d=0;d>16,j[N++]=255&k>>8,j[N++]=255&k;return $===2&&(k=g[_.charCodeAt(R)]<<2|g[_.charCodeAt(R+1)]>>4,j[N++]=255&k),$===1&&(k=g[_.charCodeAt(R)]<<10|g[_.charCodeAt(R+1)]<<4|g[_.charCodeAt(R+2)]>>2,j[N++]=255&k>>8,j[N++]=255&k),j}function d(_){return h[63&_>>18]+h[63&_>>12]+h[63&_>>6]+h[63&_]}function f(_,k,R){for(var P,L=[],$=k;$N?N:j+$));return P===1?(k=_[R-1],L.push(h[k>>2]+h[63&k<<4]+"==")):P===2&&(k=(_[R-2]<<8)+_[R-1],L.push(h[k>>10]+h[63&k>>4]+h[63&k<<2]+"=")),L.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 Oe(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 ae(this,O,D);case"base64":return le(this,O,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return He(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 L(S,O,D,q,X){if(S.length===0)return-1;if(typeof D=="string"?(q=D,D=0):2147483647D&&(D=-2147483648),D=+D,he(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,wt){return ze===1?Qe[wt]:Qe.readUInt16BE(wt*ze)}var ze=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;ze=2,rt/=2,Xe/=2,D/=2}var Te;if(X){var et=-1;for(Te=D;Tert&&(D=rt-Xe),Te=D;0<=Te;Te--){for(var Rt=!0,en=0;enX&&(q=X)):q=X;var pe=O.length;q>pe/2&&(q=pe/2);for(var ze,rt=0;rtpe&&(ze=pe):rt===2?(Xe=S[X+1],(192&Xe)==128&&(Rt=(31&pe)<<6|63&Xe,127Rt||57343Rt&&(ze=Rt)))}ze===null?(ze=65533,rt=1):65535>>10),ze=56320|1023&ze),q.push(ze),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 Ke(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 Re(S,O,D,q,X){return O=+O,D>>>=0,X||Ke(S,O,D,4),We.write(S,O,D,q,23,4),D+4}function ct(S,O,D,q,X){return O=+O,D>>>=0,X||Ke(S,O,D,8),We.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 Pe(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=[],ze=0;zeD){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));++ze)D=S.charCodeAt(ze),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 he(S){return S!==S}var Ce=o("base64-js"),We=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,ze=D-O,rt=c(pe,ze),Xe=this.slice(q,X),Te=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 j(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||je(S,O,this.length);for(var q=this[S],X=1,pe=0;++pe>>=0,O>>>=0,D||je(S,O,this.length);for(var q=this[S+--O],X=1;0>>=0,O||je(S,1,this.length),this[S]},d.prototype.readUInt16LE=function(S,O){return S>>>=0,O||je(S,2,this.length),this[S]|this[S+1]<<8},d.prototype.readUInt16BE=function(S,O){return S>>>=0,O||je(S,2,this.length),this[S]<<8|this[S+1]},d.prototype.readUInt32LE=function(S,O){return S>>>=0,O||je(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||je(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||je(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||je(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||je(S,1,this.length),128&this[S]?-1*(255-this[S]+1):this[S]},d.prototype.readInt16LE=function(S,O){S>>>=0,O||je(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||je(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||je(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||je(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||je(S,4,this.length),We.read(this,S,!0,23,4)},d.prototype.readFloatBE=function(S,O){return S>>>=0,O||je(S,4,this.length),We.read(this,S,!1,23,4)},d.prototype.readDoubleLE=function(S,O){return S>>>=0,O||je(S,8,this.length),We.read(this,S,!0,52,8)},d.prototype.readDoubleBE=function(S,O){return S>>>=0,O||je(S,8,this.length),We.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,ze=0;for(this[O]=255&S;++ze>>=0,D>>>=0,!q){var X=i(2,8*D)-1;_e(this,S,O,D,X,0)}var pe=D-1,ze=1;for(this[O+pe]=255&S;0<=--pe&&(ze*=256);)this[O+pe]=255&S/ze;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,ze=1,rt=0;for(this[O]=255&S;++peS&&rt===0&&this[O+pe-1]!==0&&(rt=1),this[O+pe]=255&(S/ze>>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,ze=1,rt=0;for(this[O+pe]=255&S;0<=--pe&&(ze*=256);)0>S&&rt===0&&this[O+pe+1]!==0&&(rt=1),this[O+pe]=255&(S/ze>>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 Re(this,S,O,!0,D)},d.prototype.writeFloatBE=function(S,O,D){return Re(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 L=g[y];k=P.call(E,L),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=j,ce.type=N,ce.count=le.length,a(ce)}return j}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(j,N,F){var z={fired:!1,wrapFn:void 0,target:j,type:N,listener:F},K=f.bind(z);return K.listener=F,z.wrapFn=K,K}function h(j,N,F){var z=j._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(j){var N=this._events;if(N!==void 0){var F=N[j];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}function E(j,N){for(var F=Array(N),z=0;zj||L(j))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+j+".");$=j}}),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(j){if(typeof j!="number"||0>j||L(j))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+j+".");return this._maxListeners=j,this},l.prototype.getMaxListeners=function(){return u(this)},l.prototype.emit=function(j){for(var N=[],F=1;FK)return this;K===0?F.shift():b(F,K),F.length===1&&(z[j]=F[0]),z.removeListener!==void 0&&this.emit("removeListener",j,le||N)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(j){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[j]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete F[j]),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,L=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+=L,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 xr>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:xr)},{}],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:xr)},{_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:xr)},{"../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:xr)},{"../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(L,$,j){return $ in L?Object.defineProperty(L,$,{value:j,enumerable:!0,configurable:!0,writable:!0}):L[$]=j,L}function c(L,$){return{value:L,done:$}}function u(L){var $=L[g];if($!==null){var j=L[k].read();j!==null&&(L[y]=null,L[g]=null,L[E]=null,$(c(j,!1)))}}function d(L){a.nextTick(u,L)}function f(L,$){return function(j,N){L.then(function(){return $[w]?void j(c(void 0,!0)):void $[_](j,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 L=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(){L[b]?K(L[b]):z(c(void 0,!0))})});var j,N=this[y];if(N)j=new Promise(f(N,this));else{var F=this[k].read();if(F!==null)return Promise.resolve(c(F,!1));j=new Promise(this[_])}return this[y]=j,j}},l(m,Symbol.asyncIterator,function(){return this}),l(m,"return",function(){var L=this;return new Promise(function($,j){L[k].destroy(null,function(N){return N?void j(N):void $(c(void 0,!0))})})}),m),R);s.exports=function(L){var $,j=Object.create(P,($={},l($,k,{value:L,writable:!0}),l($,g,{value:null,writable:!0}),l($,E,{value:null,writable:!0}),l($,b,{value:null,writable:!0}),l($,w,{value:L._readableState.endEmitted,writable:!0}),l($,_,{value:function(N,F){var z=j[k].read();z?(j[y]=null,j[g]=null,j[E]=null,N(c(z,!1))):(j[g]=N,j[E]=F)},writable:!0}),$));return j[y]=null,h(L,function(N){if(N&&N.code!=="ERR_STREAM_PREMATURE_CLOSE"){var F=j[E];return F!==null&&(j[y]=null,j[g]=null,j[E]=null,F(N)),void(j[b]=N)}var z=j[g];z!==null&&(j[y]=null,j[g]=null,j[E]=null,z(c(void 0,!0))),j[w]=!0}),L.on("readable",d.bind(null,j)),j}}).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 _L.length?L.length:_;if(P+=$===L.length?L:L.slice(0,_),_-=$,_===0){$===L.length?(++R,this.head=k.next?k.next:this.tail=null):(this.head=k,k.data=L.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 L=R.data,$=_>L.length?L.length:_;if(L.copy(k,k.length-_,0,$),_-=$,_===0){$===L.length?(++P,this.head=R.next?R.next:this.tail=null):(this.head=R,R.data=L.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(L,$){var j=$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 L;;)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(L)return;P=(""+P).toLowerCase(),L=!0}}function c(P){var L=l(P);if(typeof L!="string"&&(k.isEncoding===R||!R(P)))throw new Error("Unknown encoding: "+P);return L||P}function u(P){this.encoding=c(P);var L;switch(this.encoding){case"utf16le":this.text=g,this.end=E,L=4;break;case"utf8":this.fillLast=h,L=4;break;case"base64":this.text=b,this.end=w,L=3;break;default:return this.write=y,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=k.allocUnsafe(L)}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,L,$){var j=L.length-1;if(j<$)return 0;var N=d(L[j]);return 0<=N?(0=j)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",L,P.length-1)}function E(P){var L=P&&P.length?this.write(P):"";if(this.lastNeed){var $=this.lastTotal-this.lastNeed;return L+this.lastChar.toString("utf16le",0,$)}return L}function b(P,L){var $=(P.length-L)%3;return $==0?P.toString("base64",L):(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",L,P.length-$))}function w(P){var L=P&&P.length?this.write(P):"";return this.lastNeed?L+this.lastChar.toString("base64",0,3-this.lastNeed):L}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 L,$;if(this.lastNeed){if(L=this.fillLast(P),L===void 0)return"";$=this.lastNeed,this.lastNeed=0}else $=0;return $"u"?typeof self>"u"?typeof window>"u"?{}:window:self:xr)},{}],"/":[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 L={};P.names().forEach($=>{L[$]=P.stat($)}),L.id=P.id,L.type=P.type,L.timestamp=P.timestamp,R.push(_(L))}),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={},L={};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")&&(L[N.id]=N)});const j=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&&j(L[N.selectedCandidatePairId]),(N.type==="googCandidatePair"&&N.googActiveConnection==="true"||(N.type==="candidatepair"||N.type==="candidate-pair")&&N.selected)&&j(N)}),!$&&(!Object.keys(L).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}]},{},[])("/")})})(nI);var qX=nI.exports;const YX=Ua(qX);var QX=YX;function B0(e,t){e.send(JSON.stringify(t))}var rI="signaling.rxdb.info",nR="wss://"+rI+"/",rR=!1,XX=1e3*60*2;function JX({signalingServerUrl:e,wrtc:t,config:n,webSocketConstructor:r}){ZX(),e=e||nR,r=r||WebSocket,e.includes(rI)&&!rR&&(rR=!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 "+nR,"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 Pn,a=new Pn,l=new Pn,c=new Pn,u=new Pn,d=new Map,f=!1,m,h=void 0;g(),(async()=>{for(;await oj(XX/2),!f;)h&&B0(h,{type:"ping"})})();function g(){f||(h=new r(e),h.onclose=()=>g(),h.onopen=()=>{bt(h).onmessage=b=>{var w=JSON.parse(b.data);switch(w.type){case"init":m=w.yourPeerId,B0(bt(h),{type:"join",room:o.topic});break;case"joined":var y=function(k){var R=!1,P=new QX({initiator:k>m,wrtc:t,config:n,trickle:!0});P.id=ic(10),d.set(k,P),P.on("signal",L=>{B0(bt(h),{type:"signal",senderPeerId:m,receiverPeerId:k,room:o.topic,data:L})}),P.on("data",L=>{L=JSON.parse(L.toString()),L.result?c.next({peer:P,response:L}):l.next({peer:P,message:L})}),P.on("error",L=>{u.next(st("RC_WEBRTC_PEER",{error:L})),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 _=Fs(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,bt(h).close(),u.complete(),s.complete(),a.complete(),l.complete(),c.complete(),_i}};return E};return i}function ZX(){if(typeof Co>"u"||typeof Co.nextTick!="function")throw st("RC7")}async function eJ(e){var t=e.collection;Qu(_S),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=ic(10);function i(){var l=n++;return t.database.token+"|"+r+"|"+l}var o=await t.database.storageToken,s=new tJ(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 D0(s.connectionHandler,l,{id:i(),method:"token",params:[]});u=d.result}catch(b){s.error$.next(st("RC_WEBRTC_PEER",{error:b}));return}var f=await GX(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=kX({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 D0(s.connectionHandler,l,{method:"masterChangesSince",params:[b,bt(e.pull).batchSize],id:i()});return w.result},stream$:s.connectionHandler.response$.pipe(Gt(b=>b.response.id==="masterChangeStream$"),Kt(b=>b.response.result))}):void 0,push:e.push?Object.assign({},e.push,{async handler(b){var w=await D0(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 tJ=function(){function e(n,r,i){this.peerStates$=new Ss(new Map),this.canceled=!1,this.subs=[],this.error$=new Pn,this.collection=n,this.options=r,this.connectionHandler=i,this.collection.onDestroy.push(()=>this.cancel()),this.masterReplicationHandler=TY(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=Fs(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 zn(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}();Qu(jX);Qu(AX);Qu(_S);Qu(WX);function nJ(e){return Promise.all(e.character_traits.map(t=>t.split(/[[\]]/)).map(async([t,n])=>{const r=await an.character_traits.findOne(t.trim()).exec();return Object.assign({},r==null?void 0:r.toMutableJSON(),{parameter:n==null?void 0:n.trim()})}))}const rJ={expand:async function(){const e=await an.getLocal("gbdata_meta"),[t,n]=await Promise.all([this.populate("character_plays").then(i=>i.map(o=>o.toMutableJSON())),nJ(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")})}},iJ={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"]},oJ={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"]},sJ={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"]},aJ={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"]},lJ={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"]}}},an=await DY({name:"gb_playbook",localDocuments:!0,storage:gX()});await an.addCollections({guilds:{schema:oJ},models:{schema:iJ,methods:rJ},character_plays:{schema:sJ},character_traits:{schema:aJ},game_state:{schema:lJ,localDocuments:!0}});const cJ={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 kS(e,t){return eJ({collection:an.game_state,connectionHandlerCreator:JX({signalingServerUrl:e,config:cJ}),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 iI=C.createContext({}),uJ=e=>{const t=C.useMemo(()=>an.getLocal$("settings"),[]);return C.useEffect(()=>{if(!t)return;const n=t.subscribe(r=>{if(!r){an==null||an.upsertLocal("settings",oI).catch(console.error);return}});return()=>n.unsubscribe()},[t]),v.jsx(iI.Provider,{value:{setting$:t},children:e.children})},ci=()=>C.useContext(iI),oI={dataSet:"GB-Playbook-4-6.json",language:"auto",initialScreen:"/game",gameSize:6,networkPlay:!1,uiPreferences:{displayStatLine:!1},cardPreferences:{preferredStyle:"gbcp"},gamePlayRoute:"/game",libraryRoute:"/library"},ES=C.createContext(null),cs=e=>{const t=C.useContext(ES);return v.jsx(Rx,{container:t,children:e.children})},dJ=jt.forwardRef((e,t)=>v.jsx(hF,{position:"static",className:"no-print",children:v.jsxs(bF,{variant:"dense",children:[v.jsx(nn,{ref:t,sx:{display:"flex",flexDirection:"row",width:"100%"}}),v.jsx(Ao,{size:"small",color:"inherit",onClick:e.onClick,children:v.jsx(SO,{})})]})})),iR=jt.forwardRef((e,t)=>{const{href:n,...r}=e;return v.jsx(yT,{ref:t,to:n,...r,role:void 0})}),fJ=bx({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:iR}},MuiButtonBase:{defaultProps:{LinkComponent:iR}}}}),_h=e=>v.jsx(ED,{to:e.to,style:{textDecoration:"inherit",color:"inherit"},onClick:e.onClick,children:({isActive:t})=>v.jsx(Z6,{selected:t,children:e.children})}),pJ=()=>{const[e,t]=C.useState(null),[n,r]=C.useState(!1);return v.jsxs(wz,{theme:fJ,children:[v.jsx(nW,{}),v.jsxs("div",{className:"App",children:[v.jsx(dJ,{ref:i=>t(i),onClick:()=>r(!0)}),v.jsx(hJ,{drawer:n,setDrawer:r}),v.jsx(ES.Provider,{value:e,children:v.jsx(Zw,{})})]})]})};function hJ(e){const{drawer:t,setDrawer:n}=e,{setting$:r}=ci(),[i,o]=C.useState(),[s,a]=C.useState();return C.useEffect(()=>{const l=r==null?void 0:r.pipe(Kt(u=>u==null?void 0:u.toJSON().data.gamePlayRoute)).subscribe(u=>o(u)),c=r==null?void 0:r.pipe(Kt(u=>u==null?void 0:u.toJSON().data.libraryRoute)).subscribe(u=>a(u));return()=>{l==null||l.unsubscribe(),c==null||c.unsubscribe()}}),v.jsxs(U6,{anchor:"right",open:t,onClose:()=>n(!1),PaperProps:{sx:{width:"275px"}},ModalProps:{keepMounted:!0},children:[v.jsxs(ef,{children:[v.jsxs(bo,{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(bs,{style:{textAlign:"center"},children:v.jsx(Ct,{variant:"h6",fontFamily:"Comfortaa",children:"GB Playbook"})})]}),v.jsx(To,{}),v.jsx(_h,{to:i??"/game",onClick:()=>n(!1),children:v.jsx(bs,{children:"Game Play"})}),v.jsx(_h,{to:s??"/library",onClick:()=>n(!1),children:v.jsx(bs,{children:"Library"})}),v.jsx(_h,{to:"/print",onClick:()=>n(!1),children:v.jsx(bs,{children:"Card Printer"})}),v.jsx(_h,{to:"/settings",onClick:()=>n(!1),children:v.jsx(bs,{children:"Settings"})}),v.jsx("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"1em"},children:v.jsx(bo,{disablePadding:!0,children:v.jsx(_o,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://github.com/cleech/GBPlaybook/blob/pwa/README.md",children:"About"})})})]}),v.jsx(To,{}),v.jsxs(ef,{children:[v.jsx(bo,{children:v.jsx(bs,{children:"Rules Documents:"})}),v.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[v.jsx(bo,{disablePadding:!0,children:v.jsx(_o,{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(bo,{disablePadding:!0,children:v.jsx(_o,{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(bo,{disablePadding:!0,children:v.jsx(_o,{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(To,{}),v.jsxs(ef,{children:[v.jsx(bo,{children:v.jsx(bs,{children:"Community Links:"})}),v.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[v.jsx(bo,{disablePadding:!0,children:v.jsx(_o,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://steamforged.com/pages/guild-ball",children:"Steamforged Games"})}),v.jsx(bo,{disablePadding:!0,children:v.jsx(_o,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://discord.gg/fvpFSfm976",children:"Guild Ball Community Project"})}),v.jsx(bo,{disablePadding:!0,children:v.jsx(_o,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://www.longshanks.org/systems/guildball/",children:"Longshanks"})})]})]})]})}const mJ=Un(v.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),gJ=Un([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"),sI=Un([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"),RS=Un(v.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),sc=Un(v.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),vJ=Un(v.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),yJ=Un(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"),bJ=Un(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"),wJ=new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1});function im(e){return e===0?1:e*im(e-1)}function xJ(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=>im(r)/(im(l)*im(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 oR(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(Gf,{size:"small",variant:"contained",children:[v.jsx(vn,{onClick:i=>{i.stopPropagation(),r(t-1)&&n(t-1)},children:v.jsx(vJ,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(vn,{disabled:!0,size:"small",children:v.jsx(Ct,{variant:"body2",color:"text.primary",children:t})}),v.jsx(vn,{onClick:i=>{i.stopPropagation(),r(t+1)&&n(t+1)},children:v.jsx(mJ,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function SJ(){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(Ao,{size:"small",onClick:c=>{t(e?null:c.currentTarget)},children:v.jsx(gJ,{})}),v.jsxs(Bv,{open:n,anchorEl:e,onClose:()=>{t(null)},children:[v.jsx(Ct,{variant:"h5",textAlign:"center",children:"Dice Odds"}),v.jsx(To,{}),v.jsxs("div",{style:{margin:"1em",display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0.5em"},children:[v.jsx(Ct,{children:"Target Number :"}),v.jsx(oR,{value:r,setValue:i,clamp:c=>c>1&&c<7}),v.jsx(Ct,{children:"Dice Pool :"}),v.jsx(oR,{value:o,setValue:s,clamp:c=>c>0}),v.jsx(Ct,{children:"Reroll :"}),v.jsx(Os,{checked:a,onChange:(c,u)=>{l(u)},sx:{padding:0}})]}),v.jsx(To,{}),v.jsxs("div",{style:{margin:"1em",display:"grid",gap:"0em 1em",justifyContent:"center",justifyItems:"center",gridTemplateColumns:"auto auto"},children:[v.jsx(Ct,{sx:{textDecoration:"underline"},children:"Hits"}),v.jsx(Ct,{sx:{textDecoration:"underline"},children:"Chance"}),xJ(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:wJ.format(c)})]},u))]})]})]})}const _J={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 og{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||_J,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 sR(e){return e==null?"":""+e}function CJ(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const kJ=/###/g;function uf(e,t,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(kJ,"."):a}function i(){return!e||typeof e=="string"}const o=typeof t!="string"?t:t.split(".");let s=0;for(;s":">",'"':""","'":"'","/":"/"};function TJ(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>PJ[t]):e}class OJ{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 jJ=[" ",",","?","!",";"],LJ=new OJ(20);function IJ(e,t,n){t=t||"",n=n||"";const r=jJ.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=LJ.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 F1(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 lR extends ey{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=sg(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:F1(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),aR(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=sg(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?aI(l,r,o):l={...l,...r},aR(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 lI={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 cR={};class lg extends ey{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),CJ(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Jo.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&&!IJ(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 L=`${R}${o}${P}`;k[P]=this.translate(L,{...n,joinArrays:!1,ns:a}),k[P]===L&&(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=lg.hasDefaultValue(n),L=R?this.pluralResolver.getSuffix(c,n.count,n):"",$=n.ordinal&&R?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",j=R&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),N=j&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${L}`]||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 Oe=P&&ae!==f?ae:z;this.options.missingKeyHandler?this.options.missingKeyHandler(H,l,V,Oe,K,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(H,l,V,Oe,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);j&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(ae=>{ce([H],s+ae,n[`defaultValue${ae}`]||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||i.usedLng,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,!cR[`${g[0]}-${E}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(cR[`${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 F0(e){return e.charAt(0).toUpperCase()+e.slice(1)}class uR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Jo.create("languageUtils")}getScriptPartFromCode(t){if(t=ag(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=ag(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]=F0(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]=F0(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=F0(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 MJ=[{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}],NJ={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 $J=["v1","v2","v3"],AJ=["v4"],dR={zero:0,one:1,two:2,few:3,many:4,other:5};function DJ(){const e={};return MJ.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:NJ[t.fc]}})}),e}class BJ{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Jo.create("pluralResolver"),(!this.options.compatibilityJSON||AJ.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=DJ()}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(ag(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)=>dR[i]-dR[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!$J.includes(this.options.compatibilityJSON)}}function fR(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=RJ(e,t,n);return!o&&i&&typeof n=="string"&&(o=F1(e,n,r),o===void 0&&(o=F1(t,n,r))),o}class FJ{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Jo.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:TJ,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?_c(o):s||"{{",this.suffix=a?_c(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?_c(f):m||_c("$t("),this.nestingSuffix=h?_c(h):g||_c(")"),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=fR(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(fR(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=sR(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=sR(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 zJ(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 Cc(e){const t={};return function(r,i,o){const s=i+JSON.stringify(o);let a=t[s];return a||(a=e(ag(i),o),t[s]=a),a(r)}}class UJ{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Jo.create("formatter"),this.options=t,this.formats={number:Cc((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:Cc((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:Cc((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:Cc((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:Cc((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()]=Cc(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}=zJ(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 WJ(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class GJ extends ey{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=Jo.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=>{EJ(l.loaded,[o],s),WJ(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 pR(){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 hR(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 Ch(){}function HJ(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class Jf extends ey{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=hR(t),this.services={},this.logger=Jo,this.modules={external:[]},HJ(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=pR();this.options={...i,...this.options,...hR(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?Jo.init(o(this.modules.logger),this.options):Jo.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=UJ);const d=new uR(this.options);this.store=new lR(this.options.resources,this.options);const f=this.services;f.logger=Jo,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new BJ(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 FJ(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new GJ(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=Ch),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=Pd(),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]:Ch;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=Pd();return t||(t=this.languages),n||(n=this.options.ns),r||(r=Ch),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"&&lI.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=Pd();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=Pd();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=Pd();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 uR(pR());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 Jf(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ch;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Jf(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 lR(this.store.data,i),o.services.resourceStore=o.store),o.translator=new lg(o.services,i),o.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u{console!=null&&console.warn&&(Al(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},mR={},z1=(...e)=>{Al(e[0])&&mR[e[0]]||(Al(e[0])&&(mR[e[0]]=new Date),VJ(...e))},cI=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},gR=(e,t,n)=>{e.loadNamespaces(t,cI(e,n))},vR=(e,t,n,r)=>{Al(n)&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,cI(e,r))},KJ=(e,t,n={})=>!t.languages||!t.languages.length?(z1("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{var o;if(((o=n.bindI18n)==null?void 0:o.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),Al=e=>typeof e=="string",qJ=e=>typeof e=="object"&&e!==null,YJ=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,QJ={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},XJ=e=>QJ[e],JJ=e=>e.replace(YJ,XJ);let U1={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:JJ};const ZJ=(e={})=>{U1={...U1,...e}},eZ=()=>U1;let uI;const tZ=e=>{uI=e},nZ=()=>uI,rZ={type:"3rdParty",init(e){ZJ(e.options.react),tZ(e)}},iZ=C.createContext();class oZ{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]??=!0})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const sZ=(e,t)=>{const n=C.useRef();return C.useEffect(()=>{n.current=e},[e,t]),n.current},dI=(e,t,n,r)=>e.getFixedT(t,n,r),aZ=(e,t,n,r)=>C.useCallback(dI(e,t,n,r),[e,t,n,r]),lZ=(e,t={})=>{var _,k,R,P;const{i18n:n}=t,{i18n:r,defaultNS:i}=C.useContext(iZ)||{},o=n||r||nZ();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new oZ),!o){z1("You will need to pass in an i18next instance by using initReactI18next");const L=(j,N)=>Al(N)?N:qJ(N)&&Al(N.defaultValue)?N.defaultValue:Array.isArray(j)?j[j.length-1]:j,$=[L,{},!1];return $.t=L,$.i18n={},$.ready=!1,$}(_=o.options.react)!=null&&_.wait&&z1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...eZ(),...o.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let c=i||((k=o.options)==null?void 0:k.defaultNS);c=Al(c)?[c]:c||["translation"],(P=(R=o.reportNamespaces).addUsedNamespaces)==null||P.call(R,c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(L=>KJ(L,o,s)),d=aZ(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),f=()=>d,m=()=>dI(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=sZ(E),w=C.useRef(!0);C.useEffect(()=>{const{bindI18n:L,bindI18nStore:$}=s;w.current=!0,!u&&!a&&(t.lng?vR(o,t.lng,c,()=>{w.current&&g(m)}):gR(o,c,()=>{w.current&&g(m)})),u&&b&&b!==E&&w.current&&g(m);const j=()=>{w.current&&g(m)};return L&&(o==null||o.on(L,j)),$&&(o==null||o.store.on($,j)),()=>{w.current=!1,o&&(L==null||L.split(" ").forEach(N=>o.off(N,j))),$&&o&&$.split(" ").forEach(N=>o.store.off(N,j))}},[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(L=>{t.lng?vR(o,t.lng,c,()=>L()):gR(o,c,()=>L())})},{slice:cZ,forEach:uZ}=[];function dZ(e){return uZ.call(cZ.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const yR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,fZ=(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(!yR.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!yR.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},bR={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=fZ(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 Td=null;const wR=()=>{if(Td!==null)return Td;try{Td=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Td=!1}return Td};var mZ={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&wR())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&wR()&&window.localStorage.setItem(n,e)}};let Od=null;const xR=()=>{if(Od!==null)return Od;try{Od=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Od=!1}return Od};var gZ={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&xR())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&xR()&&window.sessionStorage.setItem(n,e)}},vZ={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}},yZ={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}},bZ={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}},wZ={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 xZ(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class fI{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=dZ(n,this.options||{},xZ()),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(pZ),this.addDetector(hZ),this.addDetector(mZ),this.addDetector(gZ),this.addDetector(vZ),this.addDetector(yZ),this.addDetector(bZ),this.addDetector(wZ)}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)}))}}fI.type="languageDetector";ur.use(fI).use(rZ).init({fallbackLng:"en",resources:{en:{translation:{"Guild Ball":"Guild Ball"}},fr:{translation:{"Guild Ball":"Guild Ball"}}},debug:!1,interpolation:{escapeValue:!1}});const pI=C.createContext({manifest:void 0,version:0,gameplans:void 0}),SR="gbdata_meta";let z0=!1;async function SZ(e,t,n){if(z0){console.error("concurent reloads");return}console.log(`loading ${e}`),z0=!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 an.getLocal(SR);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([an.guilds.find().exec().then(a=>an.guilds.bulkRemove(a.map(l=>l.name))).then(()=>an.guilds.bulkInsert(n.Guilds)).then(a=>{if(a.error.length!==0)throw"error loading Guilds"}).catch(console.error),an.models.find().exec().then(a=>an.models.bulkRemove(a.map(l=>l.id))).then(()=>an.models.bulkInsert(n.Models)).then(a=>{if(a.error.length!==0)throw"error loading Models"}).catch(console.error),an.character_plays.find().exec().then(a=>an.character_plays.bulkRemove(a.map(l=>l.name))).then(()=>an.character_plays.bulkInsert(n["Character Plays"])).then(a=>{if(a.error.length!==0)throw"error loading Character Plays"}).catch(console.error),an.character_traits.find().exec().then(a=>an.character_traits.bulkRemove(a.map(l=>l.name))).then(()=>an.character_traits.bulkInsert(n["Character Traits"])).then(a=>{if(a.error.length!==0)throw"error loading Character Traits"}).catch(console.error)]).then(()=>an.upsertLocal(SR,{version:o,filename:e,sha256:i})).then(()=>console.log("database re-load complete :|")).catch(console.error)}finally{z0=!1}}const _Z=({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}=ci(),[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 CZ();if(w)return;n(_);const k=_.datafiles[0].filename;let R;if(u&&f===k)R=u;else{R=k;const j=await(an==null?void 0:an.getLocal("settings"));if(w)return;j==null||j.incrementalPatch({dataSet:R,mostRecentErrata:k})}const P=_.datafiles.find(j=>j.filename===R),L=P.version;s(L),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 _R(h);w||(l(void 0),await SZ(h,t,_).then(()=>l(an)),i(await _R("gameplans.json")))})(),()=>{w=!0}},[o,h,t]),v.jsx(pI.Provider,{value:{version:o,manifest:t,gameplans:r,gbdb:a},children:e})},CZ=async()=>await fetch("data/manifest.json",{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(t){return t.json()}),_R=async e=>await fetch(`data/${e}`,{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(n){return n.json()}),qr=()=>C.useContext(pI);function Js(){const{gbdb:e}=qr(),[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 hI=typeof window>"u"?C.useEffect:C.useLayoutEffect;function kZ(e,t=!1){const n=t?hI:C.useEffect,r=C.useRef(e);return n(()=>{r.current=e}),r}const EZ=()=>{};function RZ(e){C.useEffect(()=>{typeof e=="function"&&e()},[])}const PZ={attributes:!0,characterData:!0,childList:!0,subtree:!0};function ty(e,t=PZ){const[n,r]=C.useState(null);return C.useEffect(()=>{if(n){const o=new MutationObserver(e);return o.observe(n,t),()=>{o.disconnect()}}return EZ},[n,e,t]),[C.useCallback(o=>{r(o)},[])]}function TZ(e){C.useEffect(()=>e,[])}function OZ(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),RZ(()=>{n.current=!0}),TZ(()=>{n.current=!1})}const mI=globalThis||void 0||self;function jZ(e){const t=kZ(e);function n(...r){typeof t.current=="function"&&t.current(...r)}return n}function gI(e,t,n,r={},i=!0,o=!1){const s=jZ(n);(o?hI:C.useEffect)(()=>typeof e<"u"&&i?(e.addEventListener(t,s,r),()=>{e.removeEventListener(t,s,r)}):()=>{},[t,r])}function LZ(e,t=!0,n=!1){gI(mI.window,"resize",e,{passive:!0},t,n)}function IZ(e,t=!0,n=!1){gI(mI.window,"scroll",e,{passive:!0},t,n)}const MZ=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}},NZ=[void 0,null,null],$Z=({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(MZ(i))})},[i]);return C.useLayoutEffect(()=>{a()},[a]),LZ(()=>{a()},t,!0),IZ(()=>{a()},e,!0),typeof window>"u"?(console.warn("useDimensionsRef: window is undefined."),NZ):[s,n,i]},AZ="/assets/playbook-symbol-defs-Dz3QsL1K.svg",DZ="/assets/gb-symbol-defs-DvUA8_44.svg";function Oi(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:`${DZ}#gbicon-${t}`})})}function vI(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:`${AZ}#pbicon-${i}`})})}function BZ(e){const{gbdb:t}=qr(),[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 uo(e,t){const{gbdb:n}=qr(),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 FZ(e,t){return e.reduce((n,r)=>t(n)>=t(r)?n:r)}function zZ({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 FZ(Array.from({length:n},(o,s)=>s+1).map(o=>i(o,Math.ceil(n/o)+r)),o=>o.size)}function yI({Controller:e}){const[t,n]=$Z(),r=uo(async a=>{var c;if(!n)return;const l=await a.guilds.count().exec();return((c=zZ(n,l,1))==null?void 0:c.size)??0},[n])??0,i=C.useMemo(()=>new Set,[]),o=TV(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(UZ,{size:r,pickTeam:s}),v.jsx(To,{}),v.jsx(e,{size:r,update$:o})]})}const UZ=jt.memo(e=>{const{pickTeam:t,size:n}=e,r=BZ(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(W1,{g:o,pickTeam:t,size:n},s))})});function W1(e){const{g:t,pickTeam:n,size:r}=e;return v.jsxs(vn,{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(Oi,{icon:t.icon,className:"dark",style:{flexShrink:0,filter:"drop-shadow(0 0 0.03em black)",...t.style||{}}})}),v.jsx(Ct,{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 bI={exports:{}},wI={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]},xI={exports:{}},WZ=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")},GZ=WZ,HZ=Array.prototype.concat,VZ=Array.prototype.slice,CR=xI.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+")"};Ci.to.keyword=function(e){return _I[e.slice(0,3)]};function Ia(e,t,n){return Math.min(Math.max(t,e),n)}function kh(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var qZ=bI.exports;const Zf=wI,CI={};for(const e of Object.keys(Zf))CI[Zf[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 kI=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 YZ(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=CI[e];if(t)return t;let n=1/0,r;for(const i of Object.keys(Zf)){const o=Zf[i],s=YZ(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 cg=kI;function QZ(){const e={},t=Object.keys(cg);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function iee(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{$c[e]={},Object.defineProperty($c[e],"channels",{value:G1[e].channels}),Object.defineProperty($c[e],"labels",{value:G1[e].labels});const t=tee(e);Object.keys(t).forEach(r=>{const i=t[r];$c[e][r]=iee(i),$c[e][r].raw=ree(i)})});var oee=$c;const Ac=qZ,xi=oee,EI=["keyword","gray","hex"],H1={};for(const e of Object.keys(xi))H1[[...xi[e].labels].sort().join("")]=e;const ug={};function Qn(e,t){if(!(this instanceof Qn))return new Qn(e,t);if(t&&t in EI&&(t=null),t&&!(t in xi))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 Qn)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const i=Ac.get(e);if(i===null)throw new Error("Unable to parse color from string: "+e);this.model=i.model,r=xi[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=xi[this.model].channels;const i=Array.prototype.slice.call(e,0,r);this.color=V1(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 H1))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=H1[o];const{labels:s}=xi[this.model],a=[];for(n=0;n(e%360+360)%360),saturationl:Cn("hsl",1,Gn(100)),lightness:Cn("hsl",2,Gn(100)),saturationv:Cn("hsv",1,Gn(100)),value:Cn("hsv",2,Gn(100)),chroma:Cn("hcg",1,Gn(100)),gray:Cn("hcg",2,Gn(100)),white:Cn("hwb",1,Gn(100)),wblack:Cn("hwb",2,Gn(100)),cyan:Cn("cmyk",0,Gn(100)),magenta:Cn("cmyk",1,Gn(100)),yellow:Cn("cmyk",2,Gn(100)),black:Cn("cmyk",3,Gn(100)),x:Cn("xyz",0,Gn(95.047)),y:Cn("xyz",1,Gn(100)),z:Cn("xyz",2,Gn(108.833)),l:Cn("lab",0,Gn(100)),a:Cn("lab",1),b:Cn("lab",2),keyword(e){return e!==void 0?new Qn(e):xi[this.model].keyword(this.color)},hex(e){return e!==void 0?new Qn(e):Ac.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new Qn(e);const t=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),Ac.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 Qn.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 Qn.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(xi)){if(EI.includes(e))continue;const{channels:t}=xi[e];Qn.prototype[e]=function(...n){return this.model===e?new Qn(this):n.length>0?new Qn(n,e):new Qn([...lee(xi[this.model][e].raw(this.color)),this.valpha],e)},Qn[e]=function(...n){let r=n[0];return typeof r=="number"&&(r=V1(n,t)),new Qn(r,e)}}function see(e,t){return Number(e.toFixed(t))}function aee(e){return function(t){return see(t,e)}}function Cn(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(ug[r]||(ug[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 Gn(e){return function(t){return Math.max(0,Math.min(e,t))}}function lee(e){return Array.isArray(e)?e:[e]}function V1(e,t){for(let n=0;n{const{version:e}=qr();return v.jsxs(Ct,{sx:{position:"absolute",bottom:0,right:0,color:"text.disabled"},children:["[",e,"]"]})},uee=/^(?:[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 tp(e){return typeof e=="string"&&uee.test(e)}function dg(e){if(!tp(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 tr=[];for(var W0=0;W0<256;++W0)tr.push((W0+256).toString(16).slice(1));function dee(e,t=0){return(tr[e[t+0]]+tr[e[t+1]]+tr[e[t+2]]+tr[e[t+3]]+"-"+tr[e[t+4]]+tr[e[t+5]]+"-"+tr[e[t+6]]+tr[e[t+7]]+"-"+tr[e[t+8]]+tr[e[t+9]]+"-"+tr[e[t+10]]+tr[e[t+11]]+tr[e[t+12]]+tr[e[t+13]]+tr[e[t+14]]+tr[e[t+15]]).toLowerCase()}var Eh,fee=new Uint8Array(16);function pee(){if(!Eh&&(Eh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Eh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Eh(fee)}var hee=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const kR={randomUUID:hee};function RI(e,t,n){if(kR.randomUUID&&!t&&!e)return kR.randomUUID();e=e||{};var r=e.random||(e.rng||pee)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,dee(r)}const Op="wss://gbplaybook-webrtc-server.onrender.com";let Es;function PS(e){return e.game_state.find().exec().then(t=>e.game_state.bulkRemove(t.map(n=>n._id))).catch(console.error)}let G0=!1;function ny(e){return async(...t)=>{if(G0)throw"concurent network change";G0=!0;try{await e(...t)}finally{G0=!1}}}const mee=ny(async(e,t)=>{try{const n=await kee();console.log(`# join code is ${n}`),t(n);const{uid:r,oid:i,gid:o}=await Ree();await PS(e),console.log("# starting new network game"),Es=await kS(Op,o),await e.game_state.insertLocal("network",{uid:r,oid:i,gid:o})}finally{jp()}}),gee=ny(async(e,t)=>{try{const{uid:n,oid:r,gid:i}=await Eee(t);await PS(e),console.log("# joining a network game"),Es=await kS(Op,i),await e.game_state.insertLocal("network",{uid:n,oid:r,gid:i})}finally{jp()}}),vee=ny(async e=>{const t=await e.game_state.getLocal("network"),n=t==null?void 0:t.get("gid");n&&Es===void 0&&(console.log("# reconnecting to a network game"),Es=await kS(Op,n))}),yee=ny(async e=>{console.log("# leaving a network game"),await(Es==null?void 0:Es.cancel().catch(console.error).finally(()=>{Es=void 0})),await PS(e).catch(console.error),await e.game_state.getLocal("network").then(t=>t==null?void 0:t.remove()).catch(console.error)});function TS({allowNew:e=!1}){const{gbdb:t}=qr(),[n,r]=C.useState(!1),{active:i}=Js();C.useEffect(()=>{t&&i&&!Es&&vee(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(Ao,{size:"small",color:o,disabled:!e&&!i,onClick:()=>r(!0),children:v.jsx(bJ,{})}),v.jsxs(uW,{open:n,onClose:()=>r(!1),children:[v.jsx(xW,{children:"Network Game Setup"}),v.jsx(vW,{children:v.jsx(Cee,{allowNew:e,close:()=>{r(!1)}})})]})]})}const bee=e=>{const{setActiveStep:t}=e;return v.jsxs(nn,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[v.jsx(vn,{variant:"contained",onClick:()=>t("Start"),children:"Start a Game"}),v.jsx(vn,{variant:"contained",onClick:()=>t("Join"),children:"Join a Game"})]})},wee=e=>{const{setActiveStep:t}=e,{gbdb:n}=qr(),[r,i]=C.useState();return C.useEffect(()=>{n&&mee(n,i).then(()=>{t("Ready")}).catch(o=>{console.error(o),t("New")})},[n,t]),v.jsxs(nn,{sx:{display:"flex",flexDirection:"column",gap:"1em",alignItems:"center"},children:[v.jsx(Ct,{children:"Share this join code:"}),v.jsx(Ct,{variant:"h3",children:r==null?void 0:r.toString().padStart(4,"0")}),v.jsx(Ct,{children:"Waiting for opponent to connect."}),v.jsx(vn,{variant:"contained",onClick:()=>{jp(),e.setActiveStep("New")},children:"Cancel"})]})},xee=e=>{const{setActiveStep:t}=e,{gbdb:n}=qr(),[r,i]=C.useState(),[o,s]=C.useState(!1);if(n)return v.jsxs(nn,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[v.jsx(U7,{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(vn,{variant:"contained",disabled:!r||o,onClick:()=>{s(!0),gee(n,r??0).then(()=>t("Ready")).then(()=>s(!1)).catch(a=>{console.error(a),t("New")})},children:"Join a Game"}),v.jsx(vn,{variant:"contained",onClick:()=>{jp(),s(!1),t("New")},children:"Cancel"})]})},See=e=>{const{setActiveStep:t}=e,{gbdb:n}=qr(),r=Va(),{setting$:i}=ci();if(n)return v.jsxs(Gm,{spacing:2,alignItems:"center",children:[v.jsx(Ct,{variant:"h6",children:"Connected"}),v.jsxs(Gm,{direction:"row",spacing:2,children:[v.jsx(vn,{variant:"contained",onClick:()=>yee(n).then(()=>t("New")).then(()=>i&&zn(i)).then(o=>o==null?void 0:o.incrementalPatch({gamePlayRoute:void 0})).then(()=>{r("/",{})}).catch(console.error),children:"Leave Game"}),v.jsx(vn,{color:"success",variant:"contained",onClick:()=>{var o;(o=e.close)==null||o.call(e)},children:"Continue"})]})]})},_ee=()=>v.jsx(Ct,{children:"Network Games must be started from the inital guild selection screen."});function Cee({allowNew:e=!1,close:t}){const{active:n}=Js(),[r,i]=C.useState(e?"New":"Block");return C.useEffect(()=>{n&&i("Ready")},[n]),C.useEffect(()=>()=>{jp()},[]),v.jsxs(nn,{children:[r==="New"&&v.jsx(bee,{setActiveStep:i}),r==="Start"&&v.jsx(wee,{setActiveStep:i}),r==="Join"&&v.jsx(xee,{setActiveStep:i}),r==="Ready"&&v.jsx(See,{setActiveStep:i,close:t}),r==="Block"&&v.jsx(_ee,{})]})}let tn;function kee(){return new Promise((e,t)=>{tn=new WebSocket(Op),tn.onopen=()=>{tn==null||tn.send(JSON.stringify({type:"handshake-begin"}))},tn.onclose=()=>{t("socket closed")},tn.onerror=n=>{t(n)},tn.onmessage=n=>{const r=JSON.parse(n.data);switch(r.type){case"handshake-response":tn&&(tn.onmessage=null),e(r.code);break}}})}function Eee(e){return new Promise((t,n)=>{if(!e){n("Invalid Arguments (id undefined)");return}tn=new WebSocket(Op),tn.onopen=()=>{tn==null||tn.send(JSON.stringify({type:"handshake-join",code:e}))},tn.onclose=()=>{n("socket closed")},tn.onerror=r=>{n(r)},tn.onmessage=r=>{const i=JSON.parse(r.data);switch(i.type){case"handshake-complete":{const o=i.yourId;if(!tp(o)){n(`invalid uID ${o}`);return}const s=i.otherId;if(!tp(s)){n(`invalid oID ${s}`);return}const a=dg(o),l=dg(s),c=a.map((d,f)=>d^l[f]),u=RI({random:c});t({uid:o,oid:s,gid:u})}break}}})}function Ree(){return new Promise((e,t)=>{if((tn==null?void 0:tn.readyState)!==1){t("socket closed");return}tn.onclose=()=>{t("socket closed")},tn.onerror=n=>{t(n)},tn.onmessage=n=>{const r=JSON.parse(n.data);switch(r.type){case"handshake-complete":{const i=r.yourId;if(!tp(i)){t(`invalid uID ${i}`);return}const o=r.otherId;if(!tp(o)){t(`invalid oID ${o}`);return}const s=dg(i),a=dg(o),l=s.map((u,d)=>u^a[d]),c=RI({random:l});e({uid:i,oid:o,gid:c})}break}}})}function jp(){tn==null||tn.close(),tn=void 0}function ry(){return lp()}var OS={},Pee=oo;Object.defineProperty(OS,"__esModule",{value:!0});var PI=OS.default=void 0,Tee=Pee(ls()),Oee=v;PI=OS.default=(0,Tee.default)((0,Oee.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");function jee(e){switch(e){case"Guilds":return"/game";case"Draft":return"/game/draft";case"Game":return"/game/draft/play"}}function TI(e){const t=Va(),{gameState1$:n,gameState2$:r}=ry(),{active:i}=Js(),[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(Kt(E=>E==null?void 0:E.navigateTo)).subscribe(E=>s(E)),g=r==null?void 0:r.pipe(Kt(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 zn(n).then(g=>{g==null||g.incrementalPatch({navigateTo:void 0}).catch(console.error)}),i||await zn(r).then(g=>{g==null||g.incrementalPatch({navigateTo:void 0}).catch(console.error)}),t(jee(d))};o==d&&a===d&&h()},[n,r,d,o,a,i,t,f]),C.useEffect(()=>{u(a===d)},[d,a]),v.jsx(EW,{className:c?"fabAnimate":void 0,...m,color:"secondary",onClick:()=>{f==null||f(),zn(n).then(h=>{h==null||h.incrementalPatch({navigateTo:d}).catch(console.error)}),i||zn(r).then(h=>{h==null||h.incrementalPatch({navigateTo:d}).catch(console.error)})},children:v.jsx(PI,{fontSize:"large",sx:{zIndex:10}})})}function ER({team:e,size:t}){const n=uo(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:ep(n.shadow??n.darkColor??n.color).darken(.25).desaturate(.25).string()},children:[v.jsx(Oi,{icon:e,fontSize:t,style:{color:"rgba(0, 0, 0, 60%)",flexShrink:0}}),v.jsx(Ct,{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 Lee(e){const[t,n]=C.useState("P1"),[r,i]=C.useState(),[o,s]=C.useState(),[a,l]=C.useState(!1),c=Mi(),{active:u}=Js(),{gameState1$:d,gameState2$:f}=ry(),[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(vn,{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(ER,{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(Ct,{variant:"caption",children:"vs"}),v.jsx(TI,{dest:"Draft",disabled:!r||!o,onAction:()=>l(!0),sx:{m:"0 15px"}}),v.jsx(Ct,{variant:"caption",children:a?"(waiting)":" "})]}),v.jsx(vn,{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(ER,{team:o,size:e.size}):"P2"})]})}function Iee(){return v.jsxs(nn,{sx:{width:"100%",height:"100%",position:"relative"},children:[v.jsx(cs,{children:v.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between"},children:[v.jsx(Ya,{separator:v.jsx(sc,{fontSize:"small"}),children:v.jsx(Ao,{size:"small",disabled:!0,children:v.jsx(RS,{sx:{color:"text.secondary"}})})}),v.jsx(TS,{allowNew:!0})]})}),v.jsx(yI,{Controller:Lee}),v.jsx(ac,{})]})}var fg={exports:{}};fg.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]",L="[object Float64Array]",$="[object Int8Array]",j="[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*)$/,ae={};ae[o]=ae[s]=ae[k]=ae[R]=ae[a]=ae[l]=ae[P]=ae[L]=ae[$]=ae[j]=ae[N]=ae[f]=ae[m]=ae[h]=ae[E]=ae[b]=ae[w]=ae[y]=ae[F]=ae[z]=ae[K]=ae[Z]=!0,ae[c]=ae[u]=ae[_]=!1;var Oe=typeof xr=="object"&&xr&&xr.Object===Object&&xr,He=typeof self=="object"&&self&&self.Object===Object&&self,je=Oe||He||Function("return this")(),_e=t&&!t.nodeType&&t,Ke=_e&&!0&&e&&!e.nodeType&&e,Re=Ke&&Ke.exports===_e;function ct(U,ge){return U.set(ge[0],ge[1]),U}function ht(U,ge){return U.add(ge),U}function Pe(U,ge){for(var ke=-1,dt=U?U.length:0;++ke-1}function it(U,ge){var ke=this.__data__,dt=er(ke,U);return dt<0?ke.push([U,ge]):ke[dt][1]=ge,this}Be.prototype.clear=nt,Be.prototype.delete=at,Be.prototype.get=$e,Be.prototype.has=vt,Be.prototype.set=it;function ot(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 ol(U){var ge=typeof U;return!!U&&(ge=="object"||ge=="function")}function id(U){return!!U&&typeof U=="object"}function hs(U){return dc(U)?pr(U):el(U)}function od(){return[]}function Mp(){return!1}e.exports=An})(fg,fg.exports);var Mee=fg.exports;const OI=Ua(Mee);var jS={},Nee=oo;Object.defineProperty(jS,"__esModule",{value:!0});var jI=jS.default=void 0,$ee=Nee(ls()),Aee=v;jI=jS.default=(0,$ee.default)((0,Aee.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 LS={},Dee=oo;Object.defineProperty(LS,"__esModule",{value:!0});var LI=LS.default=void 0,Bee=Dee(ls()),Fee=v;LI=LS.default=(0,Bee.default)((0,Fee.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 IS=(e,t)=>{const n=jt.useRef(null);return OZ(()=>{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 Gs(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 ff(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 II(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 MI(e,t,n,r){if(t.dehcneb){const i=e.find(o=>o.benched&&o.name===t.dehcneb);i&&r(i,n)}}function Tl({model:e,disabled:t=!1,stateDoc:n,updateCounts:r}){const[i,o]=C.useState(e.selected);C.useEffect(()=>{const l=n.get$("roster").pipe(Kt(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=IS(t,[i]);return v.jsx(js,{ref:s,label:e.id,control:v.jsx(Os,{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(LI,{}),checkedIcon:v.jsx(jI,{})})})}const NI=Ee(o9)(()=>({"& .MuiBadge-badge":{right:"2em",top:"2em"}})),la={3:{captain:1,mascot:0,squaddies:2},4:{captain:1,mascot:1,squaddies:2},6:{captain:1,mascot:1,squaddies:4}},RR=e=>{const{guild:t,ready:n,unready:r,disabled:i=!1,style:o}=e,{setting$:s}=ci(),[a,l]=C.useState(6);C.useEffect(()=>{const w=s==null?void 0:s.pipe(Kt(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=uo(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(Gs(_,"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&&la[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 la[a].mascot===0&&_.forEach(k=>{k.mascot&&(k.disabled=1)}),_},[t,a]),h=C.useCallback((w,y)=>{function _(j,N,F,z){return ff(j,N,F,z,K=>!!K.captain,la[a].captain)}function k(j,N,F,z){return ff(j,N,F,z,K=>!!K.mascot,la[a].mascot)}function R(j,N,F,z){return ff(j,N,F,z,K=>!(K.captain||K.mascot),la[a].squaddies)}if(!m)return;w.selected=y;const P=_(m,w,c.current.captain,y);c.current.captain=P;const L=k(m,w,c.current.mascot,y);c.current.mascot=L;const $=R(m,w,c.current.squaddieCount,y);c.current.squaddieCount=$,II(m,w,y),MI(m,w,y,(j,N)=>{i||(j.selected=N,e.stateDoc.incrementalModify(F=>{if(N){const z=F.roster.concat({name:j.id,health:j.hp});F.roster=z}else{const z=F.roster.filter(K=>K.name!=j.id);F.roster=z}return F}))}),P===la[a].captain&&L===la[a].mascot&&$===la[a].squaddies?f(!0):f(!1),u(j=>j+1)},[e.stateDoc,m,a,i]);if(C.useEffect(()=>{if(d&&m){const w=OI(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(NI,{badgeContent:d?v.jsx(sI,{color:"success"}):0,style:{overflow:"visible",...o},children:v.jsxs(qO,{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(Tl,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id)),v.jsx("span",{children:"Mascots :"}),E.map(w=>v.jsx(Tl,{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(Tl,{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(Tl,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id))]})]})})},Rh={3:{master:1,apprentice:2},4:{master:2,apprentice:2},6:{master:3,apprentice:3}},PR=e=>{const{guild:t,ready:n,unready:r,disabled:i=!1,style:o}=e,{setting$:s}=ci(),[a,l]=C.useState(6);C.useEffect(()=>{const b=s==null?void 0:s.pipe(Kt(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=uo(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 Gs(y,"id",t.roster),y},[t]),h=C.useCallback((b,w)=>{function y(P,L,$,j){return ff(P,L,$,j,N=>!!N.captain,Rh[a].master)}function _(P,L,$,j){return ff(P,L,$,j,N=>!N.captain,Rh[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,II(m,b,w),MI(m,b,w,(P,L)=>{i||(P.selected=L,e.stateDoc.incrementalModify($=>{if(L){const j=$.roster.concat({name:P.id,health:P.hp});$.roster=j}else{const j=$.roster.filter(N=>N.name!=P.id);$.roster=j}return $}))}),k===Rh[a].master&&R===Rh[a].apprentice?f(!0):f(!1),u(P=>P+1)},[e.stateDoc,m,a,i]);if(C.useEffect(()=>{if(d&&m){const b=OI(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(NI,{badgeContent:d?v.jsx(sI,{color:"success"}):0,style:{overflow:"visible",...o},children:v.jsxs(qO,{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(Tl,{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(Tl,{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(Tl,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]})]})})};function zee(){const{active:e}=Js();return v.jsxs(nn,{className:"DraftScreen",children:[v.jsx(cs,{children:v.jsxs(nn,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[v.jsxs(Ya,{separator:v.jsx(sc,{fontSize:"small"}),children:[v.jsx(Ao,{color:"inherit",href:"/game",size:"small",disabled:e,children:v.jsx(RS,{})}),v.jsx(Ct,{children:"Draft"})]}),v.jsxs("div",{children:[v.jsx(Wee,{}),v.jsx(TS,{})]})]})}),v.jsx(Uee,{}),v.jsx(ac,{})]})}function Uee(){const{setting$:e}=ci(),t=Va(),[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(Kt(L=>L==null?void 0:L.toJSON().data.gameSize)).subscribe(L=>d(L));return()=>P==null?void 0:P.unsubscribe()},[e]);const{active:f}=Js(),{gameState1$:m,gameState2$:h}=ry(),[g,E]=C.useState();C.useEffect(()=>{if(!m)return;let P=!1;return(async()=>{const $=await zn(m);P||E($)})(),()=>{P=!0}},[m]);const[b,w]=C.useState();C.useEffect(()=>{if(!h)return;let P=!1;return(async()=>{const $=await zn(h);P||w($)})(),()=>{P=!0}},[h]);const[y,_]=uo(async P=>{const L=g==null?void 0:g.guild,$=b==null?void 0:b.guild;if(!L||!$)return;const[j,N]=await Promise.all([P.guilds.findOne().where({name:L}).exec(),P.guilds.findOne().where({name:$}).exec()]);if(!j||!N){t("/game");return}return[j,N]},[g,b,t])??[];if(!y||!_||!g||!b)return null;const k=y.name==="Blacksmiths"?PR:RR,R=_.name==="Blacksmiths"?PR:RR;return v.jsxs(v.Fragment,{children:[v.jsx(k,{guild:y,stateDoc:g,ready:s,unready:l,style:{width:"100%"}},`1-${u}`),v.jsx(TI,{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 Wee(){const[e,t]=C.useState(null),n=!!e,r=c=>{t(c.currentTarget)},i=()=>{t(null)},{setting$:o}=ci(),[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(Ao,{onClick:r,color:"inherit",size:"small",sx:{backgroundColor:"primary.dark"},children:v.jsxs(Ct,{children:[l,"v",l]})}),v.jsx(Bv,{anchorEl:e,open:n,onClose:i,onClick:i,children:v.jsxs(ZO,{dense:!0,children:[v.jsx(vi,{selected:l===6,onClick:()=>{s==null||s.incrementalPatch({gameSize:6})},children:"6v6"}),v.jsx(vi,{selected:l===4,onClick:()=>{s==null||s.incrementalPatch({gameSize:4})},children:"4v4"}),v.jsx(vi,{selected:l===3,onClick:()=>{s==null||s.incrementalPatch({gameSize:3})},children:"3v3"})]})})]})}var MS={},Gee=oo;Object.defineProperty(MS,"__esModule",{value:!0});var pg=MS.default=void 0,Hee=Gee(ls()),Vee=v;pg=MS.default=(0,Hee.default)((0,Vee.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove");var NS={},Kee=oo;Object.defineProperty(NS,"__esModule",{value:!0});var hg=NS.default=void 0,qee=Kee(ls()),Yee=v;hg=NS.default=(0,qee.default)((0,Yee.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");function TR(e){Qee(e)&&e.touches.length<2&&e.preventDefault&&e.cancelable&&e.preventDefault()}function Qee(e){return e&&"touches"in e}function K1({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",TR,{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",TR)},[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 Xee(e){const{disabled:t,object:n,label:r}=e,i=r(n),o=IS(t,[i]);return v.jsx(Ct,{ref:o,sx:{width:"100%",textAlign:"center"},children:i})}function $I({object:e,label:t,value:n,setValue:r,disabled:i=!1,longPressClear:o=!1}){const s=K1({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(Xee,{disabled:i,object:e,label:t}),v.jsxs(Gf,{size:"small",variant:"contained",disabled:i,children:[v.jsx(vn,{...o?s:{},onClick:a=>{if(a.stopPropagation(),!o){const l=n(e);l>0&&r(e,l-1)}},children:v.jsx(pg,{fontSize:"inherit"})}),v.jsx(vn,{onClick:a=>{a.stopPropagation();const l=n(e);r(e,l+1)},children:v.jsx(hg,{fontSize:"inherit"})})]})]})}const OR=e=>{const{model:t,disabled:n}=e,r=IS(n,[e.health]);return v.jsx(vn,{ref:r,disabled:!0,size:"small",children:v.jsx(Ct,{variant:"body2",color:"text.primary",children:`${String(e.health).padStart(2,"0")} / ${String(t.hp).padStart(2,"0")}`})})};function AI({state:e,model:t,disabled:n=!1,stacked:r=!1}){const i=K1({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=K1({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(Kt(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(OR,{health:l,model:t,disabled:n}),v.jsxs(Gf,{size:"small",variant:"contained",disabled:n,sx:{"& .MuiButtonGroup-grouped":{minWidth:"1rem"}},children:[v.jsx(vn,{...i,onClick:u=>u.stopPropagation(),children:v.jsx(pg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(vn,{...o,onClick:u=>u.stopPropagation(),children:v.jsx(hg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})]}):v.jsxs(Gf,{size:"small",variant:"contained",disabled:n,children:[v.jsx(vn,{...i,onClick:u=>u.stopPropagation(),children:v.jsx(pg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(OR,{health:l,model:t,disabled:n}),v.jsx(vn,{...o,onClick:u=>u.stopPropagation(),children:v.jsx(hg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function Jee(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($I,{object:t,disabled:e.disabled,label:()=>`VP: ${n}`,value:()=>n,setValue:(i,o)=>{i.incrementalModify(s=>(s.score=o,s))}})}function Zee(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($I,{object:t,disabled:e.disabled,longPressClear:!0,label:()=>`MOM: ${n}`,value:()=>n,setValue:(i,o)=>{i.incrementalModify(s=>(s.momentum=o,s))}})}function ete({teams:e,rosters:t,expanded:n,onClick:r,disabled:i}){const o=Mi(),{setting$:s}=ci(),[a,l]=C.useState();C.useEffect(()=>{const u=s==null?void 0:s.pipe(Kt(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(nn,{sx:{flexGrow:0,overflow:"auto"},children:e.map((u,d)=>{const f=c[d]+1;return v.jsxs($z,{expanded:n===!0,square:!0,sx:{backgroundColor:"transparent"},disableGutters:!0,elevation:0,children:[v.jsx(qz,{sx:{position:"sticky",top:0,zIndex:1,padding:0,borderBottom:`1px solid ${o.palette.divider}`,".MuiAccordionSummary-content":{margin:0}},children:v.jsxs(WO,{onClick:()=>{r(f-1,!n)},sx:{width:"100%",display:"flex",flexDirection:"row"},children:[v.jsx(dG,{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(Oi,{icon:u.guild,style:{color:o.palette.text.secondary,filter:"unset",flexShrink:0}})})}),v.jsx(bs,{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(Jee,{state:u,disabled:i[d]}),v.jsx(Zee,{state:u,disabled:i[d]})]})]})}),v.jsx(zz,{sx:{padding:0},children:v.jsx(ef,{disablePadding:!0,sx:{"li:nth-of-type(odd)":{"&.MuiListItem-root":{backgroundColor:"rgba(100%, 100%, 100%, 5%)"}}},children:t[d].map((m,h)=>v.jsx(bo,{secondaryAction:v.jsx(AI,{state:u,model:m,disabled:i[d]}),onClick:()=>{r(f+h,!1)},children:v.jsx(bs,{primary:m.id,secondary:a?m.statLine:null})},m.id))},d)})]},d)})})}const Lr=new URL("/assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",import.meta.url).href,Ir=new URL("/assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",import.meta.url).href,Mr=new URL("/assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",import.meta.url).href,Nr=new URL("/assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",import.meta.url).href,kc=new URL("/assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",import.meta.url).href,Qr=new URL("/assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",import.meta.url).href,Ec=new URL("/assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",import.meta.url).href,$r=new URL("/assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",import.meta.url).href,Ar=new URL("/assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",import.meta.url).href,Dr=new URL("/assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",import.meta.url).href,Br=new URL("/assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",import.meta.url).href,Rc=new URL("/assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",import.meta.url).href,br=new URL("/assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",import.meta.url).href,Pc=new URL("/assets/GB-S4-Navigators-20-03-03-DuY0bj8b.jpg",import.meta.url).href,ca=new URL("/assets/Order_back-qsepM33g.jpg",import.meta.url).href,Tc=new URL("/assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",import.meta.url).href,fl=new URL("/assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",import.meta.url).href,Xr=new URL("/assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",import.meta.url).href,Oc=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",Lr],["Midas_front",new URL("/assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",import.meta.url).href],["Smoke_back",Lr],["Smoke_front",new URL("/assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",import.meta.url).href],["Soma_back",Lr],["Soma_front",new URL("/assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",import.meta.url).href],["Pneuma_back",Lr],["Pneuma_front",new URL("/assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",import.meta.url).href],["Flask_back",Lr],["Flask_front",new URL("/assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",import.meta.url).href],["Naja_back",Lr],["Naja_front",new URL("/assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",import.meta.url).href],["Calculus_back",Lr],["Calculus_front",new URL("/assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",import.meta.url).href],["vCalculus_back",Lr],["vCalculus_front",new URL("/assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",import.meta.url).href],["Crucible_back",Lr],["Crucible_front",new URL("/assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",import.meta.url).href],["Kami_back",Lr],["Kami_front",new URL("/assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",import.meta.url).href],["Katalyst_back",Lr],["Katalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",import.meta.url).href],["vKatalyst_back",Lr],["vKatalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",import.meta.url).href],["Mercury_back",Lr],["Mercury_front",new URL("/assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",import.meta.url).href],["Venin_back",Lr],["Venin_front",new URL("/assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",import.meta.url).href],["Vitriol_back",Lr],["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",Ir],["Anvil_front",new URL("/assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",import.meta.url).href],["Burnish_back",Ir],["Burnish_front",new URL("/assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",import.meta.url).href],["Culverin_back",Ir],["Culverin_front",new URL("/assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",import.meta.url).href],["Farris_back",Ir],["Farris_front",new URL("/assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",import.meta.url).href],["Ferrite_back",Ir],["Ferrite_front",new URL("/assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",import.meta.url).href],["Furnace_back",Ir],["Furnace_front",new URL("/assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",import.meta.url).href],["Hearth_back",Ir],["Hearth_front",new URL("/assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",import.meta.url).href],["Alloy_back",Ir],["Alloy_front",new URL("/assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",import.meta.url).href],["Bolt_back",Ir],["Bolt_front",new URL("/assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",import.meta.url).href],["Cast_back",Ir],["Cast_front",new URL("/assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",import.meta.url).href],["Cinder_back",Ir],["Cinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",import.meta.url).href],["vCinder_back",Ir],["vCinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",import.meta.url).href],["Cutlass_back",Ir],["Cutlass_front",new URL("/assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",import.meta.url).href],["Iron_back",Ir],["Iron_front",new URL("/assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",import.meta.url).href],["Sledge_back",Ir],["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",Mr],["Tapper_front",new URL("/assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",import.meta.url).href],["Esters_back",Mr],["Esters_front",new URL("/assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",import.meta.url).href],["Corker_back",Mr],["Corker_front",new URL("/assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",import.meta.url).href],["Scum_back",Mr],["Scum_front",new URL("/assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",import.meta.url).href],["Quaff_back",Mr],["Quaff_front",new URL("/assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",import.meta.url).href],["vDecimate_back",Mr],["vDecimate_front",new URL("/assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",import.meta.url).href],["Flea_back",Mr],["Flea_front",new URL("/assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",import.meta.url).href],["Friday_back",Mr],["Friday_front",new URL("/assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",import.meta.url).href],["Hooper_back",Mr],["Hooper_front",new URL("/assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",import.meta.url).href],["Mash_back",Mr],["Mash_front",new URL("/assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",import.meta.url).href],["Pintpot_back",Mr],["Pintpot_front",new URL("/assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",import.meta.url).href],["Spigot_back",Mr],["Spigot_front",new URL("/assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",import.meta.url).href],["vSpigot_back",Mr],["vSpigot_front",new URL("/assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",import.meta.url).href],["Stave_back",Mr],["Stave_front",new URL("/assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",import.meta.url).href],["Stoker_back",Mr],["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",Nr],["Ox_front",new URL("/assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",import.meta.url).href],["Fillet_back",Nr],["Fillet_front",new URL("/assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",import.meta.url).href],["vBoar_back",Nr],["vBoar_front",new URL("/assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",import.meta.url).href],["Princess_back",Nr],["Princess_front",new URL("/assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",import.meta.url).href],["Truffles_back",Nr],["Truffles_front",new URL("/assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",import.meta.url).href],["Boar_back",Nr],["Boar_front",new URL("/assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",import.meta.url).href],["Boiler_back",Nr],["Boiler_front",new URL("/assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",import.meta.url).href],["Brisket_back",Nr],["Brisket_front",new URL("/assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",import.meta.url).href],["vBrisket_back",Nr],["vBrisket_front",new URL("/assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",import.meta.url).href],["vGutter_back",Nr],["vGutter_front",new URL("/assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",import.meta.url).href],["Layne_back",Nr],["Layne_front",new URL("/assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",import.meta.url).href],["Meathook_back",Nr],["Meathook_front",new URL("/assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",import.meta.url).href],["vOx_back",Nr],["vOx_front",new URL("/assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",import.meta.url).href],["Shank_back",Nr],["Shank_front",new URL("/assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",import.meta.url).href],["Tenderiser_back",Nr],["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",kc],["Wellington_front",new URL("/assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",import.meta.url).href],["Pepper_back",kc],["Pepper_front",new URL("/assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",import.meta.url).href],["Cinnamon_back",kc],["Cinnamon_front",new URL("/assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",import.meta.url).href],["Roast_back",kc],["Roast_front",new URL("/assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",import.meta.url).href],["Spice_back",kc],["Spice_front",new URL("/assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",import.meta.url).href],["Sugar_back",kc],["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",Qr],["Ballista_front",new URL("/assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",import.meta.url).href],["PinVice_back",Qr],["PinVice_front",new URL("/assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",import.meta.url).href],["Rivet_back",Qr],["Rivet_front",new URL("/assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",import.meta.url).href],["Mainspring_back",Qr],["Mainspring_front",new URL("/assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",import.meta.url).href],["Mother_back",Qr],["Mother_front",new URL("/assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",import.meta.url).href],["Colossus_back",Qr],["Colossus_front",new URL("/assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",import.meta.url).href],["vHarriet_back",Qr],["vHarriet_front",new URL("/assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",import.meta.url).href],["Hoist_back",Qr],["Hoist_front",new URL("/assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",import.meta.url).href],["Locus_back",Qr],["Locus_front",new URL("/assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",import.meta.url).href],["Nomad_back",Qr],["Nomad_front",new URL("/assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",import.meta.url).href],["Ratchet_back",Qr],["Ratchet_front",new URL("/assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",import.meta.url).href],["Salvo_back",Qr],["Salvo_front",new URL("/assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",import.meta.url).href],["Velocity_back",Qr],["Velocity_front",new URL("/assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",import.meta.url).href],["vVelocity_back",Qr],["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",Ec],["Devana_front",new URL("/assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",import.meta.url).href],["Frelsi_back",Ec],["Frelsi_front",new URL("/assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",import.meta.url).href],["Ikaros_back",Ec],["Ikaros_front",new URL("/assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",import.meta.url).href],["Mataagi_back",Ec],["Mataagi_front",new URL("/assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",import.meta.url).href],["Minerva_back",Ec],["Minerva_front",new URL("/assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",import.meta.url).href],["Rundaas_back",Ec],["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",$r],["Grange_front",new URL("/assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",import.meta.url).href],["Thresher_back",$r],["Thresher_front",new URL("/assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",import.meta.url).href],["Festival_back",$r],["Festival_front",new URL("/assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",import.meta.url).href],["Peck_back",$r],["Peck_front",new URL("/assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",import.meta.url).href],["Buckwheat_back",$r],["Buckwheat_front",new URL("/assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",import.meta.url).href],["Amber_back",$r],["Amber_front",new URL("/assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",import.meta.url).href],["Bushel_back",$r],["Bushel_front",new URL("/assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",import.meta.url).href],["Fallow_back",$r],["Fallow_front",new URL("/assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",import.meta.url).href],["Harrow_back",$r],["Harrow_front",new URL("/assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",import.meta.url).href],["vHonour_back",$r],["vHonour_front",new URL("/assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",import.meta.url).href],["Jackstraw_back",$r],["Jackstraw_front",new URL("/assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",import.meta.url).href],["Millstone_back",$r],["Millstone_front",new URL("/assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",import.meta.url).href],["Ploughman_back",$r],["Ploughman_front",new URL("/assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",import.meta.url).href],["Tater_back",$r],["Tater_front",new URL("/assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",import.meta.url).href],["Windle_back",$r],["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",Ar],["Shark_front",new URL("/assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",import.meta.url).href],["Corsair_back",Ar],["Corsair_front",new URL("/assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",import.meta.url).href],["Yukai_back",Ar],["Yukai_front",new URL("/assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",import.meta.url).href],["Salt_back",Ar],["Salt_front",new URL("/assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",import.meta.url).href],["Tentacles_back",Ar],["Tentacles_front",new URL("/assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",import.meta.url).href],["Angel_back",Ar],["Angel_front",new URL("/assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",import.meta.url).href],["Greyscales_back",Ar],["Greyscales_front",new URL("/assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",import.meta.url).href],["Hag_back",Ar],["Hag_front",new URL("/assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",import.meta.url).href],["Jac_back",Ar],["Jac_front",new URL("/assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",import.meta.url).href],["Knuckles_back",Ar],["Knuckles_front",new URL("/assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",import.meta.url).href],["Kraken_back",Ar],["Kraken_front",new URL("/assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",import.meta.url).href],["Sakana_back",Ar],["Sakana_front",new URL("/assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",import.meta.url).href],["vSakana_back",Ar],["vSakana_front",new URL("/assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",import.meta.url).href],["Siren_back",Ar],["Siren_front",new URL("/assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",import.meta.url).href],["vSiren_back",Ar],["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",Dr],["Theron_front",new URL("/assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",import.meta.url).href],["Skatha_back",Dr],["Skatha_front",new URL("/assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",import.meta.url).href],["Steeljaw_back",Dr],["Steeljaw_front",new URL("/assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",import.meta.url).href],["Fahad_back",Dr],["Fahad_front",new URL("/assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",import.meta.url).href],["Snow_back",Dr],["Snow_front",new URL("/assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",import.meta.url).href],["Chaska_back",Dr],["Chaska_front",new URL("/assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",import.meta.url).href],["Edge_back",Dr],["Edge_front",new URL("/assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",import.meta.url).href],["Egret_back",Dr],["Egret_front",new URL("/assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",import.meta.url).href],["Hearne_back",Dr],["Hearne_front",new URL("/assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",import.meta.url).href],["vHearne_back",Dr],["vHearne_front",new URL("/assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",import.meta.url).href],["Jaecar_back",Dr],["Jaecar_front",new URL("/assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",import.meta.url).href],["vMinx_back",Dr],["vMinx_front",new URL("/assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",import.meta.url).href],["Seenah_back",Dr],["Seenah_front",new URL("/assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",import.meta.url).href],["Ulfr_back",Dr],["Ulfr_front",new URL("/assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",import.meta.url).href],["Zarola_back",Dr],["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",Br],["Honour_front",new URL("/assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",import.meta.url).href],["Hammer_back",Br],["Hammer_front",new URL("/assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",import.meta.url).href],["Corbelli_back",Br],["Corbelli_front",new URL("/assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",import.meta.url).href],["Marbles_back",Br],["Marbles_front",new URL("/assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",import.meta.url).href],["Wrecker_back",Br],["Wrecker_front",new URL("/assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",import.meta.url).href],["Brick_back",Br],["Brick_front",new URL("/assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",import.meta.url).href],["Champ_back",Br],["Champ_front",new URL("/assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",import.meta.url).href],["Chisel_back",Br],["Chisel_front",new URL("/assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",import.meta.url).href],["vChisel_back",Br],["vChisel_front",new URL("/assets/GB-S4-Masons-19-08-18-CCBausup.jpg",import.meta.url).href],["Flint_back",Br],["Flint_front",new URL("/assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",import.meta.url).href],["Granite_back",Br],["Granite_front",new URL("/assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",import.meta.url).href],["Harmony_back",Br],["Harmony_front",new URL("/assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",import.meta.url).href],["vHarmony_back",Br],["vHarmony_front",new URL("/assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",import.meta.url).href],["Mallet_back",Br],["Mallet_front",new URL("/assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",import.meta.url).href],["Tower_back",Br],["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",Rc],["Shaft_front",new URL("/assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",import.meta.url).href],["Digger_back",Rc],["Digger_front",new URL("/assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",import.meta.url).href],["Fissure_back",Rc],["Fissure_front",new URL("/assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",import.meta.url).href],["Fuse_back",Rc],["Fuse_front",new URL("/assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",import.meta.url).href],["Mule_back",Rc],["Mule_front",new URL("/assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",import.meta.url).href],["Spade_back",Rc],["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",br],["Obulus_front",new URL("/assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",import.meta.url).href],["Scalpel_back",br],["Scalpel_front",new URL("/assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",import.meta.url).href],["Mourn_back",br],["Mourn_front",new URL("/assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",import.meta.url).href],["Dirge_back",br],["Dirge_front",new URL("/assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",import.meta.url).href],["Vileswarm_back",br],["Vileswarm_front",new URL("/assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",import.meta.url).href],["Bonesaw_back",br],["Bonesaw_front",new URL("/assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",import.meta.url).href],["Brainpan_back",br],["Brainpan_front",new URL("/assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",import.meta.url).href],["Memory_back",br],["Memory_front",new URL("/assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",import.meta.url).href],["Casket_back",br],["Casket_front",new URL("/assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",import.meta.url).href],["Cosset_back",br],["Cosset_front",new URL("/assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",import.meta.url).href],["Gaffer_back",br],["Gaffer_front",new URL("/assets/gaffer-front-large-box-BhDGw3yv.png",import.meta.url).href],["Ghast_back",br],["Ghast_front",new URL("/assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",import.meta.url).href],["Graves_back",br],["Graves_front",new URL("/assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",import.meta.url).href],["vGraves_back",br],["vGraves_front",new URL("/assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",import.meta.url).href],["vHemlocke_back",br],["vHemlocke_front",new URL("/assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",import.meta.url).href],["Silence_back",br],["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",Pc],["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",Pc],["Azimuth_front",new URL("/assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",import.meta.url).href],["Azimuth_back",Pc],["Ebb_back",Pc],["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",Pc],["Horizon_back",Pc],["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",ca],["sBrisket_front",new URL("/assets/GB-S4-Order-19-08-04-B1NHIvQH.jpg",import.meta.url).href],["Pride_back",ca],["Pride_front",new URL("/assets/GB-S4-Order-19-08-06-BxCTP18m.jpg",import.meta.url).href],["Benediction_back",ca],["Benediction_front",new URL("/assets/GB-S4-Order-19-08-08-DWLWCNBP.jpg",import.meta.url).href],["vFangtooth_back",ca],["vFangtooth_front",new URL("/assets/GB-S4-Order-19-08-10-CdmsC0k7.jpg",import.meta.url).href],["Grace_back",ca],["Grace_front",new URL("/assets/GB-S4-Order-19-08-12-CUnlpuDI.jpg",import.meta.url).href],["Harry_back",ca],["Harry_front",new URL("/assets/GB-S4-Order-19-08-14-N2zvQdYm.jpg",import.meta.url).href],["Mist_back",ca],["Mist_front",new URL("/assets/GB-S4-Order-19-08-16-BxGIGoGz.jpg",import.meta.url).href],["sSpigot_back",ca],["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",Tc],["Piper_front",new URL("/assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",import.meta.url).href],["Squeak_back",Tc],["Squeak_front",new URL("/assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",import.meta.url).href],["Miasma_back",Tc],["Miasma_front",new URL("/assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",import.meta.url).href],["Pelage_back",Tc],["Pelage_front",new URL("/assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",import.meta.url).href],["Scourge_back",Tc],["Scourge_front",new URL("/assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",import.meta.url).href],["Skulk_back",Tc],["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",fl],["Herder_front",new URL("/assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",import.meta.url).href],["Babe_back",fl],["Babe_front",new URL("/assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",import.meta.url).href],["Crook_back",fl],["Crook_front",new URL("/assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",import.meta.url).href],["Hook_back",fl],["Hook_front",new URL("/assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",import.meta.url).href],["Lamb_back",fl],["Lamb_front",new URL("/assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",import.meta.url).href],["Ram_back",fl],["Ram_front",new URL("/assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",import.meta.url).href],["Shearer_back",fl],["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",Xr],["Blackheart_front",new URL("/assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",import.meta.url).href],["vRage_back",Xr],["vRage_front",new URL("/assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",import.meta.url).href],["vGreede_back",Xr],["vGreede_front",new URL("/assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",import.meta.url).href],["Coin_back",Xr],["Coin_front",new URL("/assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",import.meta.url).href],["Strongbox_back",Xr],["Strongbox_front",new URL("/assets/GB-S4-Union-20-03-12--TefmgjH.jpg",import.meta.url).href],["Avarisse_back",Xr],["Avarisse_front",new URL("/assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",import.meta.url).href],["Greede_back",Xr],["Greede_front",new URL("/assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",import.meta.url).href],["Decimate_back",Xr],["Decimate_front",new URL("/assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",import.meta.url).href],["Fangtooth_back",Xr],["Fangtooth_front",new URL("/assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",import.meta.url).href],["Gutter_back",Xr],["Gutter_front",new URL("/assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",import.meta.url).href],["Hemlocke_back",Xr],["Hemlocke_front",new URL("/assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",import.meta.url).href],["Minx_back",Xr],["Minx_front",new URL("/assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",import.meta.url).href],["Rage_back",Xr],["Rage_front",new URL("/assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",import.meta.url).href],["Snakeskin_back",Xr],["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",Oc],["Heat_front",new URL("/assets/heat-kg0Ne0rh.jpg",import.meta.url).href],["Heat_back",Oc],["Nightlight_front",new URL("/assets/nightlight-BICbD_Qy.jpg",import.meta.url).href],["Nightlight_back",Oc],["Phosphor_front",new URL("/assets/phosphor-CifRCYrC.jpg",import.meta.url).href],["Phosphor_back",Oc],["Soot_front",new URL("/assets/soot-CXEcs2BT.jpg",import.meta.url).href],["Soot_back",Oc],["Wick_front",new URL("/assets/wick-D10XZuyz.jpg",import.meta.url).href],["Wick_back",Oc]]);var tte=function(e){return e instanceof RegExp},nte=function(t){var n=/[\\^$.*+?()[\]{}|]/g,r=RegExp(n.source);return t&&r.test(t)?t.replace(n,"\\$&"):t},DI=function(e){return typeof e=="string"},rte=function(e){var t=[];return e.forEach(function(n){Array.isArray(n)?t=t.concat(n):t.push(n)}),t};function ite(e,t,n){var r=0,i=0;if(e==="")return e;if(!e||!DI(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var o=t;tte(o)||(o=new RegExp("("+nte(o)+")","gi"));for(var s=e.split(o),a=1,l=s.length;a{let t=Ph(e,/\(◉(.*?)\)/g,(n,r)=>v.jsxs(jt.Fragment,{children:["(◉",v.jsx("span",{style:{fontStyle:"italic"},children:n}),")"]},`i-a-${r}`));return t=Ph(t,/\(([^◉].*?)\)/g,(n,r)=>v.jsxs(jt.Fragment,{children:["(",v.jsx("span",{style:{fontStyle:"italic"},children:n}),")"]},`i-${r}`)),t=Ph(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(vI,{icon:n.replace(/GB/g,"CP")})})})},`pb-${r}`)),t=Ph(t,/\b([A-Z]+)\b/g,(n,r)=>v.jsx("span",{style:{letterSpacing:"-1px"},children:n},`tla-${r}`)),v.jsx(v.Fragment,{children:t})},ste=e=>{const t=e.model,n=t.id,{setting$:r}=ci(),[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]=uo(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":ep(l.shadow??l.color).mix(ep.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(ate,{model:t,guild:l}),v.jsx(ute,{model:t})]}),v.jsx(cte,{model:t,gbcp:u}),v.jsx("div",{className:"character-plays-wrapper",children:v.jsx(fte,{model:t,gbcp:u})}),v.jsx(lte,{model:t,health$:e.health$})]})})},ate=({model:e,guild:t})=>v.jsxs("div",{className:"name-plate",children:[v.jsx("div",{className:"guild-icon",children:v.jsx(Oi,{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,'"']})]})]}),lte=({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(Oi,{icon:"skull",size:17})||i+1===e.recovery&&v.jsx(Oi,{icon:"bandage",size:22})||i+1===e.hp&&i+1},i))})},cte=({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(vI,{icon:c},u))):null},i*7+s)}))})},ute=({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}`})]}),jR=({test:e})=>v.jsx(Oi,{icon:e?"checkmark":"ballotX",size:14});function dte({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 fte=({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(dte,{text:n.name}),v.jsx("span",{children:String(n.CST).split(",").map((r,i)=>v.jsxs("span",{children:[i>0&&"/",{CP:v.jsx(Oi,{icon:t?"ball":"GB",size:18}),CP2:v.jsx(Oi,{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(jR,{test:n.SUS})}),v.jsx("span",{children:v.jsx(jR,{test:n.OPT})}),v.jsx("div",{className:"text",children:iy(n.text)})]},n.name))]}),mg=jt.memo(ste),pte=e=>{const t=e.model,n=t.id,{setting$:r}=ci(),[i,o]=C.useState();C.useEffect(()=>{const c=r==null?void 0:r.pipe(Kt(u=>u==null?void 0:u.toJSON().data.cardPreferences.preferredStyle)).subscribe(u=>o(u));return()=>c==null?void 0:c.unsubscribe()});const s=uo(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":ep(s.shadow??s.color).mix(ep.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(Oi,{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(hte,{model:t}),v.jsx(mte,{model:t}),v.jsx(gte,{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(H0,{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(H0,{icon:t.guild2}),v.jsx(H0,{icon:t.guild1})]}),v.jsx("div",{className:"base-size",children:`Size ${t.base} mm`})]})]})]})})},H0=({icon:e})=>v.jsx("div",{className:"icon wrapper",children:v.jsx(Oi,{icon:e})});function $S({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 hte=({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($S,{text:t.name.concat(t.parameter?` [${t.parameter}]`:"")})}),v.jsx("span",{className:"text",children:iy(t.text)})]},`${t.name}-${n}`),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]},`ct-${n}`))]}),mte=({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($S,{text:t}),v.jsx("span",{children:iy(n)})]}),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},gte=({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($S,{text:t}),v.jsx("span",{children:iy(n)})]}),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},gg=jt.memo(pte);function BI({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(mg,{model:t,health$:n,style:{"--scale":o}}),e]}),v.jsx("div",{className:"flip-card-back",children:v.jsx(gg,{model:t,style:{"--scale":o}})})]})})})}function LR(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function AS(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(n=>{typeof e[n]>"u"?e[n]=t[n]:LR(t[n])&&LR(e[n])&&Object.keys(t[n]).length>0&&AS(e[n],t[n])})}const FI={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 Ju(){const e=typeof document<"u"?document:{};return AS(e,FI),e}const vte={document:FI,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 Ai(){const e=typeof window<"u"?window:{};return AS(e,vte),e}function yte(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function bte(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function q1(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function vg(){return Date.now()}function wte(e){const t=Ai();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function xte(e,t){t===void 0&&(t="x");const n=Ai();let r,i,o;const s=wte(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 Th(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function Ste(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function yi(){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 Rs(e,t){t===void 0&&(t="");const n=[...e.children];return e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),t?n.filter(r=>r.matches(t)):n}function _te(e,t){const n=t.contains(e);return!n&&t instanceof HTMLSlotElement?[...t.assignedElements()].includes(e):n}function yg(e){try{console.warn(e);return}catch{}}function Y1(e,t){t===void 0&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:yte(t)),n}function Cte(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 kte(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 xa(e,t){return Ai().getComputedStyle(e,null).getPropertyValue(t)}function IR(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function Ete(e,t){const n=[];let r=e.parentElement;for(;r;)n.push(r),r=r.parentElement;return n}function MR(e,t,n){const r=Ai();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 V0;function Rte(){const e=Ai(),t=Ju();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function UI(){return V0||(V0=Rte()),V0}let K0;function Pte(e){let{userAgent:t}=e===void 0?{}:e;const n=UI(),r=Ai(),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 WI(e){return e===void 0&&(e={}),K0||(K0=Pte(e)),K0}let q0;function Tte(){const e=Ai(),t=WI();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 Ote(){return q0||(q0=Tte()),q0}function jte(e){let{swiper:t,on:n,emit:r}=e;const i=Ai();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 Lte(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const o=[],s=Ai(),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=Ete(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 Ite={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 Mte(){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(xa(r,"padding-left")||0,10)-parseInt(xa(r,"padding-right")||0,10),n=n-parseInt(xa(r,"padding-top")||0,10)-parseInt(xa(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 Nte(){const e=this;function t(j,N){return parseFloat(j.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=Rs(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(j=>{s?j.style.marginLeft="":j.style.marginRight="",j.style.marginBottom="",j.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(Oh(r,"--swiper-centered-offset-before",""),Oh(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 L;const $=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(j=>typeof n.breakpoints[j].slidesPerView<"u").length>0;for(let j=0;j1&&f.push(e.virtualSize-o)}if(l&&n.loop){const j=h[0]+y;if(n.slidesPerGroup>1){const N=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),F=j*n.slidesPerGroup;for(let z=0;z!n.cssMode||n.loop?!0:F!==u.length-1).forEach(N=>{N.style[j]=`${y}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let j=0;h.forEach(F=>{j+=F+(y||0)}),j-=y;const N=j-o;f=f.map(F=>F<=0?-g:F>N?N+E:F)}if(n.centerInsufficientSlides){let j=0;h.forEach(F=>{j+=F+(y||0)}),j-=y;const N=(n.slidesOffsetBefore||0)+(n.slidesOffsetAfter||0);if(j+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){Oh(r,"--swiper-centered-offset-before",`${-f[0]}px`),Oh(r,"--swiper-centered-offset-after",`${e.size/2-h[h.length-1]/2}px`);const j=-e.snapGrid[0],N=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(F=>F+j),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 j=`${n.containerModifierClass}backface-hidden`,N=e.el.classList.contains(j);d<=n.maxBackfaceHiddenSlides?N||e.el.classList.add(j):N&&e.el.classList.remove(j)}}function $te(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 Ate(){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 Dte(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)),NR(c,E,n.slideVisibleClass),NR(c,g,n.slideFullyVisibleClass),c.progress=i?-d:d,c.originalProgress=i?-f:f}}function Bte(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 Y0=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function Fte(){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=>Rs(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=kte(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!u&&(u=t[0]),c=Cte(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!c===0&&(c=t[t.length-1]))),t.forEach(d=>{Y0(d,d===l,n.slideActiveClass),Y0(d,d===u,n.slideNextClass),Y0(d,d===c,n.slidePrevClass)}),e.emitSlidesClasses()}const om=(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()}},Q0=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},Q1=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)&&Q0(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)&&Q0(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 Ute(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=zte(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&&Q1(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==f&&t.emit("realIndexChange"),t.emit("slideChange"))}function Wte(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 zI({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 nne(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 rne(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 ine(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 one(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 sne(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 ane(){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(Rs(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),q1(()=>{e.slideTo(i)})):e.slideTo(i):i>e.slides.length-r?(e.loopFix(),i=e.getSlideIndex(Rs(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),q1(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}var lne={slideTo:tne,slideToLoop:nne,slideNext:rne,slidePrev:ine,slideReset:one,slideToClosest:sne,slideToClickedSlide:ane};function cne(e){const t=this,{params:n,slidesEl:r}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const i=()=>{Rs(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 L=0,$=0;const j=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(j-K-1)}}else if(F+g>j-b){$=Math.max(F-(j-b*2),E);for(let z=0;z<$;z+=1){const K=z-Math.floor(z/j)*j;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+L]-z;a?l.setTranslate(l.translate-Z):(l.slideTo(k+Math.ceil(L),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 dne(){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 fne={loopCreate:cne,loopFix:une,loopDestroy:dne};function pne(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 hne(){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 mne={setGrabCursor:pne,unsetGrabCursor:hne};function gne(e,t){t===void 0&&(t=this);function n(r){if(!r||r===Ju()||r===Ai())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 $R(e,t,n){const r=Ai(),{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 vne(e){const t=this,n=Ju();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"){$R(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"&&!_te(l,t.wrapperEl)||"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?gne(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(!$R(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=vg(),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 yne(e){const t=Ju(),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=vg());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]-(i.slidesPerView!=="auto"&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween: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.params.spaceBetween+(i.slidesPerView!=="auto"&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):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 bne(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=vg(),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=vg(),q1(()=>{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 AR(){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 wne(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function xne(){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 Sne(e){const t=this;om(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function _ne(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const HI=(e,t)=>{const n=Ju(),{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",AR,!0):e[c]("observerUpdate",AR,!0),i[l]("load",e.onLoad,{capture:!0}))};function Cne(){const e=this,{params:t}=e;e.onTouchStart=vne.bind(e),e.onTouchMove=yne.bind(e),e.onTouchEnd=bne.bind(e),e.onDocumentTouchStart=_ne.bind(e),t.cssMode&&(e.onScroll=xne.bind(e)),e.onClick=wne.bind(e),e.onLoad=Sne.bind(e),HI(e,"on")}function kne(){HI(this,"off")}var Ene={attachEvents:Cne,detachEvents:kne};const DR=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function Rne(){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=DR(e,r),u=DR(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(),yi(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 Pne(e,t,n){if(t===void 0&&(t="window"),!e||t==="container"&&!n)return;let r=!1;const i=Ai(),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 jne(){const e=this,{classNames:t,params:n,rtl:r,el:i,device:o}=e,s=One(["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 Lne(){const e=this,{el:t,classNames:n}=e;!t||typeof t=="string"||(t.classList.remove(...n),e.emitContainerClasses())}var Ine={addClasses:jne,removeClasses:Lne};function Mne(){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 Nne={checkOverflow:Mne},X1={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 $ne(e,t){return function(r){r===void 0&&(r={});const i=Object.keys(r)[0],o=r[i];if(typeof o!="object"||o===null){yi(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)){yi(t,r);return}typeof e[i]=="object"&&!("enabled"in e[i])&&(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),yi(t,r)}}const X0={eventsEmitter:Ite,update:Gte,translate:Qte,transition:ene,slide:lne,loop:fne,grabCursor:mne,events:Ene,breakpoints:Tne,checkOverflow:Nne,classes:Ine},J0={};let DS=class vs{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=yi({},n,{el:d});u.push(new vs(f))}),u}const a=this;a.__swiper__=!0,a.support=UI(),a.device=WI({userAgent:n.userAgent}),a.browser=Ote(),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:$ne(n,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});const c=yi({},X1,l);return a.params=yi({},c,J0,n),a.originalParams=yi({},a.params),a.passedParams=yi({},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=Rs(n,`.${r.slideClass}, swiper-slide`),o=IR(i[0]);return IR(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=Rs(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&&om(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()):Rs(r,i())[0];return!s&&n.params.createElements&&(s=Y1("div",n.params.wrapperClass),r.append(s),Rs(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"||xa(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||xa(r,"direction")==="rtl"),wrongRTL:xa(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?om(n,o):o.addEventListener("load",s=>{om(n,s.target)})}),Q1(n),n.initialized=!0,Q1(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),bte(r)),r.destroyed=!0),null}static extendDefaults(t){yi(J0,t)}static get extendedDefaults(){return J0}static get defaults(){return X1}static installModule(t){vs.prototype.__modules__||(vs.prototype.__modules__=[]);const n=vs.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>vs.installModule(n)),vs):(vs.installModule(t),vs)}};Object.keys(X0).forEach(e=>{Object.keys(X0[e]).forEach(t=>{DS.prototype[t]=X0[e][t]})});DS.use([jte,Lte]);const VI=["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 ec(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function du(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]:ec(t[r])&&ec(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:du(e[r],t[r]):e[r]=t[r]})}function KI(e){return e===void 0&&(e={}),e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function qI(e){return e===void 0&&(e={}),e.pagination&&typeof e.pagination.el>"u"}function YI(e){return e===void 0&&(e={}),e.scrollbar&&typeof e.scrollbar.el>"u"}function QI(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 Ane(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function Dne(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 L=$=>{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(ec(u[$])&&ec(r[$]))Object.assign(u[$],r[$]),($==="navigation"||$==="pagination"||$==="scrollbar")&&"enabled"in r[$]&&!r[$].enabled&&L($);else{const j=r[$];(j===!0||j===!1)&&($==="navigation"||$==="pagination"||$==="scrollbar")?j===!1&&L($):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 Bne(e,t){e===void 0&&(e={}),t===void 0&&(t=!0);const n={on:{}},r={},i={};du(n,X1),n._emitClasses=!0,n.init=!1;const o={},s=VI.map(l=>l.replace(/_/,"")),a=Object.assign({},e);return Object.keys(a).forEach(l=>{typeof e[l]>"u"||(s.indexOf(l)>=0?ec(e[l])?(n[l]={},i[l]={},du(n[l],e[l]),du(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 Fne(e,t){let{el:n,nextEl:r,prevEl:i,paginationEl:o,scrollbarEl:s,swiper:a}=e;KI(t)&&r&&i&&(a.params.navigation.nextEl=r,a.originalParams.navigation.nextEl=r,a.params.navigation.prevEl=i,a.originalParams.navigation.prevEl=i),qI(t)&&o&&(a.params.pagination.el=o,a.originalParams.pagination.el=o),YI(t)&&s&&(a.params.scrollbar.el=s,a.originalParams.scrollbar.el=s),a.init(n)}function zne(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 VI.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in e&&l in t)if(ec(e[l])&&ec(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 Une=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 bg(){return bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{XI(n)?t.push(n):n.props&&n.props.children&&JI(n.props.children).forEach(r=>t.push(r))}),t}function Wne(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return jt.Children.toArray(e).forEach(r=>{if(XI(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=JI(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 Gne(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 pf(e,t){return typeof window>"u"?C.useEffect(e,t):C.useLayoutEffect(e,t)}const BR=C.createContext(null),Hne=C.createContext(null),Lp=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:L,passedParams:$,rest:j,events:N}=Bne(a),{slides:F,slots:z}=Wne(o),K=()=>{h(!m)};Object.assign(L.on,{_containerClasses(V,ae){u(ae)}});const Z=()=>{Object.assign(L.on,N),l=!0;const V={...L};if(delete V.wrapperClass,b.current=new DS(V),b.current.virtual&&b.current.params.virtual.enabled){b.current.virtual.slides=F;const ae={cache:!1,slides:F,renderExternal:f,renderExternalUpdate:!1};du(b.current.params.virtual,ae),du(b.current.originalParams.virtual,ae)}};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)}),pf(()=>{if(t&&(t.current=E.current),!!E.current)return b.current.destroyed&&Z(),Fne({el:E.current,nextEl:_.current,prevEl:k.current,paginationEl:R.current,scrollbarEl:P.current,swiper:b.current},L),s&&!b.current.destroyed&&s(b.current),()=>{b.current&&!b.current.destroyed&&b.current.destroy(!0,!1)}},[]),pf(()=>{le();const V=zne($,w.current,F,y.current,ae=>ae.key);return w.current=$,y.current=F,V.length&&b.current&&!b.current.destroyed&&Dne({swiper:b.current,slides:F,passedParams:$,changedParams:V,nextEl:_.current,prevEl:k.current,scrollbarEl:P.current,paginationEl:R.current}),()=>{ce()}}),pf(()=>{Une(b.current)},[d]);function H(){return L.virtual?Gne(b.current,F,d):F.map((V,ae)=>jt.cloneElement(V,{swiper:b.current,swiperSlideIndex:ae}))}return jt.createElement(r,bg({ref:E,className:QI(`${c}${n?` ${n}`:""}`)},j),jt.createElement(Hne.Provider,{value:b.current},z["container-start"],jt.createElement(i,{className:Ane(L.wrapperClass)},z["wrapper-start"],H(),z["wrapper-end"]),KI(L)&&jt.createElement(jt.Fragment,null,jt.createElement("div",{ref:k,className:"swiper-button-prev"}),jt.createElement("div",{ref:_,className:"swiper-button-next"})),YI(L)&&jt.createElement("div",{ref:P,className:"swiper-scrollbar"}),qI(L)&&jt.createElement("div",{ref:R,className:"swiper-pagination"}),z["container-end"]))});Lp.displayName="Swiper";const Au=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)}pf(()=>{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)}}}),pf(()=>{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,bg({ref:d,className:QI(`${f}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:y},u),s&&jt.createElement(BR.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(BR.Provider,{value:b},w(),a&&!h&&jt.createElement("div",{className:"swiper-lazy-preloader"})))});Au.displayName="SwiperSlide";const Vne=({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 ZI({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 Kne(){const[e,t]=C.useState(!1),[n,r]=C.useState(!1),i=nD(C.useCallback(s=>s.nextLocation.pathname.startsWith("/game")?(t(!0),!0):!1,[t]));C.useEffect(()=>{r(!0)},[n,r]);const{active:o}=Js();return v.jsxs(nn,{style:{width:"100%",height:"100%",display:"flex",flexDirection:"row"},children:[v.jsx(cs,{children:v.jsxs(nn,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[v.jsxs(Ya,{separator:v.jsx(sc,{fontSize:"small"}),children:[v.jsx(Ao,{color:"inherit",href:"/game",size:"small",disabled:o,children:v.jsx(RS,{})}),o?v.jsx(Ct,{children:"Draft"}):v.jsx(_o,{underline:"hover",color:"inherit",href:"/game/draft",children:"Draft"}),v.jsx(Ct,{children:"Play"})]}),v.jsx(TS,{})]})}),v.jsx(qne,{}),v.jsx(x7,{open:e,onClose:()=>t(!1),autoHideDuration:5e3,children:v.jsx(s8,{severity:"warning",action:v.jsx(vn,{size:"small",onClick:i.proceed,children:"Exit Game"}),children:"Making changes to the team selections will reset the game state."})})]})}function qne(){const e=Mi(),t=Sx(e.breakpoints.up("sm")),{active:n}=Js(),{gameState1$:r,gameState2$:i}=ry(),[o,s]=C.useState();C.useEffect(()=>{if(!r)return;let d=!1;return(async()=>{const m=await zn(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 zn(i);d||l(m)})(),()=>{d=!0}},[i]);const[c,u]=uo(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()));Gs(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 Gs(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(Z0,{teams:[o],rosters:[c],disabled:[!1]}),v.jsx(To,{orientation:"vertical"}),v.jsx(Z0,{teams:[a],rosters:[u],disabled:[!!n]})]}):v.jsx(Z0,{teams:[o,a],rosters:[c,u],disabled:[!1,!!n]})}const Z0=({teams:e,rosters:t,disabled:n})=>{const r=Mi(),i=Sx(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(ete,{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(_v,{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(Lp,{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(ZI,{guild:y.guild}),t[_].map((k,R)=>()=>v.jsx(BI,{model:k,health$:y.get$("roster").pipe(Kt(P=>P[R].health)),children:v.jsx(Yne,{model:k,state:e[_],disabled:n[_]})}))]).flat(2).map((y,_)=>v.jsx(Au,{children:v.jsx("div",{style:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:y==null?void 0:y()})},_))})})})]})};function Yne({state:e,model:t,disabled:n=!1}){return v.jsx(as,{elevation:2,sx:{position:"absolute",right:0,bottom:0},children:v.jsx(AI,{state:e,model:t,disabled:n,stacked:!0})})}function Qne(){const e=Ys(),{setting$:t}=ci(),[n,r]=C.useState(null);C.useEffect(()=>{t&&zn(t).then(m=>m==null?void 0:m.incrementalPatch({gamePlayRoute:`${e.pathname}${e.search}`})).catch(console.error)},[e,t]);const{gbdb:i}=qr(),{active:o,netDoc:s}=Js(),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 zn(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 zn(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(cs,{children:[v.jsx(nn,{ref:m=>r(m),sx:{width:"100%",display:"flex",flexDirection:"row"}}),v.jsx(SJ,{})]}),v.jsx(ES.Provider,{value:n,children:v.jsx(Zw,{context:{gameState1$:c,gameState2$:d}})})]})}function Xne({model:e}){const{setting$:t}=ci(),n=C.useRef(null),[r,i]=C.useState(1),[o,s]=C.useState();C.useEffect(()=>{const d=t==null?void 0:t.pipe(Kt(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(mg,{model:e,noBackground:!!u,style:{"--scale":r,borderTopRightRadius:0,borderBottomRightRadius:0}}),v.jsx(gg,{model:e,noBackground:!!u,style:{"--scale":r,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})}const Jne="/assets/GB-S4-Reference-1-Cx3eC7d4.png",Zne="/assets/GB-S4-Reference-2-CJ4YgyH9.png",ere="/assets/GB-S4-Reference-3-BTbZpB51.png",tre="/assets/GB-S4-Reference-4-CpP58Tap.png",nre="/assets/GB-S4-Reference-5-Be8xjsp1.png",rre=new URL("/assets/GB-S4-Gameplans-2019-Dp99TQ1B.png",import.meta.url).href,eM=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(${rre})`,...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"})]})]})})},tM=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})})},ire=e=>v.jsx(tM,{children:v.jsx(eM,{...e})}),nM=e=>{const t=new URL(Object.assign({"../assets/cards/Reference/GB-S4-Reference-1.png":Jne,"../assets/cards/Reference/GB-S4-Reference-2.png":Zne,"../assets/cards/Reference/GB-S4-Reference-3.png":ere,"../assets/cards/Reference/GB-S4-Reference-4.png":tre,"../assets/cards/Reference/GB-S4-Reference-5.png":nre})[`../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}})},ore=e=>v.jsx(tM,{children:v.jsx(nM,{...e})});function sre(){const e=Ys(),{setting$:t}=ci(),[n]=TD(),r=C.useRef(n.get("m"));return C.useEffect(()=>{if(t)return zn(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${r.current}`})).catch(console.error),()=>{zn(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(Zw,{context:{slideRef:r}})})})}function are(){const{slideRef:e}=lp();return e.current=0,v.jsxs(v.Fragment,{children:[v.jsx(cs,{children:v.jsx(Ya,{separator:v.jsx(sc,{fontSize:"small"}),children:v.jsx(Ct,{children:"Library"})})}),v.jsx(yI,{Controller:lre}),v.jsx(ac,{})]})}function lre(e){const t=Va();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(W1,{g:{key:"gameplans",name:"gameplans",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("gameplans"),size:e.size}),v.jsx(W1,{g:{key:"refcards",name:"Rules",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("refcards"),size:e.size})]})}function cre(){const{guild:e}=VA(),t=Mi(),n=Sx(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=Va(),{slideRef:f}=lp(),[m,h]=uo(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}Gs(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(cs,{children:v.jsxs(Ya,{separator:v.jsx(sc,{fontSize:"small"}),children:[v.jsx(_o,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(Ct,{children:m.name})]})}),v.jsx(fre,{guild:m,swiper:c}),v.jsxs(nn,{ref:r,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsxs(Lp,{onSwiper:u,initialSlide:f.current,onSlideChange:g=>{f.current=g.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:s},children:[v.jsx(Au,{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(Vne,{guild:m.name}):v.jsx(ZI,{guild:m.name})})},m.name),h.map(g=>v.jsx(Au,{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,{model:g}):v.jsx(BI,{model:g})})},g.id))]}),v.jsx(ac,{})]})]})}function ure(){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}=lp(),{gameplans:u}=qr();return u?v.jsxs(v.Fragment,{children:[v.jsx(cs,{children:v.jsxs(Ya,{separator:v.jsx(sc,{fontSize:"small"}),children:[v.jsx(_o,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(Ct,{children:"Gameplan Cards"})]})}),v.jsx(pre,{swiper:a}),v.jsxs(nn,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsx(Lp,{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(Au,{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(ire,{gameplan:d})})},`gameplan-${f}`))}),v.jsx(ac,{})]})]}):null}function dre(){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}=lp();return v.jsxs(v.Fragment,{children:[v.jsx(cs,{children:v.jsxs(Ya,{separator:v.jsx(sc,{fontSize:"small"}),children:[v.jsx(_o,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(Ct,{children:"Rules Reference Cards"})]})}),v.jsx(hre,{swiper:a}),v.jsxs(nn,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsx(Lp,{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(Au,{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(ore,{index:u})})},`ref-${u}`))}),v.jsx(ac,{})]})]})}function fre(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(nn,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:[v.jsx(Ao,{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(Oi,{icon:t.name,className:"dark",fontSize:"32px",style:{flexShrink:0}})})})}),r.map((i,o)=>v.jsx(Bx,{color:"primary",label:i,onClick:()=>{n==null||n.slideTo(o+1)}},o))]}),v.jsx("div",{style:{flex:"1 1"}})]})}function pre(e){const{gameplans:t}=qr(),{swiper:n}=e;return t?v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsx(nn,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:t.map((r,i)=>v.jsx(Bx,{color:"primary",label:r.title,onClick:()=>{n==null||n.slideTo(i)}},i))}),v.jsx("div",{style:{flex:"1 1"}})]}):null}function hre(e){const{gameplans:t}=qr(),{swiper:n}=e;return t?v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsx(nn,{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(Bx,{color:"primary",label:r,onClick:()=>{n==null||n.slideTo(i)}},i))}),v.jsx("div",{style:{flex:"1 1"}})]}):null}const mre={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 gre=mre;const hf=gre,rM={},wg={},iM=[],oM=[],sM=[];for(const e in hf){const{name:t,nativeName:n}=hf[e];rM[e]=wg[t.toLowerCase()]=wg[n.toLowerCase()]={code:e,name:t,nativeName:n},iM.push(e),oM.push(t),sM.push(n)}var vre=class sm{static getLanguages(t=[]){return t.map(n=>sm.validate(n)?Object.assign({},rM[n]):{code:n,name:"",nativeName:""})}static getName(t){return sm.validate(t)?hf[t].name:""}static getAllNames(){return oM.slice()}static getNativeName(t){return sm.validate(t)?hf[t].nativeName:""}static getAllNativeNames(){return sM.slice()}static getCode(t){return t=t.toLowerCase(),wg.hasOwnProperty(t)?wg[t].code:""}static getAllCodes(){return iM.slice()}static validate(t){return hf.hasOwnProperty(t)}};const FR=Ua(vre),yre=()=>{var s;const{manifest:e}=qr(),{setting$:t}=ci(),{i18n:n}=lZ(),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(nn,{component:"main",sx:{p:"1rem"},children:[v.jsx(cs,{children:v.jsx(Ya,{children:v.jsx(Ct,{children:"Settings"})})}),v.jsxs(Ct,{variant:"h6",children:["GB Playbook ","2.1.0"]}),v.jsxs(Ct,{variant:"caption",children:["(","2024-08-19T20:30:34.670Z",")"]}),v.jsx(To,{sx:{my:2}}),v.jsx(Ct,{children:"Season and Errata Version:"}),v.jsx(bl,{children:v.jsx(El,{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(vi,{value:a.filename,children:`[${a.version}] ${a.description}`},l))})}),v.jsx("p",{}),v.jsx(Ct,{children:"Language Preference"}),v.jsx(Ct,{variant:"subtitle2",children:"(available languages vary by Season and Errata setting)"}),v.jsx(bl,{children:v.jsxs(El,{value:i.toJSON().data.language??"auto",onChange:a=>{i==null||i.incrementalPatch({language:a.target.value})},children:[v.jsx(vi,{value:"auto",children:`Automatic Detection (${FR.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(vi,{value:a,children:`${FR.getNativeName(a)}`},l))]})}),v.jsx(To,{sx:{my:2}}),v.jsx(Ct,{children:"UI Options:"}),v.jsx(Ct,{children:"Initial Screen:"}),v.jsx(bl,{children:v.jsxs(El,{value:i==null?void 0:i.toJSON().data.initialScreen,onChange:a=>{i==null||i.incrementalPatch({initialScreen:a.target.value})},children:[v.jsx(vi,{value:"/game",children:"Game Play"}),v.jsx(vi,{value:"/library",children:"Card Library"})]})}),v.jsx("p",{}),v.jsx(bl,{children:v.jsx(js,{control:v.jsx($7,{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(Ct,{children:"Prefered Card Layout:"}),v.jsx(Ct,{variant:"subtitle2",children:"(Only applies to updated cards, where both styles are available)"}),v.jsx(bl,{children:v.jsxs(El,{value:i==null?void 0:i.toJSON().data.cardPreferences.preferredStyle,onChange:a=>{i==null||i.incrementalPatch({cardPreferences:{preferredStyle:a.target.value}})},children:[v.jsx(vi,{value:"sfg",children:"Steamforged"}),v.jsx(vi,{value:"gbcp",children:"Community"})]})})]})};var BS={},bre=oo;Object.defineProperty(BS,"__esModule",{value:!0});var aM=BS.default=void 0,wre=bre(ls()),xre=v;aM=BS.default=(0,wre.default)((0,xre.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 FS={},Sre=oo;Object.defineProperty(FS,"__esModule",{value:!0});var lM=FS.default=void 0,_re=Sre(ls()),Cre=v;lM=FS.default=(0,_re.default)((0,Cre.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 zS={},kre=oo;Object.defineProperty(zS,"__esModule",{value:!0});var cM=zS.default=void 0,Ere=kre(ls()),Rre=v;cM=zS.default=(0,Ere.default)((0,Rre.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 US={},Pre=oo;Object.defineProperty(US,"__esModule",{value:!0});var uM=US.default=void 0,Tre=Pre(ls()),Ore=v;uM=US.default=(0,Tre.default)((0,Ore.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 jre=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}; - margin: 0; - } - .Cards > .card { - margin: 0; - } - } - `),document.head.appendChild(g),()=>{document.head.removeChild(g)}},[l,u,s]),v.jsxs(v.Fragment,{children:[v.jsx(Xh,{title:"Print Settings",arrow:!0,children:v.jsx(Ao,{size:"small",onClick:i,children:v.jsx(yJ,{})})}),v.jsx(Bv,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"center"},open:r,onClose:o,children:v.jsxs(Gm,{margin:2,children:[v.jsx(js,{label:"Double Wide Cards",control:v.jsx(Os,{checked:l,onChange:()=>c(!l)})}),v.jsx(js,{label:"With Print Bleed",control:v.jsx(Os,{checked:u,onChange:()=>d(!u)})}),v.jsx(js,{label:"Set Page to Card Size",control:v.jsx(Os,{checked:!s,onChange:()=>a(!s)})})]})})]})},Lre=()=>{const{gbdb:e,gameplans:t}=qr(),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,_])=>(Gs(w,"id",b.flatMap(k=>k.roster)),Gs(_,"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(nn,{component:"main",sx:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},children:[v.jsx(cs,{children:v.jsxs(nn,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[v.jsx(Ct,{children:"Card Printer"}),v.jsxs(nn,{children:[v.jsx(jre,{withBleed:u,setBleed:d,doubleCard:l,setDouble:c,noFun:f,setNoFun:m}),v.jsx(Xh,{title:"Print",arrow:!0,children:v.jsx(Ao,{size:"small",onClick:()=>{window.print()},children:v.jsx(aM,{})})})]})]})}),v.jsxs(nn,{className:"controls no-print",sx:{p:"1rem"},children:[v.jsx(Ire,{ref:r}),v.jsxs(nn,{sx:{display:"flex",flexDirection:"column",my:"0.5rem"},children:[v.jsxs(nn,{sx:{position:"relative"},children:[v.jsxs(Gf,{variant:"text",sx:{mb:"0.5rem"},children:[v.jsx(Xh,{title:"Select All",arrow:!0,children:v.jsx(vn,{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(lM,{})})}),v.jsx(Xh,{title:"Clear All",arrow:!0,children:v.jsx(vn,{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(cM,{})})})]}),v.jsx(ac,{})]}),v.jsx(Bre,{ref:n})]}),v.jsx(To,{}),v.jsx(nn,{children:v.jsx(vn,{variant:"text",color:"primary",startIcon:v.jsx(uM,{}),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(nn,{className:"Cards",children:[i.map(h=>v.jsx(zre,{name:h,bleed:u,doubleCard:l},h)),s.map(h=>v.jsx(Fre,{name:h,id:h,bleed:u,noFun:f,doubleCard:l},h)),t==null?void 0:t.map((h,g)=>v.jsx(Ure,{gameplan:h,bleed:u},`gameplan-${g}`)),t==null?void 0:t.map((h,g)=>v.jsx(Wre,{index:g,bleed:u},`refcard-${g}`))]})]})},Ire=C.forwardRef((e,t)=>{const[n,r]=C.useState(void 0);C.useImperativeHandle(t,()=>({guild:n}),[n]);const i=uo(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(bl,{size:"small",children:[v.jsx(XO,{children:"Guild"}),v.jsxs(El,{label:"Guild",onChange:s,defaultValue:"",children:[v.jsx(vi,{value:"refcards",dense:!0,children:v.jsx(J1,{text:"Rules Reference Cards",icon:"GB",style:{"--color":"#333333"}})},"redcards"),v.jsx(vi,{value:"gameplans",dense:!0,children:v.jsx(J1,{text:"Gameplans",icon:"GB",style:{"--color":"#333333"}})},"gameplans"),i.map(a=>v.jsx(vi,{value:a.name,dense:!0,children:v.jsx(Mre,{g:a})},a.name))]})]})}),Mre=({g:e})=>v.jsx(J1,{text:e.name,icon:e.name,style:{"--color":e.shadow??e.color}}),J1=({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(Oi,{icon:t,className:"dark",style:{flexShrink:0}})}),v.jsx("span",{style:{color:"white",alignSelf:"center",marginLeft:"1em",marginRight:"1em"},children:e})]})},e),za=e=>{document.querySelectorAll(`.card#${e}`).forEach(t=>t==null?void 0:t.classList.toggle("hide"))},Nre=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),za(e.g.name))}}),[e.g,n,r]),v.jsx(js,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Os,{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),za(i.name)}})}),$re=C.forwardRef((e,t)=>{const[n,r]=C.useState(!1);C.useImperativeHandle(t,()=>({m:e.m,checked:n,setChecked:a=>{n!==a&&(r(a),za(e.m.id))}}),[e.m,n,r]);const i=e.m,[o,s]=uo(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(js,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Os,{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),za(i.id)}}):null}),Are=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),za(e.g.title.replace(/[^a-zA-Z0-9]+/g,"")))}}),[e.g,n,r]),v.jsx(js,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Os,{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),za(e.g.title.replace(/[^a-zA-Z0-9]+/g,""))}})}),Dre=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),za(`refcard-${e.id}`))}}),[e.id,n,r]),v.jsx(js,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Os,{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),za(`refcard-${e.id}`)}})}),Bre=C.forwardRef((e,t)=>{const{gbdb:n,gameplans:r}=qr(),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])=>(Gs(E,"id",g.flatMap(y=>y.roster)),Gs(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(nn,{className:"model-list-container",style:{"--major-order":0,"--minor-order":2},children:[r.map(f=>v.jsx(Are,{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(Dre,{id:m,ref:h=>{h?a.current.set(f,h):a.current.delete(f)}},`refcard-${m}`)),l.map(f=>v.jsx(Nre,{g:f,ref:m=>{m?o.current.set(f.name,m):o.current.delete(f.name)}},f.name)),u.map(f=>v.jsx($re,{m:f,ref:m=>{m?i.current.set(f.id,m):i.current.delete(f.id)}},f.id))]})}),Fre=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]=ty(l),u=uo(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(mg,{className:`card-front double ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:d,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"}}),v.jsx(gg,{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(mg,{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(gg,{className:`card-back print ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:f,borderRadius:0,"--scale":"calc(2.5 * (96 / 500))"}})})]})},zre=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]=ty(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}})})})]})},Ure=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]=ty(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(eM,{gameplan:t,style:{borderRadius:0},bleed:n})})})},Wre=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]=ty(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(nM,{index:t+1,style:{borderRadius:0},bleed:n})})};function Gre(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 KX(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}Gre({immediate:!0});const Hre=pD(Yb(v.jsxs(v.Fragment,{children:[v.jsx(Jr,{path:"/",element:v.jsx(iD,{to:await an.getLocal("settings").then(e=>{const t=(e==null?void 0:e.get("initialScreen"))??oI.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(Jr,{element:v.jsx(pJ,{}),children:[v.jsxs(Jr,{element:v.jsx(Qne,{}),children:[v.jsx(Jr,{path:"game",element:v.jsx(Iee,{})}),v.jsx(Jr,{path:"game/draft",element:v.jsx(zee,{})}),v.jsx(Jr,{path:"game/draft/play",element:v.jsx(Kne,{})})]}),v.jsxs(Jr,{path:"library",element:v.jsx(sre,{}),children:[v.jsx(Jr,{index:!0,element:v.jsx(are,{})}),v.jsx(Jr,{path:"gameplans",element:v.jsx(ure,{})}),v.jsx(Jr,{path:"refcards",element:v.jsx(dre,{})}),v.jsx(Jr,{path:":guild",element:v.jsx(cre,{})})]}),v.jsx(Jr,{path:"print",element:v.jsx(Lre,{})}),v.jsx(Jr,{path:"settings",element:v.jsx(yre,{})})]})]}))),Vre=eb.createRoot(document.getElementById("root"));Vre.render(v.jsx(uJ,{children:v.jsx(_Z,{children:v.jsx(xD,{router:Hre})})})); diff --git a/index.html b/index.html index f5b714e..79811bc 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ - + diff --git a/sw.js b/sw.js index 683da41..dc7944c 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-CQ385N7c.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:"ad09de3ec27e4c2d6d40dfbdaaaaafd5"},{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:"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:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{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-CJJ9dfwM.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:"e91343debaeb48987a9fef7eaf1ba829"},{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:"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:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{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")}));