@netless/window-manager 1.0.0-canary.32 → 1.0.0-canary.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -81,8 +81,8 @@ var gS=Object.defineProperty,mS=Object.defineProperties;var vS=Object.getOwnProp
81
81
  overflow: hidden;
82
82
  background-color: #fff;
83
83
  background-color: var(--tele-boxStageBackground, #fff);
84
- boxShadow: 0px 0px 16px rgba(0, 0, 0, 0.08);
85
- boxShadow: var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, 0.08));
84
+ box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.08);
85
+ box-shadow: var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, 0.08));
86
86
  }
87
87
  .telebox-footer-wrap {
88
88
  flex-shrink: 0;
@@ -112,8 +112,8 @@ var gS=Object.defineProperty,mS=Object.defineProperties;var vS=Object.getOwnProp
112
112
  .telebox-color-scheme-dark .telebox-box-stage {
113
113
  background-color: #272a30;
114
114
  background-color: var(--tele-boxStageBackground, #272a30);
115
- boxShadow: 0px 0px 16px rgba(0, 0, 0, 0.24);
116
- boxShadow: var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, 0.24));
115
+ box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.24);
116
+ box-shadow: var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, 0.24));
117
117
  }
118
118
  .telebox-color-scheme-dark .telebox-footer-wrap {
119
119
  color: #e9e9e9;
@@ -151,4 +151,4 @@ object-assign
151
151
  in `+(n||"Unknown")+s}t+=i,e=e.return}while(e);return t}function Vt(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Jd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qy(e){var t=Jd(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof i!="undefined"&&typeof i.get=="function"&&typeof i.set=="function"){var r=i.get,s=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fr(e){e._valueTracker||(e._valueTracker=qy(e))}function Kd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),n="";return e&&(n=Jd(e)?e.checked?"true":"false":e.value),e=n,e!==i?(t.setValue(e),!0):!1}function xa(e,t){var i=t.checked;return Se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i!=null?i:e._wrapperState.initialChecked})}function qd(e,t){var i=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;i=Vt(t.value!=null?t.value:i),e._wrapperState={initialChecked:n,initialValue:i,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function eh(e,t){t=t.checked,t!=null&&ga(e,"checked",t,!1)}function Sa(e,t){eh(e,t);var i=Vt(t.value),n=t.type;if(i!=null)n==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ca(e,t.type,i):t.hasOwnProperty("defaultValue")&&Ca(e,t.type,Vt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function th(e,t,i){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,i||t===e.value||(e.value=t),e.defaultValue=t}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function Ca(e,t,i){(t!=="number"||e.ownerDocument.activeElement!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}function e0(e){var t="";return Rr.Children.forEach(e,function(i){i!=null&&(t+=i)}),t}function Ma(e,t){return e=Se({children:void 0},t),(t=e0(t.children))&&(e.children=t),e}function $i(e,t,i,n){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&n&&(e[i].defaultSelected=!0)}else{for(i=""+Vt(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,n&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Ia(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(S(91));return Se({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ih(e,t){var i=t.value;if(i==null){if(i=t.children,t=t.defaultValue,i!=null){if(t!=null)throw Error(S(92));if(Array.isArray(i)){if(!(1>=i.length))throw Error(S(93));i=i[0]}t=i}t==null&&(t=""),i=t}e._wrapperState={initialValue:Vt(i)}}function nh(e,t){var i=Vt(t.value),n=Vt(t.defaultValue);i!=null&&(i=""+i,i!==e.value&&(e.value=i),t.defaultValue==null&&e.defaultValue!==i&&(e.defaultValue=i)),n!=null&&(e.defaultValue=""+n)}function rh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var sh={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function oh(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ba(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?oh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Qr,ah=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,i,n,r){MSApp.execUnsafeLocalFunction(function(){return e(t,i,n,r)})}:e}(function(e,t){if(e.namespaceURI!==sh.svg||"innerHTML"in e)e.innerHTML=t;else{for(Qr=Qr||document.createElement("div"),Qr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Qr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Tn(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}function Zr(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ui={animationend:Zr("Animation","AnimationEnd"),animationiteration:Zr("Animation","AnimationIteration"),animationstart:Zr("Animation","AnimationStart"),transitionend:Zr("Transition","TransitionEnd")},Aa={},lh={};Lt&&(lh=document.createElement("div").style,"AnimationEvent"in window||(delete Ui.animationend.animation,delete Ui.animationiteration.animation,delete Ui.animationstart.animation),"TransitionEvent"in window||delete Ui.transitionend.transition);function Yr(e){if(Aa[e])return Aa[e];if(!Ui[e])return e;var t=Ui[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in lh)return Aa[e]=t[i];return e}var uh=Yr("animationend"),ch=Yr("animationiteration"),dh=Yr("animationstart"),hh=Yr("transitionend"),Nn="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ph=new(typeof WeakMap=="function"?WeakMap:Map);function Ea(e){var t=ph.get(e);return t===void 0&&(t=new Map,ph.set(e,t)),t}function hi(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.effectTag&1026)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function fh(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function gh(e){if(hi(e)!==e)throw Error(S(188))}function t0(e){var t=e.alternate;if(!t){if(t=hi(e),t===null)throw Error(S(188));return t!==e?null:e}for(var i=e,n=t;;){var r=i.return;if(r===null)break;var s=r.alternate;if(s===null){if(n=r.return,n!==null){i=n;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===i)return gh(r),e;if(s===n)return gh(r),t;s=s.sibling}throw Error(S(188))}if(i.return!==n.return)i=r,n=s;else{for(var o=!1,a=r.child;a;){if(a===i){o=!0,i=r,n=s;break}if(a===n){o=!0,n=r,i=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===i){o=!0,i=s,n=r;break}if(a===n){o=!0,n=s,i=r;break}a=a.sibling}if(!o)throw Error(S(189))}}if(i.alternate!==n)throw Error(S(190))}if(i.tag!==3)throw Error(S(188));return i.stateNode.current===i?e:t}function mh(e){if(e=t0(e),!e)return null;for(var t=e;;){if(t.tag===5||t.tag===6)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Hi(e,t){if(t==null)throw Error(S(30));return e==null?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function Ta(e,t,i){Array.isArray(e)?e.forEach(t,i):e&&t.call(i,e)}var kn=null;function i0(e){if(e){var t=e._dispatchListeners,i=e._dispatchInstances;if(Array.isArray(t))for(var n=0;n<t.length&&!e.isPropagationStopped();n++)zd(e,t[n],i[n]);else t&&zd(e,t,i);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function Gr(e){if(e!==null&&(kn=Hi(kn,e)),e=kn,kn=null,e){if(Ta(e,i0),kn)throw Error(S(95));if(Or)throw e=ra,Or=!1,ra=null,e}}function Na(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function vh(e){if(!Lt)return!1;e="on"+e;var t=e in document;return t||(t=document.createElement("div"),t.setAttribute(e,"return;"),t=typeof t[e]=="function"),t}var Xr=[];function wh(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>Xr.length&&Xr.push(e)}function yh(e,t,i,n){if(Xr.length){var r=Xr.pop();return r.topLevelType=e,r.eventSystemFlags=n,r.nativeEvent=t,r.targetInst=i,r}return{topLevelType:e,eventSystemFlags:n,nativeEvent:t,targetInst:i,ancestors:[]}}function xh(e){var t=e.targetInst,i=t;do{if(!i){e.ancestors.push(i);break}var n=i;if(n.tag===3)n=n.stateNode.containerInfo;else{for(;n.return;)n=n.return;n=n.tag!==3?null:n.stateNode.containerInfo}if(!n)break;t=i.tag,t!==5&&t!==6||e.ancestors.push(i),i=On(n)}while(i);for(i=0;i<e.ancestors.length;i++){t=e.ancestors[i];var r=Na(e.nativeEvent);n=e.topLevelType;var s=e.nativeEvent,o=e.eventSystemFlags;i===0&&(o|=64);for(var a=null,l=0;l<$r.length;l++){var u=$r[l];u&&(u=u.extractEvents(n,t,s,r,o))&&(a=Hi(a,u))}Gr(a)}}function ka(e,t,i){if(!i.has(e)){switch(e){case"scroll":Vn(t,"scroll",!0);break;case"focus":case"blur":Vn(t,"focus",!0),Vn(t,"blur",!0),i.set("blur",null),i.set("focus",null);break;case"cancel":case"close":vh(e)&&Vn(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:Nn.indexOf(e)===-1&&X(e,t)}i.set(e,null)}}var Sh,Pa,Ch,za=!1,lt=[],Rt=null,Bt=null,Ot=null,Pn=new Map,zn=new Map,Dn=[],Da="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),n0="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function r0(e,t){var i=Ea(t);Da.forEach(function(n){ka(n,t,i)}),n0.forEach(function(n){ka(n,t,i)})}function ja(e,t,i,n,r){return{blockedOn:e,topLevelType:t,eventSystemFlags:i|32,nativeEvent:r,container:n}}function Mh(e,t){switch(e){case"focus":case"blur":Rt=null;break;case"dragenter":case"dragleave":Bt=null;break;case"mouseover":case"mouseout":Ot=null;break;case"pointerover":case"pointerout":Pn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zn.delete(t.pointerId)}}function jn(e,t,i,n,r,s){return e===null||e.nativeEvent!==s?(e=ja(t,i,n,r,s),t!==null&&(t=_n(t),t!==null&&Pa(t)),e):(e.eventSystemFlags|=n,e)}function s0(e,t,i,n,r){switch(t){case"focus":return Rt=jn(Rt,e,t,i,n,r),!0;case"dragenter":return Bt=jn(Bt,e,t,i,n,r),!0;case"mouseover":return Ot=jn(Ot,e,t,i,n,r),!0;case"pointerover":var s=r.pointerId;return Pn.set(s,jn(Pn.get(s)||null,e,t,i,n,r)),!0;case"gotpointercapture":return s=r.pointerId,zn.set(s,jn(zn.get(s)||null,e,t,i,n,r)),!0}return!1}function o0(e){var t=On(e.target);if(t!==null){var i=hi(t);if(i!==null){if(t=i.tag,t===13){if(t=fh(i),t!==null){e.blockedOn=t,de.unstable_runWithPriority(e.priority,function(){Ch(i)});return}}else if(t===3&&i.stateNode.hydrate){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Jr(e){if(e.blockedOn!==null)return!1;var t=Ba(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(t!==null){var i=_n(t);return i!==null&&Pa(i),e.blockedOn=t,!1}return!0}function Ih(e,t,i){Jr(e)&&i.delete(t)}function a0(){for(za=!1;0<lt.length;){var e=lt[0];if(e.blockedOn!==null){e=_n(e.blockedOn),e!==null&&Sh(e);break}var t=Ba(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);t!==null?e.blockedOn=t:lt.shift()}Rt!==null&&Jr(Rt)&&(Rt=null),Bt!==null&&Jr(Bt)&&(Bt=null),Ot!==null&&Jr(Ot)&&(Ot=null),Pn.forEach(Ih),zn.forEach(Ih)}function Ln(e,t){e.blockedOn===t&&(e.blockedOn=null,za||(za=!0,de.unstable_scheduleCallback(de.unstable_NormalPriority,a0)))}function bh(e){function t(r){return Ln(r,e)}if(0<lt.length){Ln(lt[0],e);for(var i=1;i<lt.length;i++){var n=lt[i];n.blockedOn===e&&(n.blockedOn=null)}}for(Rt!==null&&Ln(Rt,e),Bt!==null&&Ln(Bt,e),Ot!==null&&Ln(Ot,e),Pn.forEach(t),zn.forEach(t),i=0;i<Dn.length;i++)n=Dn[i],n.blockedOn===e&&(n.blockedOn=null);for(;0<Dn.length&&(i=Dn[0],i.blockedOn===null);)o0(i),i.blockedOn===null&&Dn.shift()}var Ah={},Eh=new Map,La=new Map,l0=["abort","abort",uh,"animationEnd",ch,"animationIteration",dh,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",hh,"transitionEnd","waiting","waiting"];function Va(e,t){for(var i=0;i<e.length;i+=2){var n=e[i],r=e[i+1],s="on"+(r[0].toUpperCase()+r.slice(1));s={phasedRegistrationNames:{bubbled:s,captured:s+"Capture"},dependencies:[n],eventPriority:t},La.set(n,t),Eh.set(n,s),Ah[r]=s}}Va("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Va("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Va(l0,2);for(var Th="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ra=0;Ra<Th.length;Ra++)La.set(Th[Ra],0);var u0=de.unstable_UserBlockingPriority,c0=de.unstable_runWithPriority,Kr=!0;function X(e,t){Vn(t,e,!1)}function Vn(e,t,i){var n=La.get(t);switch(n===void 0?2:n){case 0:n=d0.bind(null,t,1,e);break;case 1:n=h0.bind(null,t,1,e);break;default:n=qr.bind(null,t,1,e)}i?e.addEventListener(t,n,!0):e.addEventListener(t,n,!1)}function d0(e,t,i,n){ci||ca();var r=qr,s=ci;ci=!0;try{Od(r,e,t,i,n)}finally{(ci=s)||ha()}}function h0(e,t,i,n){c0(u0,qr.bind(null,e,t,i,n))}function qr(e,t,i,n){if(Kr)if(0<lt.length&&-1<Da.indexOf(e))e=ja(null,e,t,i,n),lt.push(e);else{var r=Ba(e,t,i,n);if(r===null)Mh(e,n);else if(-1<Da.indexOf(e))e=ja(r,e,t,i,n),lt.push(e);else if(!s0(r,e,t,i,n)){Mh(e,n),e=yh(e,n,null,t);try{$d(xh,e)}finally{wh(e)}}}}function Ba(e,t,i,n){if(i=Na(n),i=On(i),i!==null){var r=hi(i);if(r===null)i=null;else{var s=r.tag;if(s===13){if(i=fh(r),i!==null)return i;i=null}else if(s===3){if(r.stateNode.hydrate)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}e=yh(e,n,i,t);try{$d(xh,e)}finally{wh(e)}return null}var Rn={animationIterationCount:!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},p0=["Webkit","ms","Moz","O"];Object.keys(Rn).forEach(function(e){p0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Rn[t]=Rn[e]})});function Nh(e,t,i){return t==null||typeof t=="boolean"||t===""?"":i||typeof t!="number"||t===0||Rn.hasOwnProperty(e)&&Rn[e]?(""+t).trim():t+"px"}function kh(e,t){e=e.style;for(var i in t)if(t.hasOwnProperty(i)){var n=i.indexOf("--")===0,r=Nh(i,t[i],n);i==="float"&&(i="cssFloat"),n?e.setProperty(i,r):e[i]=r}}var f0=Se({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 Oa(e,t){if(t){if(f0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(S(137,e,""));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(S(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(S(61))}if(t.style!=null&&typeof t.style!="object")throw Error(S(62,""))}}function _a(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 Ph=sh.html;function xt(e,t){e=e.nodeType===9||e.nodeType===11?e:e.ownerDocument;var i=Ea(e);t=aa[t];for(var n=0;n<t.length;n++)ka(t[n],e,i)}function es(){}function $a(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch{return e.body}}function zh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dh(e,t){var i=zh(e);e=0;for(var n;i;){if(i.nodeType===3){if(n=e+i.textContent.length,e<=t&&n>=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=zh(i)}}function jh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lh(){for(var e=window,t=$a();t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=$a(e.document)}return t}function Ua(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")}var Vh="$",Rh="/$",Ha="$?",Wa="$!",Fa=null,Qa=null;function Bh(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Za(e,t){return e==="textarea"||e==="option"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ya=typeof setTimeout=="function"?setTimeout:void 0,g0=typeof clearTimeout=="function"?clearTimeout:void 0;function Wi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function Oh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i===Vh||i===Wa||i===Ha){if(t===0)return e;t--}else i===Rh&&t++}e=e.previousSibling}return null}var Ga=Math.random().toString(36).slice(2),_t="__reactInternalInstance$"+Ga,ts="__reactEventHandlers$"+Ga,Bn="__reactContainere$"+Ga;function On(e){var t=e[_t];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Bn]||i[_t]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Oh(e);e!==null;){if(i=e[_t])return i;e=Oh(e)}return t}e=i,i=e.parentNode}return null}function _n(e){return e=e[_t]||e[Bn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function pi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(S(33))}function Xa(e){return e[ts]||null}function St(e){do e=e.return;while(e&&e.tag!==5);return e||null}function _h(e,t){var i=e.stateNode;if(!i)return null;var n=sa(i);if(!n)return null;i=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(S(231,t,typeof i));return i}function $h(e,t,i){(t=_h(e,i.dispatchConfig.phasedRegistrationNames[t]))&&(i._dispatchListeners=Hi(i._dispatchListeners,t),i._dispatchInstances=Hi(i._dispatchInstances,e))}function m0(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,i=[];t;)i.push(t),t=St(t);for(t=i.length;0<t--;)$h(i[t],"captured",e);for(t=0;t<i.length;t++)$h(i[t],"bubbled",e)}}function Ja(e,t,i){e&&i&&i.dispatchConfig.registrationName&&(t=_h(e,i.dispatchConfig.registrationName))&&(i._dispatchListeners=Hi(i._dispatchListeners,t),i._dispatchInstances=Hi(i._dispatchInstances,e))}function v0(e){e&&e.dispatchConfig.registrationName&&Ja(e._targetInst,null,e)}function Fi(e){Ta(e,m0)}var $t=null,Ka=null,is=null;function Uh(){if(is)return is;var e,t=Ka,i=t.length,n,r="value"in $t?$t.value:$t.textContent,s=r.length;for(e=0;e<i&&t[e]===r[e];e++);var o=i-e;for(n=1;n<=o&&t[i-n]===r[s-n];n++);return is=r.slice(e,1<n?1-n:void 0)}function ns(){return!0}function rs(){return!1}function je(e,t,i,n){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=i,e=this.constructor.Interface;for(var r in e)e.hasOwnProperty(r)&&((t=e[r])?this[r]=t(i):r==="target"?this.target=n:this[r]=i[r]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ns:rs,this.isPropagationStopped=rs,this}Se(je.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!="unknown"&&(e.returnValue=!1),this.isDefaultPrevented=ns)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!="unknown"&&(e.cancelBubble=!0),this.isPropagationStopped=ns)},persist:function(){this.isPersistent=ns},isPersistent:rs,destructor:function(){var e=this.constructor.Interface,t;for(t in e)this[t]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=rs,this._dispatchInstances=this._dispatchListeners=null}}),je.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},je.extend=function(e){function t(){}function i(){return n.apply(this,arguments)}var n=this;t.prototype=n.prototype;var r=new t;return Se(r,i.prototype),i.prototype=r,i.prototype.constructor=i,i.Interface=Se({},n.Interface,e),i.extend=n.extend,Hh(i),i},Hh(je);function w0(e,t,i,n){if(this.eventPool.length){var r=this.eventPool.pop();return this.call(r,e,t,i,n),r}return new this(e,t,i,n)}function y0(e){if(!(e instanceof this))throw Error(S(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Hh(e){e.eventPool=[],e.getPooled=w0,e.release=y0}var x0=je.extend({data:null}),S0=je.extend({data:null}),C0=[9,13,27,32],qa=Lt&&"CompositionEvent"in window,$n=null;Lt&&"documentMode"in document&&($n=document.documentMode);var M0=Lt&&"TextEvent"in window&&!$n,Wh=Lt&&(!qa||$n&&8<$n&&11>=$n),Fh=String.fromCharCode(32),Ct={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Qh=!1;function Zh(e,t){switch(e){case"keyup":return C0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Yh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qi=!1;function I0(e,t){switch(e){case"compositionend":return Yh(t);case"keypress":return t.which!==32?null:(Qh=!0,Fh);case"textInput":return e=t.data,e===Fh&&Qh?null:e;default:return null}}function b0(e,t){if(Qi)return e==="compositionend"||!qa&&Zh(e,t)?(e=Uh(),is=Ka=$t=null,Qi=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Wh&&t.locale!=="ko"?null:t.data;default:return null}}var A0={eventTypes:Ct,extractEvents:function(e,t,i,n){var r;if(qa)e:{switch(e){case"compositionstart":var s=Ct.compositionStart;break e;case"compositionend":s=Ct.compositionEnd;break e;case"compositionupdate":s=Ct.compositionUpdate;break e}s=void 0}else Qi?Zh(e,i)&&(s=Ct.compositionEnd):e==="keydown"&&i.keyCode===229&&(s=Ct.compositionStart);return s?(Wh&&i.locale!=="ko"&&(Qi||s!==Ct.compositionStart?s===Ct.compositionEnd&&Qi&&(r=Uh()):($t=n,Ka="value"in $t?$t.value:$t.textContent,Qi=!0)),s=x0.getPooled(s,t,i,n),r?s.data=r:(r=Yh(i),r!==null&&(s.data=r)),Fi(s),r=s):r=null,(e=M0?I0(e,i):b0(e,i))?(t=S0.getPooled(Ct.beforeInput,t,i,n),t.data=e,Fi(t)):t=null,r===null?t:t===null?r:[r,t]}},E0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!E0[e.type]:t==="textarea"}var Xh={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Jh(e,t,i){return e=je.getPooled(Xh.change,e,t,i),e.type="change",Rd(i),Fi(e),e}var Un=null,Hn=null;function T0(e){Gr(e)}function ss(e){var t=pi(e);if(Kd(t))return e}function N0(e,t){if(e==="change")return t}var el=!1;Lt&&(el=vh("input")&&(!document.documentMode||9<document.documentMode));function Kh(){Un&&(Un.detachEvent("onpropertychange",qh),Hn=Un=null)}function qh(e){if(e.propertyName==="value"&&ss(Hn))if(e=Jh(Hn,e,Na(e)),ci)Gr(e);else{ci=!0;try{ua(T0,e)}finally{ci=!1,ha()}}}function k0(e,t,i){e==="focus"?(Kh(),Un=t,Hn=i,Un.attachEvent("onpropertychange",qh)):e==="blur"&&Kh()}function P0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ss(Hn)}function z0(e,t){if(e==="click")return ss(t)}function D0(e,t){if(e==="input"||e==="change")return ss(t)}var j0={eventTypes:Xh,_isInputEventSupported:el,extractEvents:function(e,t,i,n){var r=t?pi(t):window,s=r.nodeName&&r.nodeName.toLowerCase();if(s==="select"||s==="input"&&r.type==="file")var o=N0;else if(Gh(r))if(el)o=D0;else{o=P0;var a=k0}else(s=r.nodeName)&&s.toLowerCase()==="input"&&(r.type==="checkbox"||r.type==="radio")&&(o=z0);if(o&&(o=o(e,t)))return Jh(o,i,n);a&&a(e,r,t),e==="blur"&&(e=r._wrapperState)&&e.controlled&&r.type==="number"&&Ca(r,"number",r.value)}},Wn=je.extend({view:null,detail:null}),L0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function V0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=L0[e])?!!t[e]:!1}function tl(){return V0}var ep=0,tp=0,ip=!1,np=!1,Fn=Wn.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:tl,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=ep;return ep=e.screenX,ip?e.type==="mousemove"?e.screenX-t:0:(ip=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=tp;return tp=e.screenY,np?e.type==="mousemove"?e.screenY-t:0:(np=!0,0)}}),rp=Fn.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Qn={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},R0={eventTypes:Qn,extractEvents:function(e,t,i,n,r){var s=e==="mouseover"||e==="pointerover",o=e==="mouseout"||e==="pointerout";if(s&&(r&32)===0&&(i.relatedTarget||i.fromElement)||!o&&!s)return null;if(s=n.window===n?n:(s=n.ownerDocument)?s.defaultView||s.parentWindow:window,o){if(o=t,t=(t=i.relatedTarget||i.toElement)?On(t):null,t!==null){var a=hi(t);(t!==a||t.tag!==5&&t.tag!==6)&&(t=null)}}else o=null;if(o===t)return null;if(e==="mouseout"||e==="mouseover")var l=Fn,u=Qn.mouseLeave,h=Qn.mouseEnter,p="mouse";else(e==="pointerout"||e==="pointerover")&&(l=rp,u=Qn.pointerLeave,h=Qn.pointerEnter,p="pointer");if(e=o==null?s:pi(o),s=t==null?s:pi(t),u=l.getPooled(u,o,i,n),u.type=p+"leave",u.target=e,u.relatedTarget=s,i=l.getPooled(h,t,i,n),i.type=p+"enter",i.target=s,i.relatedTarget=e,n=o,p=t,n&&p)e:{for(l=n,h=p,o=0,e=l;e;e=St(e))o++;for(e=0,t=h;t;t=St(t))e++;for(;0<o-e;)l=St(l),o--;for(;0<e-o;)h=St(h),e--;for(;o--;){if(l===h||l===h.alternate)break e;l=St(l),h=St(h)}l=null}else l=null;for(h=l,l=[];n&&n!==h&&(o=n.alternate,!(o!==null&&o===h));)l.push(n),n=St(n);for(n=[];p&&p!==h&&(o=p.alternate,!(o!==null&&o===h));)n.push(p),p=St(p);for(p=0;p<l.length;p++)Ja(l[p],"bubbled",u);for(p=n.length;0<p--;)Ja(n[p],"captured",i);return(r&64)===0?[u]:[u,i]}};function B0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fi=typeof Object.is=="function"?Object.is:B0,O0=Object.prototype.hasOwnProperty;function Zn(e,t){if(fi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;for(n=0;n<i.length;n++)if(!O0.call(t,i[n])||!fi(e[i[n]],t[i[n]]))return!1;return!0}var _0=Lt&&"documentMode"in document&&11>=document.documentMode,sp={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Zi=null,il=null,Yn=null,nl=!1;function op(e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;return nl||Zi==null||Zi!==$a(i)?null:(i=Zi,"selectionStart"in i&&Ua(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Yn&&Zn(Yn,i)?null:(Yn=i,e=je.getPooled(sp.select,il,e,t),e.type="select",e.target=Zi,Fi(e),e))}var $0={eventTypes:sp,extractEvents:function(e,t,i,n,r,s){if(r=s||(n.window===n?n.document:n.nodeType===9?n:n.ownerDocument),!(s=!r)){e:{r=Ea(r),s=aa.onSelect;for(var o=0;o<s.length;o++)if(!r.has(s[o])){r=!1;break e}r=!0}s=!r}if(s)return null;switch(r=t?pi(t):window,e){case"focus":(Gh(r)||r.contentEditable==="true")&&(Zi=r,il=t,Yn=null);break;case"blur":Yn=il=Zi=null;break;case"mousedown":nl=!0;break;case"contextmenu":case"mouseup":case"dragend":return nl=!1,op(i,n);case"selectionchange":if(_0)break;case"keydown":case"keyup":return op(i,n)}return null}},U0=je.extend({animationName:null,elapsedTime:null,pseudoElement:null}),H0=je.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),W0=Wn.extend({relatedTarget:null});function os(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}var F0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Q0={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Z0=Wn.extend({key:function(e){if(e.key){var t=F0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=os(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Q0[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:tl,charCode:function(e){return e.type==="keypress"?os(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?os(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Y0=Fn.extend({dataTransfer:null}),G0=Wn.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:tl}),X0=je.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),J0=Fn.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),K0={eventTypes:Ah,extractEvents:function(e,t,i,n){var r=Eh.get(e);if(!r)return null;switch(e){case"keypress":if(os(i)===0)return null;case"keydown":case"keyup":e=Z0;break;case"blur":case"focus":e=W0;break;case"click":if(i.button===2)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=Y0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=G0;break;case uh:case ch:case dh:e=U0;break;case hh:e=X0;break;case"scroll":e=Wn;break;case"wheel":e=J0;break;case"copy":case"cut":case"paste":e=H0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=rp;break;default:e=je}return t=e.getPooled(r,t,i,n),Fi(t),t}};if(_r)throw Error(S(101));_r=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Dd();var q0=_n;sa=Xa,kd=q0,Pd=pi,Ld({SimpleEventPlugin:K0,EnterLeaveEventPlugin:R0,ChangeEventPlugin:j0,SelectEventPlugin:$0,BeforeInputEventPlugin:A0});var rl=[],Yi=-1;function Y(e){0>Yi||(e.current=rl[Yi],rl[Yi]=null,Yi--)}function te(e,t){Yi++,rl[Yi]=e.current,e.current=t}var Ut={},ge={current:Ut},Te={current:!1},gi=Ut;function Gi(e,t){var i=e.type.contextTypes;if(!i)return Ut;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in i)r[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function Ne(e){return e=e.childContextTypes,e!=null}function as(){Y(Te),Y(ge)}function ap(e,t,i){if(ge.current!==Ut)throw Error(S(168));te(ge,t),te(Te,i)}function lp(e,t,i){var n=e.stateNode;if(e=t.childContextTypes,typeof n.getChildContext!="function")return i;n=n.getChildContext();for(var r in n)if(!(r in e))throw Error(S(108,yt(t)||"Unknown",r));return Se({},i,{},n)}function ls(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ut,gi=ge.current,te(ge,e),te(Te,Te.current),!0}function up(e,t,i){var n=e.stateNode;if(!n)throw Error(S(169));i?(e=lp(e,t,gi),n.__reactInternalMemoizedMergedChildContext=e,Y(Te),Y(ge),te(ge,e)):Y(Te),te(Te,i)}var ex=de.unstable_runWithPriority,sl=de.unstable_scheduleCallback,cp=de.unstable_cancelCallback,dp=de.unstable_requestPaint,ol=de.unstable_now,tx=de.unstable_getCurrentPriorityLevel,us=de.unstable_ImmediatePriority,hp=de.unstable_UserBlockingPriority,pp=de.unstable_NormalPriority,fp=de.unstable_LowPriority,gp=de.unstable_IdlePriority,mp={},ix=de.unstable_shouldYield,nx=dp!==void 0?dp:function(){},Mt=null,cs=null,al=!1,vp=ol(),He=1e4>vp?ol:function(){return ol()-vp};function ds(){switch(tx()){case us:return 99;case hp:return 98;case pp:return 97;case fp:return 96;case gp:return 95;default:throw Error(S(332))}}function wp(e){switch(e){case 99:return us;case 98:return hp;case 97:return pp;case 96:return fp;case 95:return gp;default:throw Error(S(332))}}function Ht(e,t){return e=wp(e),ex(e,t)}function yp(e,t,i){return e=wp(e),sl(e,t,i)}function xp(e){return Mt===null?(Mt=[e],cs=sl(us,Sp)):Mt.push(e),mp}function ut(){if(cs!==null){var e=cs;cs=null,cp(e)}Sp()}function Sp(){if(!al&&Mt!==null){al=!0;var e=0;try{var t=Mt;Ht(99,function(){for(;e<t.length;e++){var i=t[e];do i=i(!0);while(i!==null)}}),Mt=null}catch(i){throw Mt!==null&&(Mt=Mt.slice(e+1)),sl(us,ut),i}finally{al=!1}}}function hs(e,t,i){return i/=10,1073741821-(((1073741821-e+t/10)/i|0)+1)*i}function qe(e,t){if(e&&e.defaultProps){t=Se({},t),e=e.defaultProps;for(var i in e)t[i]===void 0&&(t[i]=e[i])}return t}var ps={current:null},fs=null,Xi=null,gs=null;function ll(){gs=Xi=fs=null}function ul(e){var t=ps.current;Y(ps),e.type._context._currentValue=t}function Cp(e,t){for(;e!==null;){var i=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,i!==null&&i.childExpirationTime<t&&(i.childExpirationTime=t);else if(i!==null&&i.childExpirationTime<t)i.childExpirationTime=t;else break;e=e.return}}function Ji(e,t){fs=e,gs=Xi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.expirationTime>=t&&(dt=!0),e.firstContext=null)}function We(e,t){if(gs!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(gs=e,t=1073741823),t={context:e,observedBits:t,next:null},Xi===null){if(fs===null)throw Error(S(308));Xi=t,fs.dependencies={expirationTime:0,firstContext:t,responders:null}}else Xi=Xi.next=t;return e._currentValue}var Wt=!1;function cl(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function dl(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function Ft(e,t){return e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null},e.next=e}function Qt(e,t){if(e=e.updateQueue,e!==null){e=e.shared;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}}function Mp(e,t){var i=e.alternate;i!==null&&dl(i,e),e=e.updateQueue,i=e.baseQueue,i===null?(e.baseQueue=t.next=t,t.next=t):(t.next=i.next,i.next=t)}function Gn(e,t,i,n){var r=e.updateQueue;Wt=!1;var s=r.baseQueue,o=r.shared.pending;if(o!==null){if(s!==null){var a=s.next;s.next=o.next,o.next=a}s=o,r.shared.pending=null,a=e.alternate,a!==null&&(a=a.updateQueue,a!==null&&(a.baseQueue=o))}if(s!==null){a=s.next;var l=r.baseState,u=0,h=null,p=null,w=null;if(a!==null){var C=a;do{if(o=C.expirationTime,o<n){var E={expirationTime:C.expirationTime,suspenseConfig:C.suspenseConfig,tag:C.tag,payload:C.payload,callback:C.callback,next:null};w===null?(p=w=E,h=l):w=w.next=E,o>u&&(u=o)}else{w!==null&&(w=w.next={expirationTime:1073741823,suspenseConfig:C.suspenseConfig,tag:C.tag,payload:C.payload,callback:C.callback,next:null}),xf(o,C.suspenseConfig);e:{var T=e,c=C;switch(o=t,E=i,c.tag){case 1:if(T=c.payload,typeof T=="function"){l=T.call(E,l,o);break e}l=T;break e;case 3:T.effectTag=T.effectTag&-4097|64;case 0:if(T=c.payload,o=typeof T=="function"?T.call(E,l,o):T,o==null)break e;l=Se({},l,o);break e;case 2:Wt=!0}}C.callback!==null&&(e.effectTag|=32,o=r.effects,o===null?r.effects=[C]:o.push(C))}if(C=C.next,C===null||C===a){if(o=r.shared.pending,o===null)break;C=s.next=o.next,o.next=a,r.baseQueue=s=o,r.shared.pending=null}}while(1)}w===null?h=l:w.next=p,r.baseState=h,r.baseQueue=w,Us(u),e.expirationTime=u,e.memoizedState=l}}function Ip(e,t,i){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],r=n.callback;if(r!==null){if(n.callback=null,n=r,r=i,typeof n!="function")throw Error(S(191,n));n.call(r)}}}var Xn=Ke.ReactCurrentBatchConfig,bp=new Rr.Component().refs;function ms(e,t,i,n){t=e.memoizedState,i=i(n,t),i=i==null?t:Se({},t,i),e.memoizedState=i,e.expirationTime===0&&(e.updateQueue.baseState=i)}var vs={isMounted:function(e){return(e=e._reactInternalFiber)?hi(e)===e:!1},enqueueSetState:function(e,t,i){e=e._reactInternalFiber;var n=pt(),r=Xn.suspense;n=Si(n,e,r),r=Ft(n,r),r.payload=t,i!=null&&(r.callback=i),Qt(e,r),Xt(e,n)},enqueueReplaceState:function(e,t,i){e=e._reactInternalFiber;var n=pt(),r=Xn.suspense;n=Si(n,e,r),r=Ft(n,r),r.tag=1,r.payload=t,i!=null&&(r.callback=i),Qt(e,r),Xt(e,n)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var i=pt(),n=Xn.suspense;i=Si(i,e,n),n=Ft(i,n),n.tag=2,t!=null&&(n.callback=t),Qt(e,n),Xt(e,i)}};function Ap(e,t,i,n,r,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,o):t.prototype&&t.prototype.isPureReactComponent?!Zn(i,n)||!Zn(r,s):!0}function Ep(e,t,i){var n=!1,r=Ut,s=t.contextType;return typeof s=="object"&&s!==null?s=We(s):(r=Ne(t)?gi:ge.current,n=t.contextTypes,s=(n=n!=null)?Gi(e,r):Ut),t=new t(i,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=vs,e.stateNode=t,t._reactInternalFiber=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=s),t}function Tp(e,t,i,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,n),t.state!==e&&vs.enqueueReplaceState(t,t.state,null)}function hl(e,t,i,n){var r=e.stateNode;r.props=i,r.state=e.memoizedState,r.refs=bp,cl(e);var s=t.contextType;typeof s=="object"&&s!==null?r.context=We(s):(s=Ne(t)?gi:ge.current,r.context=Gi(e,s)),Gn(e,i,r,n),r.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(ms(e,t,s,i),r.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(t=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),t!==r.state&&vs.enqueueReplaceState(r,r.state,null),Gn(e,i,r,n),r.state=e.memoizedState),typeof r.componentDidMount=="function"&&(e.effectTag|=4)}var ws=Array.isArray;function Jn(e,t,i){if(e=i.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(S(309));var n=i.stateNode}if(!n)throw Error(S(147,e));var r=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===r?t.ref:(t=function(s){var o=n.refs;o===bp&&(o=n.refs={}),s===null?delete o[r]:o[r]=s},t._stringRef=r,t)}if(typeof e!="string")throw Error(S(284));if(!i._owner)throw Error(S(290,e))}return e}function ys(e,t){if(e.type!=="textarea")throw Error(S(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function Np(e){function t(c,d){if(e){var f=c.lastEffect;f!==null?(f.nextEffect=d,c.lastEffect=d):c.firstEffect=c.lastEffect=d,d.nextEffect=null,d.effectTag=8}}function i(c,d){if(!e)return null;for(;d!==null;)t(c,d),d=d.sibling;return null}function n(c,d){for(c=new Map;d!==null;)d.key!==null?c.set(d.key,d):c.set(d.index,d),d=d.sibling;return c}function r(c,d){return c=bi(c,d),c.index=0,c.sibling=null,c}function s(c,d,f){return c.index=f,e?(f=c.alternate,f!==null?(f=f.index,f<d?(c.effectTag=2,d):f):(c.effectTag=2,d)):d}function o(c){return e&&c.alternate===null&&(c.effectTag=2),c}function a(c,d,f,g){return d===null||d.tag!==6?(d=Zl(f,c.mode,g),d.return=c,d):(d=r(d,f),d.return=c,d)}function l(c,d,f,g){return d!==null&&d.elementType===f.type?(g=r(d,f.props),g.ref=Jn(c,d,f),g.return=c,g):(g=Hs(f.type,f.key,f.props,null,c.mode,g),g.ref=Jn(c,d,f),g.return=c,g)}function u(c,d,f,g){return d===null||d.tag!==4||d.stateNode.containerInfo!==f.containerInfo||d.stateNode.implementation!==f.implementation?(d=Yl(f,c.mode,g),d.return=c,d):(d=r(d,f.children||[]),d.return=c,d)}function h(c,d,f,g,m){return d===null||d.tag!==7?(d=Jt(f,c.mode,g,m),d.return=c,d):(d=r(d,f),d.return=c,d)}function p(c,d,f){if(typeof d=="string"||typeof d=="number")return d=Zl(""+d,c.mode,f),d.return=c,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case Ur:return f=Hs(d.type,d.key,d.props,null,c.mode,f),f.ref=Jn(c,null,d),f.return=c,f;case _i:return d=Yl(d,c.mode,f),d.return=c,d}if(ws(d)||En(d))return d=Jt(d,c.mode,f,null),d.return=c,d;ys(c,d)}return null}function w(c,d,f,g){var m=d!==null?d.key:null;if(typeof f=="string"||typeof f=="number")return m!==null?null:a(c,d,""+f,g);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Ur:return f.key===m?f.type===di?h(c,d,f.props.children,g,m):l(c,d,f,g):null;case _i:return f.key===m?u(c,d,f,g):null}if(ws(f)||En(f))return m!==null?null:h(c,d,f,g,null);ys(c,f)}return null}function C(c,d,f,g,m){if(typeof g=="string"||typeof g=="number")return c=c.get(f)||null,a(d,c,""+g,m);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ur:return c=c.get(g.key===null?f:g.key)||null,g.type===di?h(d,c,g.props.children,m,g.key):l(d,c,g,m);case _i:return c=c.get(g.key===null?f:g.key)||null,u(d,c,g,m)}if(ws(g)||En(g))return c=c.get(f)||null,h(d,c,g,m,null);ys(d,g)}return null}function E(c,d,f,g){for(var m=null,x=null,y=d,k=d=0,D=null;y!==null&&k<f.length;k++){y.index>k?(D=y,y=null):D=y.sibling;var P=w(c,y,f[k],g);if(P===null){y===null&&(y=D);break}e&&y&&P.alternate===null&&t(c,y),d=s(P,d,k),x===null?m=P:x.sibling=P,x=P,y=D}if(k===f.length)return i(c,y),m;if(y===null){for(;k<f.length;k++)y=p(c,f[k],g),y!==null&&(d=s(y,d,k),x===null?m=y:x.sibling=y,x=y);return m}for(y=n(c,y);k<f.length;k++)D=C(y,c,k,f[k],g),D!==null&&(e&&D.alternate!==null&&y.delete(D.key===null?k:D.key),d=s(D,d,k),x===null?m=D:x.sibling=D,x=D);return e&&y.forEach(function(q){return t(c,q)}),m}function T(c,d,f,g){var m=En(f);if(typeof m!="function")throw Error(S(150));if(f=m.call(f),f==null)throw Error(S(151));for(var x=m=null,y=d,k=d=0,D=null,P=f.next();y!==null&&!P.done;k++,P=f.next()){y.index>k?(D=y,y=null):D=y.sibling;var q=w(c,y,P.value,g);if(q===null){y===null&&(y=D);break}e&&y&&q.alternate===null&&t(c,y),d=s(q,d,k),x===null?m=q:x.sibling=q,x=q,y=D}if(P.done)return i(c,y),m;if(y===null){for(;!P.done;k++,P=f.next())P=p(c,P.value,g),P!==null&&(d=s(P,d,k),x===null?m=P:x.sibling=P,x=P);return m}for(y=n(c,y);!P.done;k++,P=f.next())P=C(y,c,k,P.value,g),P!==null&&(e&&P.alternate!==null&&y.delete(P.key===null?k:P.key),d=s(P,d,k),x===null?m=P:x.sibling=P,x=P);return e&&y.forEach(function(ie){return t(c,ie)}),m}return function(c,d,f,g){var m=typeof f=="object"&&f!==null&&f.type===di&&f.key===null;m&&(f=f.props.children);var x=typeof f=="object"&&f!==null;if(x)switch(f.$$typeof){case Ur:e:{for(x=f.key,m=d;m!==null;){if(m.key===x){switch(m.tag){case 7:if(f.type===di){i(c,m.sibling),d=r(m,f.props.children),d.return=c,c=d;break e}break;default:if(m.elementType===f.type){i(c,m.sibling),d=r(m,f.props),d.ref=Jn(c,m,f),d.return=c,c=d;break e}}i(c,m);break}else t(c,m);m=m.sibling}f.type===di?(d=Jt(f.props.children,c.mode,g,f.key),d.return=c,c=d):(g=Hs(f.type,f.key,f.props,null,c.mode,g),g.ref=Jn(c,d,f),g.return=c,c=g)}return o(c);case _i:e:{for(m=f.key;d!==null;){if(d.key===m)if(d.tag===4&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){i(c,d.sibling),d=r(d,f.children||[]),d.return=c,c=d;break e}else{i(c,d);break}else t(c,d);d=d.sibling}d=Yl(f,c.mode,g),d.return=c,c=d}return o(c)}if(typeof f=="string"||typeof f=="number")return f=""+f,d!==null&&d.tag===6?(i(c,d.sibling),d=r(d,f),d.return=c,c=d):(i(c,d),d=Zl(f,c.mode,g),d.return=c,c=d),o(c);if(ws(f))return E(c,d,f,g);if(En(f))return T(c,d,f,g);if(x&&ys(c,f),typeof f=="undefined"&&!m)switch(c.tag){case 1:case 0:throw c=c.type,Error(S(152,c.displayName||c.name||"Component"))}return i(c,d)}}var Ki=Np(!0),pl=Np(!1),Kn={},ct={current:Kn},qn={current:Kn},er={current:Kn};function mi(e){if(e===Kn)throw Error(S(174));return e}function fl(e,t){switch(te(er,t),te(qn,e),te(ct,Kn),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ba(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ba(t,e)}Y(ct),te(ct,t)}function qi(){Y(ct),Y(qn),Y(er)}function kp(e){mi(er.current);var t=mi(ct.current),i=ba(t,e.type);t!==i&&(te(qn,e),te(ct,i))}function gl(e){qn.current===e&&(Y(ct),Y(qn))}var K={current:0};function xs(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data===Ha||i.data===Wa))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.effectTag&64)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function ml(e,t){return{responder:e,props:t}}var Ss=Ke.ReactCurrentDispatcher,Fe=Ke.ReactCurrentBatchConfig,Zt=0,re=null,me=null,ve=null,Cs=!1;function Le(){throw Error(S(321))}function vl(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!fi(e[i],t[i]))return!1;return!0}function wl(e,t,i,n,r,s){if(Zt=s,re=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Ss.current=e===null||e.memoizedState===null?rx:sx,e=i(n,r),t.expirationTime===Zt){s=0;do{if(t.expirationTime=0,!(25>s))throw Error(S(301));s+=1,ve=me=null,t.updateQueue=null,Ss.current=ox,e=i(n,r)}while(t.expirationTime===Zt)}if(Ss.current=Es,t=me!==null&&me.next!==null,Zt=0,ve=me=re=null,Cs=!1,t)throw Error(S(300));return e}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ve===null?re.memoizedState=ve=e:ve=ve.next=e,ve}function tn(){if(me===null){var e=re.alternate;e=e!==null?e.memoizedState:null}else e=me.next;var t=ve===null?re.memoizedState:ve.next;if(t!==null)ve=t,me=e;else{if(e===null)throw Error(S(310));me=e,e={memoizedState:me.memoizedState,baseState:me.baseState,baseQueue:me.baseQueue,queue:me.queue,next:null},ve===null?re.memoizedState=ve=e:ve=ve.next=e}return ve}function vi(e,t){return typeof t=="function"?t(e):t}function Ms(e){var t=tn(),i=t.queue;if(i===null)throw Error(S(311));i.lastRenderedReducer=e;var n=me,r=n.baseQueue,s=i.pending;if(s!==null){if(r!==null){var o=r.next;r.next=s.next,s.next=o}n.baseQueue=r=s,i.pending=null}if(r!==null){r=r.next,n=n.baseState;var a=o=s=null,l=r;do{var u=l.expirationTime;if(u<Zt){var h={expirationTime:l.expirationTime,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};a===null?(o=a=h,s=n):a=a.next=h,u>re.expirationTime&&(re.expirationTime=u,Us(u))}else a!==null&&(a=a.next={expirationTime:1073741823,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),xf(u,l.suspenseConfig),n=l.eagerReducer===e?l.eagerState:e(n,l.action);l=l.next}while(l!==null&&l!==r);a===null?s=n:a.next=o,fi(n,t.memoizedState)||(dt=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=a,i.lastRenderedState=n}return[t.memoizedState,i.dispatch]}function Is(e){var t=tn(),i=t.queue;if(i===null)throw Error(S(311));i.lastRenderedReducer=e;var n=i.dispatch,r=i.pending,s=t.memoizedState;if(r!==null){i.pending=null;var o=r=r.next;do s=e(s,o.action),o=o.next;while(o!==r);fi(s,t.memoizedState)||(dt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),i.lastRenderedState=s}return[s,n]}function yl(e){var t=en();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},e=e.dispatch=Bp.bind(null,re,e),[t.memoizedState,e]}function xl(e,t,i,n){return e={tag:e,create:t,destroy:i,deps:n,next:null},t=re.updateQueue,t===null?(t={lastEffect:null},re.updateQueue=t,t.lastEffect=e.next=e):(i=t.lastEffect,i===null?t.lastEffect=e.next=e:(n=i.next,i.next=e,e.next=n,t.lastEffect=e)),e}function Pp(){return tn().memoizedState}function Sl(e,t,i,n){var r=en();re.effectTag|=e,r.memoizedState=xl(1|t,i,void 0,n===void 0?null:n)}function Cl(e,t,i,n){var r=tn();n=n===void 0?null:n;var s=void 0;if(me!==null){var o=me.memoizedState;if(s=o.destroy,n!==null&&vl(n,o.deps)){xl(t,i,s,n);return}}re.effectTag|=e,r.memoizedState=xl(1|t,i,s,n)}function zp(e,t){return Sl(516,4,e,t)}function bs(e,t){return Cl(516,4,e,t)}function Dp(e,t){return Cl(4,2,e,t)}function jp(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Lp(e,t,i){return i=i!=null?i.concat([e]):null,Cl(4,2,jp.bind(null,t,e),i)}function Ml(){}function Vp(e,t){return en().memoizedState=[e,t===void 0?null:t],e}function As(e,t){var i=tn();t=t===void 0?null:t;var n=i.memoizedState;return n!==null&&t!==null&&vl(t,n[1])?n[0]:(i.memoizedState=[e,t],e)}function Rp(e,t){var i=tn();t=t===void 0?null:t;var n=i.memoizedState;return n!==null&&t!==null&&vl(t,n[1])?n[0]:(e=e(),i.memoizedState=[e,t],e)}function Il(e,t,i){var n=ds();Ht(98>n?98:n,function(){e(!0)}),Ht(97<n?97:n,function(){var r=Fe.suspense;Fe.suspense=t===void 0?null:t;try{e(!1),i()}finally{Fe.suspense=r}})}function Bp(e,t,i){var n=pt(),r=Xn.suspense;n=Si(n,e,r),r={expirationTime:n,suspenseConfig:r,action:i,eagerReducer:null,eagerState:null,next:null};var s=t.pending;if(s===null?r.next=r:(r.next=s.next,s.next=r),t.pending=r,s=e.alternate,e===re||s!==null&&s===re)Cs=!0,r.expirationTime=Zt,re.expirationTime=Zt;else{if(e.expirationTime===0&&(s===null||s.expirationTime===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,i);if(r.eagerReducer=s,r.eagerState=a,fi(a,o))return}catch{}finally{}Xt(e,n)}}var Es={readContext:We,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useLayoutEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useResponder:Le,useDeferredValue:Le,useTransition:Le},rx={readContext:We,useCallback:Vp,useContext:We,useEffect:zp,useImperativeHandle:function(e,t,i){return i=i!=null?i.concat([e]):null,Sl(4,2,jp.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Sl(4,2,e,t)},useMemo:function(e,t){var i=en();return t=t===void 0?null:t,e=e(),i.memoizedState=[e,t],e},useReducer:function(e,t,i){var n=en();return t=i!==void 0?i(t):t,n.memoizedState=n.baseState=t,e=n.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=Bp.bind(null,re,e),[n.memoizedState,e]},useRef:function(e){var t=en();return e={current:e},t.memoizedState=e},useState:yl,useDebugValue:Ml,useResponder:ml,useDeferredValue:function(e,t){var i=yl(e),n=i[0],r=i[1];return zp(function(){var s=Fe.suspense;Fe.suspense=t===void 0?null:t;try{r(e)}finally{Fe.suspense=s}},[e,t]),n},useTransition:function(e){var t=yl(!1),i=t[0];return t=t[1],[Vp(Il.bind(null,t,e),[t,e]),i]}},sx={readContext:We,useCallback:As,useContext:We,useEffect:bs,useImperativeHandle:Lp,useLayoutEffect:Dp,useMemo:Rp,useReducer:Ms,useRef:Pp,useState:function(){return Ms(vi)},useDebugValue:Ml,useResponder:ml,useDeferredValue:function(e,t){var i=Ms(vi),n=i[0],r=i[1];return bs(function(){var s=Fe.suspense;Fe.suspense=t===void 0?null:t;try{r(e)}finally{Fe.suspense=s}},[e,t]),n},useTransition:function(e){var t=Ms(vi),i=t[0];return t=t[1],[As(Il.bind(null,t,e),[t,e]),i]}},ox={readContext:We,useCallback:As,useContext:We,useEffect:bs,useImperativeHandle:Lp,useLayoutEffect:Dp,useMemo:Rp,useReducer:Is,useRef:Pp,useState:function(){return Is(vi)},useDebugValue:Ml,useResponder:ml,useDeferredValue:function(e,t){var i=Is(vi),n=i[0],r=i[1];return bs(function(){var s=Fe.suspense;Fe.suspense=t===void 0?null:t;try{r(e)}finally{Fe.suspense=s}},[e,t]),n},useTransition:function(e){var t=Is(vi),i=t[0];return t=t[1],[As(Il.bind(null,t,e),[t,e]),i]}},It=null,Yt=null,wi=!1;function Op(e,t){var i=ft(5,null,null,0);i.elementType="DELETED",i.type="DELETED",i.stateNode=t,i.return=e,i.effectTag=8,e.lastEffect!==null?(e.lastEffect.nextEffect=i,e.lastEffect=i):e.firstEffect=e.lastEffect=i}function _p(e,t){switch(e.tag){case 5:var i=e.type;return t=t.nodeType!==1||i.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function bl(e){if(wi){var t=Yt;if(t){var i=t;if(!_p(e,t)){if(t=Wi(i.nextSibling),!t||!_p(e,t)){e.effectTag=e.effectTag&-1025|2,wi=!1,It=e;return}Op(It,i)}It=e,Yt=Wi(t.firstChild)}else e.effectTag=e.effectTag&-1025|2,wi=!1,It=e}}function $p(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;It=e}function Ts(e){if(e!==It)return!1;if(!wi)return $p(e),wi=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Za(t,e.memoizedProps))for(t=Yt;t;)Op(e,t),t=Wi(t.nextSibling);if($p(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var i=e.data;if(i===Rh){if(t===0){Yt=Wi(e.nextSibling);break e}t--}else i!==Vh&&i!==Wa&&i!==Ha||t++}e=e.nextSibling}Yt=null}}else Yt=It?Wi(e.stateNode.nextSibling):null;return!0}function Al(){Yt=It=null,wi=!1}var ax=Ke.ReactCurrentOwner,dt=!1;function Ve(e,t,i,n){t.child=e===null?pl(t,null,i,n):Ki(t,e.child,i,n)}function Up(e,t,i,n,r){i=i.render;var s=t.ref;return Ji(t,r),n=wl(e,t,i,n,s,r),e!==null&&!dt?(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=r&&(e.expirationTime=0),bt(e,t,r)):(t.effectTag|=1,Ve(e,t,n,r),t.child)}function Hp(e,t,i,n,r,s){if(e===null){var o=i.type;return typeof o=="function"&&!Ql(o)&&o.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(t.tag=15,t.type=o,Wp(e,t,o,n,r,s)):(e=Hs(i.type,null,n,null,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}return o=e.child,r<s&&(r=o.memoizedProps,i=i.compare,i=i!==null?i:Zn,i(r,n)&&e.ref===t.ref)?bt(e,t,s):(t.effectTag|=1,e=bi(o,n),e.ref=t.ref,e.return=t,t.child=e)}function Wp(e,t,i,n,r,s){return e!==null&&Zn(e.memoizedProps,n)&&e.ref===t.ref&&(dt=!1,r<s)?(t.expirationTime=e.expirationTime,bt(e,t,s)):El(e,t,i,n,s)}function Fp(e,t){var i=t.ref;(e===null&&i!==null||e!==null&&e.ref!==i)&&(t.effectTag|=128)}function El(e,t,i,n,r){var s=Ne(i)?gi:ge.current;return s=Gi(t,s),Ji(t,r),i=wl(e,t,i,n,s,r),e!==null&&!dt?(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=r&&(e.expirationTime=0),bt(e,t,r)):(t.effectTag|=1,Ve(e,t,i,r),t.child)}function Qp(e,t,i,n,r){if(Ne(i)){var s=!0;ls(t)}else s=!1;if(Ji(t,r),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.effectTag|=2),Ep(t,i,n),hl(t,i,n,r),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=i.contextType;typeof u=="object"&&u!==null?u=We(u):(u=Ne(i)?gi:ge.current,u=Gi(t,u));var h=i.getDerivedStateFromProps,p=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";p||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&Tp(t,o,n,u),Wt=!1;var w=t.memoizedState;o.state=w,Gn(t,n,o,r),l=t.memoizedState,a!==n||w!==l||Te.current||Wt?(typeof h=="function"&&(ms(t,i,h,n),l=t.memoizedState),(a=Wt||Ap(t,i,a,n,w,l,u))?(p||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.effectTag|=4)):(typeof o.componentDidMount=="function"&&(t.effectTag|=4),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(t.effectTag|=4),n=!1)}else o=t.stateNode,dl(e,t),a=t.memoizedProps,o.props=t.type===t.elementType?a:qe(t.type,a),l=o.context,u=i.contextType,typeof u=="object"&&u!==null?u=We(u):(u=Ne(i)?gi:ge.current,u=Gi(t,u)),h=i.getDerivedStateFromProps,(p=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&Tp(t,o,n,u),Wt=!1,l=t.memoizedState,o.state=l,Gn(t,n,o,r),w=t.memoizedState,a!==n||l!==w||Te.current||Wt?(typeof h=="function"&&(ms(t,i,h,n),w=t.memoizedState),(h=Wt||Ap(t,i,a,n,l,w,u))?(p||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,w,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,w,u)),typeof o.componentDidUpdate=="function"&&(t.effectTag|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.effectTag|=256)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),t.memoizedProps=n,t.memoizedState=w),o.props=n,o.state=w,o.context=u,n=h):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),n=!1);return Tl(e,t,i,n,s,r)}function Tl(e,t,i,n,r,s){Fp(e,t);var o=(t.effectTag&64)!==0;if(!n&&!o)return r&&up(t,i,!1),bt(e,t,s);n=t.stateNode,ax.current=t;var a=o&&typeof i.getDerivedStateFromError!="function"?null:n.render();return t.effectTag|=1,e!==null&&o?(t.child=Ki(t,e.child,null,s),t.child=Ki(t,null,a,s)):Ve(e,t,a,s),t.memoizedState=n.state,r&&up(t,i,!0),t.child}function Zp(e){var t=e.stateNode;t.pendingContext?ap(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ap(e,t.context,!1),fl(e,t.containerInfo)}var Nl={dehydrated:null,retryTime:0};function Yp(e,t,i){var n=t.mode,r=t.pendingProps,s=K.current,o=!1,a;if((a=(t.effectTag&64)!==0)||(a=(s&2)!==0&&(e===null||e.memoizedState!==null)),a?(o=!0,t.effectTag&=-65):e!==null&&e.memoizedState===null||r.fallback===void 0||r.unstable_avoidThisFallback===!0||(s|=1),te(K,s&1),e===null){if(r.fallback!==void 0&&bl(t),o){if(o=r.fallback,r=Jt(null,n,0,null),r.return=t,(t.mode&2)===0)for(e=t.memoizedState!==null?t.child.child:t.child,r.child=e;e!==null;)e.return=r,e=e.sibling;return i=Jt(o,n,i,null),i.return=t,r.sibling=i,t.memoizedState=Nl,t.child=r,i}return n=r.children,t.memoizedState=null,t.child=pl(t,null,n,i)}if(e.memoizedState!==null){if(e=e.child,n=e.sibling,o){if(r=r.fallback,i=bi(e,e.pendingProps),i.return=t,(t.mode&2)===0&&(o=t.memoizedState!==null?t.child.child:t.child,o!==e.child))for(i.child=o;o!==null;)o.return=i,o=o.sibling;return n=bi(n,r),n.return=t,i.sibling=n,i.childExpirationTime=0,t.memoizedState=Nl,t.child=i,n}return i=Ki(t,e.child,r.children,i),t.memoizedState=null,t.child=i}if(e=e.child,o){if(o=r.fallback,r=Jt(null,n,0,null),r.return=t,r.child=e,e!==null&&(e.return=r),(t.mode&2)===0)for(e=t.memoizedState!==null?t.child.child:t.child,r.child=e;e!==null;)e.return=r,e=e.sibling;return i=Jt(o,n,i,null),i.return=t,r.sibling=i,i.effectTag|=2,r.childExpirationTime=0,t.memoizedState=Nl,t.child=r,i}return t.memoizedState=null,t.child=Ki(t,e,r.children,i)}function Gp(e,t){e.expirationTime<t&&(e.expirationTime=t);var i=e.alternate;i!==null&&i.expirationTime<t&&(i.expirationTime=t),Cp(e.return,t)}function kl(e,t,i,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:i,tailExpiration:0,tailMode:r,lastEffect:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=i,o.tailExpiration=0,o.tailMode=r,o.lastEffect=s)}function Xp(e,t,i){var n=t.pendingProps,r=n.revealOrder,s=n.tail;if(Ve(e,t,n.children,i),n=K.current,(n&2)!==0)n=n&1|2,t.effectTag|=64;else{if(e!==null&&(e.effectTag&64)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gp(e,i);else if(e.tag===19)Gp(e,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(te(K,n),(t.mode&2)===0)t.memoizedState=null;else switch(r){case"forwards":for(i=t.child,r=null;i!==null;)e=i.alternate,e!==null&&xs(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),kl(t,!1,r,i,s,t.lastEffect);break;case"backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&xs(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}kl(t,!0,i,null,s,t.lastEffect);break;case"together":kl(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function bt(e,t,i){e!==null&&(t.dependencies=e.dependencies);var n=t.expirationTime;if(n!==0&&Us(n),t.childExpirationTime<i)return null;if(e!==null&&t.child!==e.child)throw Error(S(153));if(t.child!==null){for(e=t.child,i=bi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=bi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}var Jp,Pl,Kp,qp;Jp=function(e,t){for(var i=t.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},Pl=function(){},Kp=function(e,t,i,n,r){var s=e.memoizedProps;if(s!==n){var o=t.stateNode;switch(mi(ct.current),e=null,i){case"input":s=xa(o,s),n=xa(o,n),e=[];break;case"option":s=Ma(o,s),n=Ma(o,n),e=[];break;case"select":s=Se({},s,{value:void 0}),n=Se({},n,{value:void 0}),e=[];break;case"textarea":s=Ia(o,s),n=Ia(o,n),e=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(o.onclick=es)}Oa(i,n);var a,l;i=null;for(a in s)if(!n.hasOwnProperty(a)&&s.hasOwnProperty(a)&&s[a]!=null)if(a==="style")for(l in o=s[a],o)o.hasOwnProperty(l)&&(i||(i={}),i[l]="");else a!=="dangerouslySetInnerHTML"&&a!=="children"&&a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Ri.hasOwnProperty(a)?e||(e=[]):(e=e||[]).push(a,null));for(a in n){var u=n[a];if(o=s!=null?s[a]:void 0,n.hasOwnProperty(a)&&u!==o&&(u!=null||o!=null))if(a==="style")if(o){for(l in o)!o.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||(i||(i={}),i[l]="");for(l in u)u.hasOwnProperty(l)&&o[l]!==u[l]&&(i||(i={}),i[l]=u[l])}else i||(e||(e=[]),e.push(a,i)),i=u;else a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(e=e||[]).push(a,u)):a==="children"?o===u||typeof u!="string"&&typeof u!="number"||(e=e||[]).push(a,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(Ri.hasOwnProperty(a)?(u!=null&&xt(r,a),e||o===u||(e=[])):(e=e||[]).push(a,u))}i&&(e=e||[]).push("style",i),r=e,(t.updateQueue=r)&&(t.effectTag|=4)}},qp=function(e,t,i,n){i!==n&&(t.effectTag|=4)};function Ns(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var n=null;i!==null;)i.alternate!==null&&(n=i),i=i.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function lx(e,t,i){var n=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Ne(t.type)&&as(),null;case 3:return qi(),Y(Te),Y(ge),i=t.stateNode,i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),e!==null&&e.child!==null||!Ts(t)||(t.effectTag|=4),Pl(t),null;case 5:gl(t),i=mi(er.current);var r=t.type;if(e!==null&&t.stateNode!=null)Kp(e,t,r,n,i),e.ref!==t.ref&&(t.effectTag|=128);else{if(!n){if(t.stateNode===null)throw Error(S(166));return null}if(e=mi(ct.current),Ts(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[_t]=t,n[ts]=s,r){case"iframe":case"object":case"embed":X("load",n);break;case"video":case"audio":for(e=0;e<Nn.length;e++)X(Nn[e],n);break;case"source":X("error",n);break;case"img":case"image":case"link":X("error",n),X("load",n);break;case"form":X("reset",n),X("submit",n);break;case"details":X("toggle",n);break;case"input":qd(n,s),X("invalid",n),xt(i,"onChange");break;case"select":n._wrapperState={wasMultiple:!!s.multiple},X("invalid",n),xt(i,"onChange");break;case"textarea":ih(n,s),X("invalid",n),xt(i,"onChange")}Oa(r,s),e=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?n.textContent!==a&&(e=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(e=["children",""+a]):Ri.hasOwnProperty(o)&&a!=null&&xt(i,o)}switch(r){case"input":Fr(n),th(n,s,!0);break;case"textarea":Fr(n),rh(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=es)}i=e,t.updateQueue=i,i!==null&&(t.effectTag|=4)}else{switch(o=i.nodeType===9?i:i.ownerDocument,e===Ph&&(e=oh(r)),e===Ph?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[_t]=t,e[ts]=n,Jp(e,t,!1,!1),t.stateNode=e,o=_a(r,n),r){case"iframe":case"object":case"embed":X("load",e),a=n;break;case"video":case"audio":for(a=0;a<Nn.length;a++)X(Nn[a],e);a=n;break;case"source":X("error",e),a=n;break;case"img":case"image":case"link":X("error",e),X("load",e),a=n;break;case"form":X("reset",e),X("submit",e),a=n;break;case"details":X("toggle",e),a=n;break;case"input":qd(e,n),a=xa(e,n),X("invalid",e),xt(i,"onChange");break;case"option":a=Ma(e,n);break;case"select":e._wrapperState={wasMultiple:!!n.multiple},a=Se({},n,{value:void 0}),X("invalid",e),xt(i,"onChange");break;case"textarea":ih(e,n),a=Ia(e,n),X("invalid",e),xt(i,"onChange");break;default:a=n}Oa(r,a);var l=a;for(s in l)if(l.hasOwnProperty(s)){var u=l[s];s==="style"?kh(e,u):s==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&ah(e,u)):s==="children"?typeof u=="string"?(r!=="textarea"||u!=="")&&Tn(e,u):typeof u=="number"&&Tn(e,""+u):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Ri.hasOwnProperty(s)?u!=null&&xt(i,s):u!=null&&ga(e,s,u,o))}switch(r){case"input":Fr(e),th(e,n,!1);break;case"textarea":Fr(e),rh(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Vt(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?$i(e,!!n.multiple,i,!1):n.defaultValue!=null&&$i(e,!!n.multiple,n.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=es)}Bh(r,n)&&(t.effectTag|=4)}t.ref!==null&&(t.effectTag|=128)}return null;case 6:if(e&&t.stateNode!=null)qp(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(S(166));i=mi(er.current),mi(ct.current),Ts(t)?(i=t.stateNode,n=t.memoizedProps,i[_t]=t,i.nodeValue!==n&&(t.effectTag|=4)):(i=(i.nodeType===9?i:i.ownerDocument).createTextNode(n),i[_t]=t,t.stateNode=i)}return null;case 13:return Y(K),n=t.memoizedState,(t.effectTag&64)!==0?(t.expirationTime=i,t):(i=n!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&Ts(t):(r=e.memoizedState,n=r!==null,i||r===null||(r=e.child.sibling,r!==null&&(s=t.firstEffect,s!==null?(t.firstEffect=r,r.nextEffect=s):(t.firstEffect=t.lastEffect=r,r.nextEffect=null),r.effectTag=8))),i&&!n&&(t.mode&2)!==0&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||(K.current&1)!==0?le===yi&&(le=zs):((le===yi||le===zs)&&(le=Ds),ir!==0&&Re!==null&&(Ai(Re,ke),Af(Re,ir)))),(i||n)&&(t.effectTag|=4),null);case 4:return qi(),Pl(t),null;case 10:return ul(t),null;case 17:return Ne(t.type)&&as(),null;case 19:if(Y(K),n=t.memoizedState,n===null)return null;if(r=(t.effectTag&64)!==0,s=n.rendering,s===null){if(r)Ns(n,!1);else if(le!==yi||e!==null&&(e.effectTag&64)!==0)for(s=t.child;s!==null;){if(e=xs(s),e!==null){for(t.effectTag|=64,Ns(n,!1),r=e.updateQueue,r!==null&&(t.updateQueue=r,t.effectTag|=4),n.lastEffect===null&&(t.firstEffect=null),t.lastEffect=n.lastEffect,n=t.child;n!==null;)r=n,s=i,r.effectTag&=2,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null,e=r.alternate,e===null?(r.childExpirationTime=0,r.expirationTime=s,r.child=null,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null):(r.childExpirationTime=e.childExpirationTime,r.expirationTime=e.expirationTime,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,s=e.dependencies,r.dependencies=s===null?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),n=n.sibling;return te(K,K.current&1|2),t.child}s=s.sibling}}else{if(!r)if(e=xs(s),e!==null){if(t.effectTag|=64,r=!0,i=e.updateQueue,i!==null&&(t.updateQueue=i,t.effectTag|=4),Ns(n,!0),n.tail===null&&n.tailMode==="hidden"&&!s.alternate)return t=t.lastEffect=n.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*He()-n.renderingStartTime>n.tailExpiration&&1<i&&(t.effectTag|=64,r=!0,Ns(n,!1),t.expirationTime=t.childExpirationTime=i-1);n.isBackwards?(s.sibling=t.child,t.child=s):(i=n.last,i!==null?i.sibling=s:t.child=s,n.last=s)}return n.tail!==null?(n.tailExpiration===0&&(n.tailExpiration=He()+500),i=n.tail,n.rendering=i,n.tail=i.sibling,n.lastEffect=t.lastEffect,n.renderingStartTime=He(),i.sibling=null,t=K.current,te(K,r?t&1|2:t&1),i):null}throw Error(S(156,t.tag))}function ux(e){switch(e.tag){case 1:Ne(e.type)&&as();var t=e.effectTag;return t&4096?(e.effectTag=t&-4097|64,e):null;case 3:if(qi(),Y(Te),Y(ge),t=e.effectTag,(t&64)!==0)throw Error(S(285));return e.effectTag=t&-4097|64,e;case 5:return gl(e),null;case 13:return Y(K),t=e.effectTag,t&4096?(e.effectTag=t&-4097|64,e):null;case 19:return Y(K),null;case 4:return qi(),null;case 10:return ul(e),null;default:return null}}function zl(e,t){return{value:e,source:t,stack:ya(t)}}var cx=typeof WeakSet=="function"?WeakSet:Set;function Dl(e,t){var i=t.source,n=t.stack;n===null&&i!==null&&(n=ya(i)),i!==null&&yt(i.type),t=t.value,e!==null&&e.tag===1&&yt(e.type);try{console.error(t)}catch(r){setTimeout(function(){throw r})}}function dx(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(i){Ii(e,i)}}function ef(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){Ii(e,i)}else t.current=null}function hx(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.effectTag&256&&e!==null){var i=e.memoizedProps,n=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?i:qe(t.type,i),n),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(S(163))}function tf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var i=t=t.next;do{if((i.tag&e)===e){var n=i.destroy;i.destroy=void 0,n!==void 0&&n()}i=i.next}while(i!==t)}}function nf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var i=t=t.next;do{if((i.tag&e)===e){var n=i.create;i.destroy=n()}i=i.next}while(i!==t)}}function px(e,t,i){switch(i.tag){case 0:case 11:case 15:case 22:nf(3,i);return;case 1:if(e=i.stateNode,i.effectTag&4)if(t===null)e.componentDidMount();else{var n=i.elementType===i.type?t.memoizedProps:qe(i.type,t.memoizedProps);e.componentDidUpdate(n,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}t=i.updateQueue,t!==null&&Ip(i,t,e);return;case 3:if(t=i.updateQueue,t!==null){if(e=null,i.child!==null)switch(i.child.tag){case 5:e=i.child.stateNode;break;case 1:e=i.child.stateNode}Ip(i,t,e)}return;case 5:e=i.stateNode,t===null&&i.effectTag&4&&Bh(i.type,i.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:i.memoizedState===null&&(i=i.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&bh(i))));return;case 19:case 17:case 20:case 21:return}throw Error(S(163))}function rf(e,t,i){switch(typeof Fl=="function"&&Fl(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var n=e.next;Ht(97<i?97:i,function(){var r=n;do{var s=r.destroy;if(s!==void 0){var o=t;try{s()}catch(a){Ii(o,a)}}r=r.next}while(r!==n)})}break;case 1:ef(t),i=t.stateNode,typeof i.componentWillUnmount=="function"&&dx(t,i);break;case 5:ef(t);break;case 4:lf(e,t,i)}}function sf(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,t!==null&&sf(t)}function of(e){return e.tag===5||e.tag===3||e.tag===4}function af(e){e:{for(var t=e.return;t!==null;){if(of(t)){var i=t;break e}t=t.return}throw Error(S(160))}switch(t=i.stateNode,i.tag){case 5:var n=!1;break;case 3:t=t.containerInfo,n=!0;break;case 4:t=t.containerInfo,n=!0;break;default:throw Error(S(161))}i.effectTag&16&&(Tn(t,""),i.effectTag&=-17);e:t:for(i=e;;){for(;i.sibling===null;){if(i.return===null||of(i.return)){i=null;break e}i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.effectTag&2||i.child===null||i.tag===4)continue t;i.child.return=i,i=i.child}if(!(i.effectTag&2)){i=i.stateNode;break e}}n?jl(e,i,t):Ll(e,i,t)}function jl(e,t,i){var n=e.tag,r=n===5||n===6;if(r)e=r?e.stateNode:e.stateNode.instance,t?i.nodeType===8?i.parentNode.insertBefore(e,t):i.insertBefore(e,t):(i.nodeType===8?(t=i.parentNode,t.insertBefore(e,i)):(t=i,t.appendChild(e)),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=es));else if(n!==4&&(e=e.child,e!==null))for(jl(e,t,i),e=e.sibling;e!==null;)jl(e,t,i),e=e.sibling}function Ll(e,t,i){var n=e.tag,r=n===5||n===6;if(r)e=r?e.stateNode:e.stateNode.instance,t?i.insertBefore(e,t):i.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Ll(e,t,i),e=e.sibling;e!==null;)Ll(e,t,i),e=e.sibling}function lf(e,t,i){for(var n=t,r=!1,s,o;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(S(160));switch(s=r.stateNode,r.tag){case 5:o=!1;break e;case 3:s=s.containerInfo,o=!0;break e;case 4:s=s.containerInfo,o=!0;break e}r=r.return}r=!0}if(n.tag===5||n.tag===6){e:for(var a=e,l=n,u=i,h=l;;)if(rf(a,h,u),h.child!==null&&h.tag!==4)h.child.return=h,h=h.child;else{if(h===l)break e;for(;h.sibling===null;){if(h.return===null||h.return===l)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}o?(a=s,l=n.stateNode,a.nodeType===8?a.parentNode.removeChild(l):a.removeChild(l)):s.removeChild(n.stateNode)}else if(n.tag===4){if(n.child!==null){s=n.stateNode.containerInfo,o=!0,n.child.return=n,n=n.child;continue}}else if(rf(e,n,i),n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return,n.tag===4&&(r=!1)}n.sibling.return=n.return,n=n.sibling}}function Vl(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:tf(3,t);return;case 1:return;case 5:var i=t.stateNode;if(i!=null){var n=t.memoizedProps,r=e!==null?e.memoizedProps:n;e=t.type;var s=t.updateQueue;if(t.updateQueue=null,s!==null){for(i[ts]=n,e==="input"&&n.type==="radio"&&n.name!=null&&eh(i,n),_a(e,r),t=_a(e,n),r=0;r<s.length;r+=2){var o=s[r],a=s[r+1];o==="style"?kh(i,a):o==="dangerouslySetInnerHTML"?ah(i,a):o==="children"?Tn(i,a):ga(i,o,a,t)}switch(e){case"input":Sa(i,n);break;case"textarea":nh(i,n);break;case"select":t=i._wrapperState.wasMultiple,i._wrapperState.wasMultiple=!!n.multiple,e=n.value,e!=null?$i(i,!!n.multiple,e,!1):t!==!!n.multiple&&(n.defaultValue!=null?$i(i,!!n.multiple,n.defaultValue,!0):$i(i,!!n.multiple,n.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(S(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:t=t.stateNode,t.hydrate&&(t.hydrate=!1,bh(t.containerInfo));return;case 12:return;case 13:if(i=t,t.memoizedState===null?n=!1:(n=!0,i=t.child,Ol=He()),i!==null)e:for(e=i;;){if(e.tag===5)s=e.stateNode,n?(s=s.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(s=e.stateNode,r=e.memoizedProps.style,r=r!=null&&r.hasOwnProperty("display")?r.display:null,s.style.display=Nh("display",r));else if(e.tag===6)e.stateNode.nodeValue=n?"":e.memoizedProps;else if(e.tag===13&&e.memoizedState!==null&&e.memoizedState.dehydrated===null){s=e.child.sibling,s.return=e,e=s;continue}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break;for(;e.sibling===null;){if(e.return===null||e.return===i)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}uf(t);return;case 19:uf(t);return;case 17:return}throw Error(S(163))}function uf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new cx),t.forEach(function(n){var r=Mx.bind(null,e,n);i.has(n)||(i.add(n),n.then(r,r))})}}var fx=typeof WeakMap=="function"?WeakMap:Map;function cf(e,t,i){i=Ft(i,null),i.tag=3,i.payload={element:null};var n=t.value;return i.callback=function(){Rs||(Rs=!0,_l=n),Dl(e,t)},i}function df(e,t,i){i=Ft(i,null),i.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var r=t.value;i.payload=function(){return Dl(e,t),n(r)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(i.callback=function(){typeof n!="function"&&(Gt===null?Gt=new Set([this]):Gt.add(this),Dl(e,t));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),i}var gx=Math.ceil,ks=Ke.ReactCurrentDispatcher,hf=Ke.ReactCurrentOwner,ae=0,Rl=8,et=16,ht=32,yi=0,Ps=1,pf=2,zs=3,Ds=4,Bl=5,L=ae,Re=null,R=null,ke=0,le=yi,js=null,At=1073741823,tr=1073741823,Ls=null,ir=0,Vs=!1,Ol=0,ff=500,z=null,Rs=!1,_l=null,Gt=null,Bs=!1,nr=null,rr=90,xi=null,sr=0,$l=null,Os=0;function pt(){return(L&(et|ht))!==ae?1073741821-(He()/10|0):Os!==0?Os:Os=1073741821-(He()/10|0)}function Si(e,t,i){if(t=t.mode,(t&2)===0)return 1073741823;var n=ds();if((t&4)===0)return n===99?1073741823:1073741822;if((L&et)!==ae)return ke;if(i!==null)e=hs(e,i.timeoutMs|0||5e3,250);else switch(n){case 99:e=1073741823;break;case 98:e=hs(e,150,100);break;case 97:case 96:e=hs(e,5e3,250);break;case 95:e=2;break;default:throw Error(S(326))}return Re!==null&&e===ke&&--e,e}function Xt(e,t){if(50<sr)throw sr=0,$l=null,Error(S(185));if(e=_s(e,t),e!==null){var i=ds();t===1073741823?(L&Rl)!==ae&&(L&(et|ht))===ae?Ul(e):(Be(e),L===ae&&ut()):Be(e),(L&4)===ae||i!==98&&i!==99||(xi===null?xi=new Map([[e,t]]):(i=xi.get(e),(i===void 0||i>t)&&xi.set(e,t)))}}function _s(e,t){e.expirationTime<t&&(e.expirationTime=t);var i=e.alternate;i!==null&&i.expirationTime<t&&(i.expirationTime=t);var n=e.return,r=null;if(n===null&&e.tag===3)r=e.stateNode;else for(;n!==null;){if(i=n.alternate,n.childExpirationTime<t&&(n.childExpirationTime=t),i!==null&&i.childExpirationTime<t&&(i.childExpirationTime=t),n.return===null&&n.tag===3){r=n.stateNode;break}n=n.return}return r!==null&&(Re===r&&(Us(t),le===Ds&&Ai(r,ke)),Af(r,t)),r}function $s(e){var t=e.lastExpiredTime;if(t!==0||(t=e.firstPendingTime,!bf(e,t)))return t;var i=e.lastPingedTime;return e=e.nextKnownPendingLevel,e=i>e?i:e,2>=e&&t!==e?0:e}function Be(e){if(e.lastExpiredTime!==0)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=xp(Ul.bind(null,e));else{var t=$s(e),i=e.callbackNode;if(t===0)i!==null&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var n=pt();if(t===1073741823?n=99:t===1||t===2?n=95:(n=10*(1073741821-t)-10*(1073741821-n),n=0>=n?99:250>=n?98:5250>=n?97:95),i!==null){var r=e.callbackPriority;if(e.callbackExpirationTime===t&&r>=n)return;i!==mp&&cp(i)}e.callbackExpirationTime=t,e.callbackPriority=n,t=t===1073741823?xp(Ul.bind(null,e)):yp(n,gf.bind(null,e),{timeout:10*(1073741821-t)-He()}),e.callbackNode=t}}}function gf(e,t){if(Os=0,t)return t=pt(),Gl(e,t),Be(e),null;var i=$s(e);if(i!==0){if(t=e.callbackNode,(L&(et|ht))!==ae)throw Error(S(327));if(nn(),e===Re&&i===ke||Ci(e,i),R!==null){var n=L;L|=et;var r=yf();do try{wx();break}catch(a){wf(e,a)}while(1);if(ll(),L=n,ks.current=r,le===Ps)throw t=js,Ci(e,i),Ai(e,i),Be(e),t;if(R===null)switch(r=e.finishedWork=e.current.alternate,e.finishedExpirationTime=i,n=le,Re=null,n){case yi:case Ps:throw Error(S(345));case pf:Gl(e,2<i?2:i);break;case zs:if(Ai(e,i),n=e.lastSuspendedTime,i===n&&(e.nextKnownPendingLevel=Hl(r)),At===1073741823&&(r=Ol+ff-He(),10<r)){if(Vs){var s=e.lastPingedTime;if(s===0||s>=i){e.lastPingedTime=i,Ci(e,i);break}}if(s=$s(e),s!==0&&s!==i)break;if(n!==0&&n!==i){e.lastPingedTime=n;break}e.timeoutHandle=Ya(Mi.bind(null,e),r);break}Mi(e);break;case Ds:if(Ai(e,i),n=e.lastSuspendedTime,i===n&&(e.nextKnownPendingLevel=Hl(r)),Vs&&(r=e.lastPingedTime,r===0||r>=i)){e.lastPingedTime=i,Ci(e,i);break}if(r=$s(e),r!==0&&r!==i)break;if(n!==0&&n!==i){e.lastPingedTime=n;break}if(tr!==1073741823?n=10*(1073741821-tr)-He():At===1073741823?n=0:(n=10*(1073741821-At)-5e3,r=He(),i=10*(1073741821-i)-r,n=r-n,0>n&&(n=0),n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*gx(n/1960))-n,i<n&&(n=i)),10<n){e.timeoutHandle=Ya(Mi.bind(null,e),n);break}Mi(e);break;case Bl:if(At!==1073741823&&Ls!==null){s=At;var o=Ls;if(n=o.busyMinDurationMs|0,0>=n?n=0:(r=o.busyDelayMs|0,s=He()-(10*(1073741821-s)-(o.timeoutMs|0||5e3)),n=s<=r?0:r+n-s),10<n){Ai(e,i),e.timeoutHandle=Ya(Mi.bind(null,e),n);break}}Mi(e);break;default:throw Error(S(329))}if(Be(e),e.callbackNode===t)return gf.bind(null,e)}}return null}function Ul(e){var t=e.lastExpiredTime;if(t=t!==0?t:1073741823,(L&(et|ht))!==ae)throw Error(S(327));if(nn(),e===Re&&t===ke||Ci(e,t),R!==null){var i=L;L|=et;var n=yf();do try{vx();break}catch(r){wf(e,r)}while(1);if(ll(),L=i,ks.current=n,le===Ps)throw i=js,Ci(e,t),Ai(e,t),Be(e),i;if(R!==null)throw Error(S(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Re=null,Mi(e),Be(e)}return null}function mx(){if(xi!==null){var e=xi;xi=null,e.forEach(function(t,i){Gl(i,t),Be(i)}),ut()}}function mf(e,t){var i=L;L|=1;try{return e(t)}finally{L=i,L===ae&&ut()}}function vf(e,t){var i=L;L&=-2,L|=Rl;try{return e(t)}finally{L=i,L===ae&&ut()}}function Ci(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var i=e.timeoutHandle;if(i!==-1&&(e.timeoutHandle=-1,g0(i)),R!==null)for(i=R.return;i!==null;){var n=i;switch(n.tag){case 1:n=n.type.childContextTypes,n!=null&&as();break;case 3:qi(),Y(Te),Y(ge);break;case 5:gl(n);break;case 4:qi();break;case 13:Y(K);break;case 19:Y(K);break;case 10:ul(n)}i=i.return}Re=e,R=bi(e.current,null),ke=t,le=yi,js=null,tr=At=1073741823,Ls=null,ir=0,Vs=!1}function wf(e,t){do{try{if(ll(),Ss.current=Es,Cs)for(var i=re.memoizedState;i!==null;){var n=i.queue;n!==null&&(n.pending=null),i=i.next}if(Zt=0,ve=me=re=null,Cs=!1,R===null||R.return===null)return le=Ps,js=t,R=null;e:{var r=e,s=R.return,o=R,a=t;if(t=ke,o.effectTag|=2048,o.firstEffect=o.lastEffect=null,a!==null&&typeof a=="object"&&typeof a.then=="function"){var l=a;if((o.mode&2)===0){var u=o.alternate;u?(o.updateQueue=u.updateQueue,o.memoizedState=u.memoizedState,o.expirationTime=u.expirationTime):(o.updateQueue=null,o.memoizedState=null)}var h=(K.current&1)!==0,p=s;do{var w;if(w=p.tag===13){var C=p.memoizedState;if(C!==null)w=C.dehydrated!==null;else{var E=p.memoizedProps;w=E.fallback===void 0?!1:E.unstable_avoidThisFallback!==!0?!0:!h}}if(w){var T=p.updateQueue;if(T===null){var c=new Set;c.add(l),p.updateQueue=c}else T.add(l);if((p.mode&2)===0){if(p.effectTag|=64,o.effectTag&=-2981,o.tag===1)if(o.alternate===null)o.tag=17;else{var d=Ft(1073741823,null);d.tag=2,Qt(o,d)}o.expirationTime=1073741823;break e}a=void 0,o=t;var f=r.pingCache;if(f===null?(f=r.pingCache=new fx,a=new Set,f.set(l,a)):(a=f.get(l),a===void 0&&(a=new Set,f.set(l,a))),!a.has(o)){a.add(o);var g=Cx.bind(null,r,l,o);l.then(g,g)}p.effectTag|=4096,p.expirationTime=t;break e}p=p.return}while(p!==null);a=Error((yt(o.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
152
152
 
153
153
  Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+ya(o))}le!==Bl&&(le=pf),a=zl(a,o),p=s;do{switch(p.tag){case 3:l=a,p.effectTag|=4096,p.expirationTime=t;var m=cf(p,l,t);Mp(p,m);break e;case 1:l=a;var x=p.type,y=p.stateNode;if((p.effectTag&64)===0&&(typeof x.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Gt===null||!Gt.has(y)))){p.effectTag|=4096,p.expirationTime=t;var k=df(p,l,t);Mp(p,k);break e}}p=p.return}while(p!==null)}R=Cf(R)}catch(D){t=D;continue}break}while(1)}function yf(){var e=ks.current;return ks.current=Es,e===null?Es:e}function xf(e,t){e<At&&2<e&&(At=e),t!==null&&e<tr&&2<e&&(tr=e,Ls=t)}function Us(e){e>ir&&(ir=e)}function vx(){for(;R!==null;)R=Sf(R)}function wx(){for(;R!==null&&!ix();)R=Sf(R)}function Sf(e){var t=If(e.alternate,e,ke);return e.memoizedProps=e.pendingProps,t===null&&(t=Cf(e)),hf.current=null,t}function Cf(e){R=e;do{var t=R.alternate;if(e=R.return,(R.effectTag&2048)===0){if(t=lx(t,R,ke),ke===1||R.childExpirationTime!==1){for(var i=0,n=R.child;n!==null;){var r=n.expirationTime,s=n.childExpirationTime;r>i&&(i=r),s>i&&(i=s),n=n.sibling}R.childExpirationTime=i}if(t!==null)return t;e!==null&&(e.effectTag&2048)===0&&(e.firstEffect===null&&(e.firstEffect=R.firstEffect),R.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=R.firstEffect),e.lastEffect=R.lastEffect),1<R.effectTag&&(e.lastEffect!==null?e.lastEffect.nextEffect=R:e.firstEffect=R,e.lastEffect=R))}else{if(t=ux(R),t!==null)return t.effectTag&=2047,t;e!==null&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(t=R.sibling,t!==null)return t;R=e}while(R!==null);return le===yi&&(le=Bl),null}function Hl(e){var t=e.expirationTime;return e=e.childExpirationTime,t>e?t:e}function Mi(e){var t=ds();return Ht(99,yx.bind(null,e,t)),null}function yx(e,t){do nn();while(nr!==null);if((L&(et|ht))!==ae)throw Error(S(327));var i=e.finishedWork,n=e.finishedExpirationTime;if(i===null)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,i===e.current)throw Error(S(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var r=Hl(i);if(e.firstPendingTime=r,n<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:n<=e.firstSuspendedTime&&(e.firstSuspendedTime=n-1),n<=e.lastPingedTime&&(e.lastPingedTime=0),n<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Re&&(R=Re=null,ke=0),1<i.effectTag?i.lastEffect!==null?(i.lastEffect.nextEffect=i,r=i.firstEffect):r=i:r=i.firstEffect,r!==null){var s=L;L|=ht,hf.current=null,Fa=Kr;var o=Lh();if(Ua(o)){if("selectionStart"in o)var a={start:o.selectionStart,end:o.selectionEnd};else e:{a=(a=o.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var u=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break e}var p=0,w=-1,C=-1,E=0,T=0,c=o,d=null;t:for(;;){for(var f;c!==a||u!==0&&c.nodeType!==3||(w=p+u),c!==h||l!==0&&c.nodeType!==3||(C=p+l),c.nodeType===3&&(p+=c.nodeValue.length),(f=c.firstChild)!==null;)d=c,c=f;for(;;){if(c===o)break t;if(d===a&&++E===u&&(w=p),d===h&&++T===l&&(C=p),(f=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=f}a=w===-1||C===-1?null:{start:w,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;Qa={activeElementDetached:null,focusedElem:o,selectionRange:a},Kr=!1,z=r;do try{xx()}catch(P){if(z===null)throw Error(S(330));Ii(z,P),z=z.nextEffect}while(z!==null);z=r;do try{for(o=e,a=t;z!==null;){var g=z.effectTag;if(g&16&&Tn(z.stateNode,""),g&128){var m=z.alternate;if(m!==null){var x=m.ref;x!==null&&(typeof x=="function"?x(null):x.current=null)}}switch(g&1038){case 2:af(z),z.effectTag&=-3;break;case 6:af(z),z.effectTag&=-3,Vl(z.alternate,z);break;case 1024:z.effectTag&=-1025;break;case 1028:z.effectTag&=-1025,Vl(z.alternate,z);break;case 4:Vl(z.alternate,z);break;case 8:u=z,lf(o,u,a),sf(u)}z=z.nextEffect}}catch(P){if(z===null)throw Error(S(330));Ii(z,P),z=z.nextEffect}while(z!==null);if(x=Qa,m=Lh(),g=x.focusedElem,a=x.selectionRange,m!==g&&g&&g.ownerDocument&&jh(g.ownerDocument.documentElement,g)){for(a!==null&&Ua(g)&&(m=a.start,x=a.end,x===void 0&&(x=m),"selectionStart"in g?(g.selectionStart=m,g.selectionEnd=Math.min(x,g.value.length)):(x=(m=g.ownerDocument||document)&&m.defaultView||window,x.getSelection&&(x=x.getSelection(),u=g.textContent.length,o=Math.min(a.start,u),a=a.end===void 0?o:Math.min(a.end,u),!x.extend&&o>a&&(u=a,a=o,o=u),u=Dh(g,o),h=Dh(g,a),u&&h&&(x.rangeCount!==1||x.anchorNode!==u.node||x.anchorOffset!==u.offset||x.focusNode!==h.node||x.focusOffset!==h.offset)&&(m=m.createRange(),m.setStart(u.node,u.offset),x.removeAllRanges(),o>a?(x.addRange(m),x.extend(h.node,h.offset)):(m.setEnd(h.node,h.offset),x.addRange(m)))))),m=[],x=g;x=x.parentNode;)x.nodeType===1&&m.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<m.length;g++)x=m[g],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}Kr=!!Fa,Qa=Fa=null,e.current=i,z=r;do try{for(g=e;z!==null;){var y=z.effectTag;if(y&36&&px(g,z.alternate,z),y&128){m=void 0;var k=z.ref;if(k!==null){var D=z.stateNode;switch(z.tag){case 5:m=D;break;default:m=D}typeof k=="function"?k(m):k.current=m}}z=z.nextEffect}}catch(P){if(z===null)throw Error(S(330));Ii(z,P),z=z.nextEffect}while(z!==null);z=null,nx(),L=s}else e.current=i;if(Bs)Bs=!1,nr=e,rr=t;else for(z=r;z!==null;)t=z.nextEffect,z.nextEffect=null,z=t;if(t=e.firstPendingTime,t===0&&(Gt=null),t===1073741823?e===$l?sr++:(sr=0,$l=e):sr=0,typeof Wl=="function"&&Wl(i.stateNode,n),Be(e),Rs)throw Rs=!1,e=_l,_l=null,e;return(L&Rl)!==ae||ut(),null}function xx(){for(;z!==null;){var e=z.effectTag;(e&256)!==0&&hx(z.alternate,z),(e&512)===0||Bs||(Bs=!0,yp(97,function(){return nn(),null})),z=z.nextEffect}}function nn(){if(rr!==90){var e=97<rr?97:rr;return rr=90,Ht(e,Sx)}}function Sx(){if(nr===null)return!1;var e=nr;if(nr=null,(L&(et|ht))!==ae)throw Error(S(331));var t=L;for(L|=ht,e=e.current.firstEffect;e!==null;){try{var i=e;if((i.effectTag&512)!==0)switch(i.tag){case 0:case 11:case 15:case 22:tf(5,i),nf(5,i)}}catch(n){if(e===null)throw Error(S(330));Ii(e,n)}i=e.nextEffect,e.nextEffect=null,e=i}return L=t,ut(),!0}function Mf(e,t,i){t=zl(i,t),t=cf(e,t,1073741823),Qt(e,t),e=_s(e,1073741823),e!==null&&Be(e)}function Ii(e,t){if(e.tag===3)Mf(e,e,t);else for(var i=e.return;i!==null;){if(i.tag===3){Mf(i,e,t);break}else if(i.tag===1){var n=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Gt===null||!Gt.has(n))){e=zl(t,e),e=df(i,e,1073741823),Qt(i,e),i=_s(i,1073741823),i!==null&&Be(i);break}}i=i.return}}function Cx(e,t,i){var n=e.pingCache;n!==null&&n.delete(t),Re===e&&ke===i?le===Ds||le===zs&&At===1073741823&&He()-Ol<ff?Ci(e,ke):Vs=!0:bf(e,i)&&(t=e.lastPingedTime,t!==0&&t<i||(e.lastPingedTime=i,Be(e)))}function Mx(e,t){var i=e.stateNode;i!==null&&i.delete(t),t=0,t===0&&(t=pt(),t=Si(t,e,null)),e=_s(e,t),e!==null&&Be(e)}var If;If=function(e,t,i){var n=t.expirationTime;if(e!==null){var r=t.pendingProps;if(e.memoizedProps!==r||Te.current)dt=!0;else{if(n<i){switch(dt=!1,t.tag){case 3:Zp(t),Al();break;case 5:if(kp(t),t.mode&4&&i!==1&&r.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:Ne(t.type)&&ls(t);break;case 4:fl(t,t.stateNode.containerInfo);break;case 10:n=t.memoizedProps.value,r=t.type._context,te(ps,r._currentValue),r._currentValue=n;break;case 13:if(t.memoizedState!==null)return n=t.child.childExpirationTime,n!==0&&n>=i?Yp(e,t,i):(te(K,K.current&1),t=bt(e,t,i),t!==null?t.sibling:null);te(K,K.current&1);break;case 19:if(n=t.childExpirationTime>=i,(e.effectTag&64)!==0){if(n)return Xp(e,t,i);t.effectTag|=64}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null),te(K,K.current),!n)return null}return bt(e,t,i)}dt=!1}}else dt=!1;switch(t.expirationTime=0,t.tag){case 2:if(n=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,r=Gi(t,ge.current),Ji(t,i),r=wl(null,t,n,e,r,i),t.effectTag|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ne(n)){var s=!0;ls(t)}else s=!1;t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,cl(t);var o=n.getDerivedStateFromProps;typeof o=="function"&&ms(t,n,o,e),r.updater=vs,t.stateNode=r,r._reactInternalFiber=t,hl(t,n,e,i),t=Tl(null,t,n,!0,s,i)}else t.tag=0,Ve(null,t,r,i),t=t.child;return t;case 16:e:{if(r=t.elementType,e!==null&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,Ky(r),r._status!==1)throw r._result;switch(r=r._result,t.type=r,s=t.tag=Ax(r),e=qe(r,e),s){case 0:t=El(null,t,r,e,i);break e;case 1:t=Qp(null,t,r,e,i);break e;case 11:t=Up(null,t,r,e,i);break e;case 14:t=Hp(null,t,r,qe(r.type,e),n,i);break e}throw Error(S(306,r,""))}return t;case 0:return n=t.type,r=t.pendingProps,r=t.elementType===n?r:qe(n,r),El(e,t,n,r,i);case 1:return n=t.type,r=t.pendingProps,r=t.elementType===n?r:qe(n,r),Qp(e,t,n,r,i);case 3:if(Zp(t),n=t.updateQueue,e===null||n===null)throw Error(S(282));if(n=t.pendingProps,r=t.memoizedState,r=r!==null?r.element:null,dl(e,t),Gn(t,n,null,i),n=t.memoizedState.element,n===r)Al(),t=bt(e,t,i);else{if((r=t.stateNode.hydrate)&&(Yt=Wi(t.stateNode.containerInfo.firstChild),It=t,r=wi=!0),r)for(i=pl(t,null,n,i),t.child=i;i;)i.effectTag=i.effectTag&-3|1024,i=i.sibling;else Ve(e,t,n,i),Al();t=t.child}return t;case 5:return kp(t),e===null&&bl(t),n=t.type,r=t.pendingProps,s=e!==null?e.memoizedProps:null,o=r.children,Za(n,r)?o=null:s!==null&&Za(n,s)&&(t.effectTag|=16),Fp(e,t),t.mode&4&&i!==1&&r.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Ve(e,t,o,i),t=t.child),t;case 6:return e===null&&bl(t),null;case 13:return Yp(e,t,i);case 4:return fl(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ki(t,null,n,i):Ve(e,t,n,i),t.child;case 11:return n=t.type,r=t.pendingProps,r=t.elementType===n?r:qe(n,r),Up(e,t,n,r,i);case 7:return Ve(e,t,t.pendingProps,i),t.child;case 8:return Ve(e,t,t.pendingProps.children,i),t.child;case 12:return Ve(e,t,t.pendingProps.children,i),t.child;case 10:e:{n=t.type._context,r=t.pendingProps,o=t.memoizedProps,s=r.value;var a=t.type._context;if(te(ps,a._currentValue),a._currentValue=s,o!==null)if(a=o.value,s=fi(a,s)?0:(typeof n._calculateChangedBits=="function"?n._calculateChangedBits(a,s):1073741823)|0,s===0){if(o.children===r.children&&!Te.current){t=bt(e,t,i);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var u=l.firstContext;u!==null;){if(u.context===n&&(u.observedBits&s)!==0){a.tag===1&&(u=Ft(i,null),u.tag=2,Qt(a,u)),a.expirationTime<i&&(a.expirationTime=i),u=a.alternate,u!==null&&u.expirationTime<i&&(u.expirationTime=i),Cp(a.return,i),l.expirationTime<i&&(l.expirationTime=i);break}u=u.next}}else o=a.tag===10&&a.type===t.type?null:a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Ve(e,t,r.children,i),t=t.child}return t;case 9:return r=t.type,s=t.pendingProps,n=s.children,Ji(t,i),r=We(r,s.unstable_observedBits),n=n(r),t.effectTag|=1,Ve(e,t,n,i),t.child;case 14:return r=t.type,s=qe(r,t.pendingProps),s=qe(r.type,s),Hp(e,t,r,s,n,i);case 15:return Wp(e,t,t.type,t.pendingProps,n,i);case 17:return n=t.type,r=t.pendingProps,r=t.elementType===n?r:qe(n,r),e!==null&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,Ne(n)?(e=!0,ls(t)):e=!1,Ji(t,i),Ep(t,n,r),hl(t,n,r,i),Tl(null,t,n,!0,e,i);case 19:return Xp(e,t,i)}throw Error(S(156,t.tag))};var Wl=null,Fl=null;function Ix(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined")return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var i=t.inject(e);Wl=function(n){try{t.onCommitFiberRoot(i,n,void 0,(n.current.effectTag&64)===64)}catch{}},Fl=function(n){try{t.onCommitFiberUnmount(i,n)}catch{}}}catch{}return!0}function bx(e,t,i,n){this.tag=e,this.key=i,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=n,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function ft(e,t,i,n){return new bx(e,t,i,n)}function Ql(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ax(e){if(typeof e=="function")return Ql(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ma)return 11;if(e===wa)return 14}return 2}function bi(e,t){var i=e.alternate;return i===null?(i=ft(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.effectTag=0,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null),i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function Hs(e,t,i,n,r,s){var o=2;if(n=e,typeof e=="function")Ql(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case di:return Jt(i.children,r,s,t);case Jy:o=8,r|=7;break;case Fd:o=8,r|=1;break;case Hr:return e=ft(12,i,t,r|8),e.elementType=Hr,e.type=Hr,e.expirationTime=s,e;case Wr:return e=ft(13,i,t,r),e.type=Wr,e.elementType=Wr,e.expirationTime=s,e;case va:return e=ft(19,i,t,r),e.elementType=va,e.expirationTime=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qd:o=10;break e;case Zd:o=9;break e;case ma:o=11;break e;case wa:o=14;break e;case Yd:o=16,n=null;break e;case Gd:o=22;break e}throw Error(S(130,e==null?e:typeof e,""))}return t=ft(o,i,t,r),t.elementType=e,t.type=n,t.expirationTime=s,t}function Jt(e,t,i,n){return e=ft(7,e,n,t),e.expirationTime=i,e}function Zl(e,t,i){return e=ft(6,e,null,t),e.expirationTime=i,e}function Yl(e,t,i){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.expirationTime=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ex(e,t,i){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=i,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function bf(e,t){var i=e.firstSuspendedTime;return e=e.lastSuspendedTime,i!==0&&i>=t&&e<=t}function Ai(e,t){var i=e.firstSuspendedTime,n=e.lastSuspendedTime;i<t&&(e.firstSuspendedTime=t),(n>t||i===0)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Af(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var i=e.firstSuspendedTime;i!==0&&(t>=i?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Gl(e,t){var i=e.lastExpiredTime;(i===0||i>t)&&(e.lastExpiredTime=t)}function Ws(e,t,i,n){var r=t.current,s=pt(),o=Xn.suspense;s=Si(s,r,o);e:if(i){i=i._reactInternalFiber;t:{if(hi(i)!==i||i.tag!==1)throw Error(S(170));var a=i;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(Ne(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(S(171))}if(i.tag===1){var l=i.type;if(Ne(l)){i=lp(i,l,a);break e}}i=a}else i=Ut;return t.context===null?t.context=i:t.pendingContext=i,t=Ft(s,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),Qt(r,t),Xt(r,s),s}function Xl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ef(e,t){e=e.memoizedState,e!==null&&e.dehydrated!==null&&e.retryTime<t&&(e.retryTime=t)}function Jl(e,t){Ef(e,t),(e=e.alternate)&&Ef(e,t)}function Kl(e,t,i){i=i!=null&&i.hydrate===!0;var n=new Ex(e,t,i),r=ft(3,null,null,t===2?7:t===1?3:0);n.current=r,r.stateNode=n,cl(r),e[Bn]=n.current,i&&t!==0&&r0(e,e.nodeType===9?e:e.ownerDocument),this._internalRoot=n}Kl.prototype.render=function(e){Ws(e,this._internalRoot,null,null)},Kl.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Ws(null,e,null,function(){t[Bn]=null})};function or(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Tx(e,t){if(t||(t=e?e.nodeType===9?e.documentElement:e.firstChild:null,t=!(!t||t.nodeType!==1||!t.hasAttribute("data-reactroot"))),!t)for(var i;i=e.lastChild;)e.removeChild(i);return new Kl(e,0,t?{hydrate:!0}:void 0)}function Fs(e,t,i,n,r){var s=i._reactRootContainer;if(s){var o=s._internalRoot;if(typeof r=="function"){var a=r;r=function(){var u=Xl(o);a.call(u)}}Ws(t,o,e,r)}else{if(s=i._reactRootContainer=Tx(i,n),o=s._internalRoot,typeof r=="function"){var l=r;r=function(){var u=Xl(o);l.call(u)}}vf(function(){Ws(t,o,e,r)})}return Xl(o)}function Nx(e,t,i){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_i,key:n==null?null:""+n,children:e,containerInfo:t,implementation:i}}Sh=function(e){if(e.tag===13){var t=hs(pt(),150,100);Xt(e,t),Jl(e,t)}},Pa=function(e){e.tag===13&&(Xt(e,3),Jl(e,3))},Ch=function(e){if(e.tag===13){var t=pt();t=Si(t,e,null),Xt(e,t),Jl(e,t)}},la=function(e,t,i){switch(t){case"input":if(Sa(e,i),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<i.length;t++){var n=i[t];if(n!==e&&n.form===e.form){var r=Xa(n);if(!r)throw Error(S(90));Kd(n),Sa(n,r)}}}break;case"textarea":nh(e,i);break;case"select":t=i.value,t!=null&&$i(e,!!i.multiple,t,!1)}},ua=mf,Od=function(e,t,i,n,r){var s=L;L|=4;try{return Ht(98,e.bind(null,t,i,n,r))}finally{L=s,L===ae&&ut()}},ca=function(){(L&(1|et|ht))===ae&&(mx(),nn())},_d=function(e,t){var i=L;L|=2;try{return e(t)}finally{L=i,L===ae&&ut()}};function Tf(e,t){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!or(t))throw Error(S(200));return Nx(e,t,null,i)}var kx={Events:[_n,pi,Xa,Ld,oa,Fi,function(e){Ta(e,v0)},Rd,Bd,qr,Gr,nn,{current:!1}]};(function(e){var t=e.findFiberByHostInstance;return Ix(Se({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ke.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=mh(i),i===null?null:i.stateNode},findFiberByHostInstance:function(i){return t?t(i):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:On,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kx,Ue.createPortal=Tf,Ue.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternalFiber;if(t===void 0)throw typeof e.render=="function"?Error(S(188)):Error(S(268,Object.keys(e)));return e=mh(t),e=e===null?null:e.stateNode,e},Ue.flushSync=function(e,t){if((L&(et|ht))!==ae)throw Error(S(187));var i=L;L|=1;try{return Ht(99,e.bind(null,t))}finally{L=i,ut()}},Ue.hydrate=function(e,t,i){if(!or(t))throw Error(S(200));return Fs(null,e,t,!0,i)},Ue.render=function(e,t,i){if(!or(t))throw Error(S(200));return Fs(null,e,t,!1,i)},Ue.unmountComponentAtNode=function(e){if(!or(e))throw Error(S(40));return e._reactRootContainer?(vf(function(){Fs(null,null,e,!1,function(){e._reactRootContainer=null,e[Bn]=null})}),!0):!1},Ue.unstable_batchedUpdates=mf,Ue.unstable_createPortal=function(e,t){return Tf(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},Ue.unstable_renderSubtreeIntoContainer=function(e,t,i,n){if(!or(i))throw Error(S(200));if(e==null||e._reactInternalFiber===void 0)throw Error(S(38));return Fs(e,t,i,!1,n)},Ue.version="16.14.0";function Nf(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Nf)}catch(e){console.error(e)}}Nf(),Ed.exports=Ue;var kf=Ed.exports,Px=Object.defineProperty,zx=Object.defineProperties,Dx=Object.getOwnPropertyDescriptors,Pf=Object.getOwnPropertySymbols,jx=Object.prototype.hasOwnProperty,Lx=Object.prototype.propertyIsEnumerable,zf=(e,t,i)=>t in e?Px(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Oe=(e,t)=>{for(var i in t||(t={}))jx.call(t,i)&&zf(e,i,t[i]);if(Pf)for(var i of Pf(t))Lx.call(t,i)&&zf(e,i,t[i]);return e};const Df={src:"",currentTime:0,hostTime:0,muted:!1,paused:!0,volume:1},jf={currentTimeMaxError:1,syncInterval:1e3,retryInterval:15e3,verbose:!1,log:console.log.bind(console)};let Kt=jf;function Vx(e){Kt=Oe(Oe({},jf),e)}function Qs(e,t){if(e.paused)return e.currentTime;const i=function(n){if(n.player)return n.player.beginTimestamp+n.player.progressTime;if(n.room)return n.room.calibrationTimestamp}(t);return i?e.currentTime+(i-e.hostTime)/1e3:e.currentTime}const Rx=navigator.userAgent.includes("Safari"),Bx=[".aac",".mid",".midi",".mp3",".ogg",".oga",".wav",".weba"];var Ox=typeof global=="object"&&global&&global.Object===Object&&global,_x=typeof self=="object"&&self&&self.Object===Object&&self,Lf=Ox||_x||Function("return this")(),Zs=Lf.Symbol,Vf=Object.prototype,$x=Vf.hasOwnProperty,Ux=Vf.toString,ar=Zs?Zs.toStringTag:void 0,Hx=Object.prototype.toString,Rf=Zs?Zs.toStringTag:void 0;function Wx(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Rf&&Rf in Object(e)?function(t){var i=$x.call(t,ar),n=t[ar];try{t[ar]=void 0;var r=!0}catch{}var s=Ux.call(t);return r&&(i?t[ar]=n:delete t[ar]),s}(e):function(t){return Hx.call(t)}(e)}var Fx=/\s/,Qx=/^\s+/;function Zx(e){return e&&e.slice(0,function(t){for(var i=t.length;i--&&Fx.test(t.charAt(i)););return i}(e)+1).replace(Qx,"")}function ql(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Yx=/^[-+]0x[0-9a-f]+$/i,Gx=/^0b[01]+$/i,Xx=/^0o[0-7]+$/i,Jx=parseInt;function Bf(e){if(typeof e=="number")return e;if(function(n){return typeof n=="symbol"||function(r){return r!=null&&typeof r=="object"}(n)&&Wx(n)=="[object Symbol]"}(e))return NaN;if(ql(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ql(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Zx(e);var i=Gx.test(e);return i||Xx.test(e)?Jx(e.slice(2),i?2:8):Yx.test(e)?NaN:+e}var eu=function(){return Lf.Date.now()},Kx=Math.max,qx=Math.min;function Ys(e,t,i){var n,r,s,o,a,l,u=0,h=!1,p=!1,w=!0;if(typeof e!="function")throw new TypeError("Expected a function");function C(g){var m=n,x=r;return n=r=void 0,u=g,o=e.apply(x,m)}function E(g){return u=g,a=setTimeout(c,t),h?C(g):o}function T(g){var m=g-l;return l===void 0||m>=t||m<0||p&&g-u>=s}function c(){var g=eu();if(T(g))return d(g);a=setTimeout(c,function(m){var x=t-(m-l);return p?qx(x,s-(m-u)):x}(g))}function d(g){return a=void 0,w&&n?C(g):(n=r=void 0,o)}function f(){var g=eu(),m=T(g);if(n=arguments,r=this,l=g,m){if(a===void 0)return E(l);if(p)return clearTimeout(a),a=setTimeout(c,t),C(l)}return a===void 0&&(a=setTimeout(c,t)),o}return t=Bf(t)||0,ql(i)&&(h=!!i.leading,s=(p="maxWait"in i)?Kx(Bf(i.maxWait)||0,t):s,w="trailing"in i?!!i.trailing:w),f.cancel=function(){a!==void 0&&clearTimeout(a),u=0,n=l=r=a=void 0},f.flush=function(){return a===void 0?o:d(eu())},f}class Of extends ui.exports.Component{constructor(t){super(t),this.seeking=!1,this.mobileSeeking=!1,this.track=null,this.hoverTime=null,this.offset=0,this.secondsPrefix="00:00:",this.minutesPrefix="00:",this.seekPause=!1,this.handleTouchSeeking=i=>{let n=0;for(let r=0;r<i.changedTouches.length;r++)n=i.changedTouches[r].pageX;n=n<0?0:n,this.mobileSeeking&&this.changeCurrentTimePosition(n)},this.handleSeeking=i=>{this.seeking&&this.changeCurrentTimePosition(i.pageX)},this.setTrackWidthState=()=>{this.track&&this.setState({trackWidth:this.track.offsetWidth})},this.handleTrackHover=(i,n)=>{if(this.track){const r=this.props.scale||1;let s;s=i?0:(n.pageX-this.track.getBoundingClientRect().left)/r,this.setState({seekHoverPosition:s,trackWidth:this.track.offsetWidth})}},this.mouseSeekingHandler=i=>{this.setSeeking(!1,i),this.onMouseUp()},this.setSeeking=(i,n)=>{n.preventDefault(),this.handleSeeking(n),this.seeking=i,this.setState({seekHoverPosition:i?this.state.seekHoverPosition:0})},this.mobileTouchSeekingHandler=()=>{this.setMobileSeeking(!1)},this.setMobileSeeking=i=>{this.mobileSeeking=i,this.setState({seekHoverPosition:i?this.state.seekHoverPosition:0})},this.renderBufferProgress=()=>{if(this.props.buffered){const i=Oe(Oe({},this.getPositionStyle(this.props.buffered)),this.props.bufferColor&&{backgroundColor:this.props.bufferColor});return _.createElement("div",{className:"buffered",style:i})}return null},this.renderProgress=()=>{const i=Oe(Oe({},this.getPositionStyle(this.props.current)),this.props.sliderColor&&{backgroundColor:this.props.sliderColor});return _.createElement("div",{className:"connect",style:i})},this.renderHoverProgress=()=>{const i=Oe(Oe({},this.getSeekHoverPosition()),this.props.sliderHoverColor&&{backgroundColor:this.props.sliderHoverColor});return _.createElement("div",{className:"seek-hover",style:i})},this.renderThumb=()=>_.createElement("div",{className:this.isThumbActive()?"thumb active":"thumb",style:this.getThumbHandlerPosition()},_.createElement("div",{style:{backgroundColor:this.props.thumbColor},className:"handler"})),this.onMouseDown=i=>{var n,r;this.props.pause&&!this.props.paused&&(this.props.pause(),this.seekPause=!0),this.setSeeking(!0,i),(r=(n=this.props).onSeekStart)==null||r.call(n)},this.onMouseUp=()=>{var i,n;this.props.play&&this.seekPause&&(this.props.play(),this.seekPause=!1),(n=(i=this.props).onSeekEnd)==null||n.call(i)},this.props.secondsPrefix&&(this.secondsPrefix=this.props.secondsPrefix),this.props.minutesPrefix&&(this.minutesPrefix=this.props.minutesPrefix),this.state={ready:!1,trackWidth:0,seekHoverPosition:0}}componentDidMount(){this.setTrackWidthState(),window.addEventListener("resize",this.setTrackWidthState),window.addEventListener("mousemove",this.handleSeeking),window.addEventListener("mouseup",this.mouseSeekingHandler),window.addEventListener("touchmove",this.handleTouchSeeking),window.addEventListener("touchend",this.mobileTouchSeekingHandler)}componentWillUnmount(){window.removeEventListener("resize",this.setTrackWidthState),window.removeEventListener("mousemove",this.handleSeeking),window.removeEventListener("mouseup",this.mouseSeekingHandler),window.removeEventListener("touchmove",this.handleTouchSeeking),window.removeEventListener("touchend",this.mobileTouchSeekingHandler)}changeCurrentTimePosition(t){if(this.track){const i=this.props.scale||1;let n=(t-this.track.getBoundingClientRect().left)/i;n=Math.min(this.state.trackWidth,Math.max(0,n)),this.setState({seekHoverPosition:n});const r=+(n/this.state.trackWidth*this.props.total).toFixed(0);this.props.onChange(r)}}getPositionStyle(t){return{transform:`scaleX(${100*t/this.props.total/100})`}}getThumbHandlerPosition(){return{transform:`translateX(${this.state.trackWidth/(this.props.total/this.props.current)}px)`}}getSeekHoverPosition(){return{transform:`scaleX(${100*this.state.seekHoverPosition/this.state.trackWidth/100})`}}getHoverTimePosition(){let t=0;return this.hoverTime&&(t=this.state.seekHoverPosition-this.hoverTime.offsetWidth/2,this.props.limitTimeTooltipBySides&&(t<0?t=0:t+this.hoverTime.offsetWidth>this.state.trackWidth&&(t=this.state.trackWidth-this.hoverTime.offsetWidth))),{transform:`translateX(${t}px)`}}secondsToTime(t){t=Math.round(t+this.offset);const i=Math.floor(t/3600),n=t%3600,r=Math.floor(n/60),s=Math.ceil(n%60);return{hh:i.toString(),mm:r<10?"0"+r:r.toString(),ss:s<10?"0"+s:s.toString()}}getHoverTime(){const t=100*this.state.seekHoverPosition/this.state.trackWidth,i=Math.floor(+t*(this.props.total/100)),n=this.secondsToTime(i);return this.props.total+this.offset<60?this.secondsPrefix+n.ss:this.props.total+this.offset<3600?this.minutesPrefix+n.mm+":"+n.ss:n.hh+":"+n.mm+":"+n.ss}isThumbActive(){return this.state.seekHoverPosition>0||this.seeking}drawHoverTime(){return this.props.hideHoverTime?null:_.createElement("div",{className:this.isThumbActive()?"hover-time active":"hover-time",style:this.getHoverTimePosition(),ref:t=>this.hoverTime=t},this.getHoverTime())}render(){return _.createElement("div",{className:"seek-slider"},_.createElement("div",{className:"track",ref:t=>this.track=t,onMouseMove:t=>this.handleTrackHover(!1,t),onMouseLeave:t=>this.handleTrackHover(!0,t),onMouseDown:this.onMouseDown,onTouchStart:t=>{this.setMobileSeeking(!0),this.onMouseDown(t)},onMouseUp:this.onMouseUp,onTouchEnd:this.onMouseUp},_.createElement("div",{className:"main"},this.renderBufferProgress(),this.renderHoverProgress(),this.renderProgress())),this.drawHoverTime(),this.renderThumb())}}class eS extends ui.exports.Component{constructor(t){super(t),this.stageVolume=0,this.updateVolumeTimer=0,this.onVolumeSeeking=!1,this.onClickOperationButton=()=>{const{paused:i}=this.props;i?this.props.play():this.props.pause()},this.operationButton=()=>{const{paused:i}=this.props;return i?_.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBhcmlhLWhpZGRlbj0idHJ1ZSIgcm9sZT0iaW1nIiBjbGFzcz0iaWNvbmlmeSBpY29uaWZ5LS1tZGkiIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNOCA1LjE0djE0bDExLTdsLTExLTd6IiBmaWxsPSIjZmZmIj48L3BhdGg+PC9zdmc+Cg=="}):_.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBhcmlhLWhpZGRlbj0idHJ1ZSIgcm9sZT0iaW1nIiBjbGFzcz0iaWNvbmlmeSBpY29uaWZ5LS1tZGkiIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTQgMTloNFY1aC00TTYgMTloNFY1SDZ2MTR6IiBmaWxsPSIjZmZmIj48L3BhdGg+PC9zdmc+Cg=="})},this.operationVolumeButton=()=>this.props.volume>.9?_.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBhcmlhLWhpZGRlbj0idHJ1ZSIgcm9sZT0iaW1nIiBjbGFzcz0iaWNvbmlmeSBpY29uaWZ5LS1tZGkiIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTQgMy4yM3YyLjA2YzIuODkuODYgNSAzLjU0IDUgNi43MXMtMi4xMSA1Ljg0LTUgNi43djIuMDdjNC0uOTEgNy00LjQ5IDctOC43N2MwLTQuMjgtMy03Ljg2LTctOC43N00xNi41IDEyYzAtMS43Ny0xLTMuMjktMi41LTQuMDNWMTZjMS41LS43MSAyLjUtMi4yNCAyLjUtNE0zIDl2Nmg0bDUgNVY0TDcgOUgzeiIgZmlsbD0iI2ZmZiI+PC9wYXRoPjwvc3ZnPgo="}):this.props.volume===0?_.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBhcmlhLWhpZGRlbj0idHJ1ZSIgcm9sZT0iaW1nIiBjbGFzcz0iaWNvbmlmeSBpY29uaWZ5LS1tZGkiIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNyA5djZoNGw1IDVWNGwtNSA1SDd6IiBmaWxsPSIjZmZmIj48L3BhdGg+PC9zdmc+Cg=="}):_.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBhcmlhLWhpZGRlbj0idHJ1ZSIgcm9sZT0iaW1nIiBjbGFzcz0iaWNvbmlmeSBpY29uaWZ5LS1tZGkiIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNSA5djZoNGw1IDVWNEw5IDltOS41IDNjMC0xLjc3LTEtMy4yOS0yLjUtNC4wM1YxNmMxLjUtLjcxIDIuNS0yLjI0IDIuNS00eiIgZmlsbD0iI2ZmZiI+PC9wYXRoPjwvc3ZnPgo="}),this.handleClickVolume=()=>{this.props.volume===0?this.stageVolume!==0?this.props.setVolume(this.stageVolume):this.props.setVolume(1):(this.stageVolume=this.props.volume,this.props.setVolume(0))},this.onChange=i=>{this.setState({currentTime:i}),i&&this.changeTime(i)},this.changeTime=Ys(i=>{this.props.setCurrentTime(i)},50),this.onVolumeChange=i=>{this.changeVolume(i),this.setState({seekVolume:i/100})},this.changeVolume=Ys(i=>{this.props.setVolume(i/100)},50),this.onVolumeSeekStart=()=>{this.onVolumeSeeking=!0},this.onVolumeSeekEnd=Ys(()=>{this.onVolumeSeeking=!1},500),this.onProgressSeekStart=()=>this.setState({isPlayerSeeking:!0}),this.onProgressSeekEnd=Ys(()=>{this.setState({isPlayerSeeking:!1})},500),this.state={isPlayerSeeking:!1,isVolumeHover:!1,seekVolume:1,visible:!0,currentTime:0},this.stageVolume=t.volume}componentDidMount(){this.updateVolumeTimer=setInterval(()=>{this.onVolumeSeeking||this.setState({seekVolume:this.props.volume}),this.state.isPlayerSeeking||this.setState({currentTime:this.props.currentTime})},100)}componentWillUnmount(){this.updateVolumeTimer&&clearInterval(this.updateVolumeTimer)}render(){const{duration:t,currentTime:i}=this.props;return _.createElement("div",{className:"player-controller",style:{opacity:this.props.visible?"1":"0"}},_.createElement("div",{className:"player-controller-progress"},_.createElement(Of,{total:t,current:this.state.currentTime,onChange:this.onChange,buffered:this.props.buffered,bufferColor:"rgba(255,255,255,0.3)",hideHoverTime:!0,limitTimeTooltipBySides:!0,onSeekStart:this.onProgressSeekStart,onSeekEnd:this.onProgressSeekEnd,play:this.props.play,pause:this.props.pause,paused:this.props.paused,scale:this.props.scale})),_.createElement("div",{className:"player-controller-actions"},_.createElement("div",{className:"player-controller-actions-left"},_.createElement("div",{onClick:this.onClickOperationButton,className:"player-controller-play"},this.operationButton()),_.createElement("div",{className:"player-volume-box",onMouseEnter:()=>this.setState({isVolumeHover:!0}),onMouseLeave:()=>this.setState({isVolumeHover:!1})},_.createElement("div",{onClick:this.handleClickVolume,className:"player-volume"},this.operationVolumeButton()),_.createElement("div",{className:"player-volume-slider"},_.createElement(Of,{total:100,current:100*this.state.seekVolume,onChange:this.onVolumeChange,onSeekStart:this.onVolumeSeekStart,onSeekEnd:this.onVolumeSeekEnd,scale:this.props.scale,limitTimeTooltipBySides:!0,hideHoverTime:!0})))),_.createElement("div",{className:"player-mid-box-time"},_f(Math.floor(i/1e3))," /"," ",_f(Math.floor(t/1e3)))))}}function _f(e){const t=e%60,i=(e-t)/60;if(i>=60){const n=i%60;return`${lr((i-n)/60)}:${lr(n)}:${lr(t)}`}return`${lr(i)}:${lr(t)}`}function lr(e){return e<=9?`0${e}`:`${e}`}class tS extends ui.exports.Component{constructor(){super(...arguments),this.putAttributes=t=>{const{context:i}=this.props,n=i.getAttributes()||{};for(const r in t)n[r]!==t[r]&&i.updateAttributes([r],t[r])}}render(){const{context:t}=this.props,i=t.getRoom(),n=i?void 0:t.getDisplayer(),r=this.putAttributes;return _.createElement(iS,{room:i,player:n,context:t,plugin:{putAttributes:r}})}}class iS extends ui.exports.Component{constructor(t){super(t),this.alertMask=null,this.container=_.createRef(),this.controllerHiddenTimer=0,this.syncPlayerTimer=0,this.retryCount=0,this.decreaseRetryTimer=0,this.noSoundSyncCount=0,this.showController=()=>{this.setState({controllerVisible:!0}),this.debounceHidingController()},this.play=()=>{var i;const n=(i=this.props.room)==null?void 0:i.calibrationTimestamp;this.debug(">>> play",{paused:!1,hostTime:n}),this.isEnabled()&&this.props.plugin.putAttributes({paused:!1,hostTime:n})},this.pause=()=>{const i=Qs(this.getAttributes(),this.props);this.debug(">>> pause",{paused:!0,currentTime:i}),this.isEnabled()&&this.props.plugin.putAttributes({paused:!0,currentTime:i})},this.setVolume=i=>{this.debug(">>> volume",{volume:i}),this.isEnabled()&&this.props.plugin.putAttributes({volume:i}),this.isEnabled()&&this.props.plugin.putAttributes({volume:i,muted:i===0})},this.setCurrentTime=i=>{var n;const r=(n=this.props.room)==null?void 0:n.calibrationTimestamp;this.debug(">>> seek",{currentTime:i/1e3,hostTime:r}),this.isEnabled()&&this.props.plugin.putAttributes({currentTime:i/1e3,hostTime:r})},this.resetPlayer=()=>{var i;(i=this.player)==null||i.autoplay(!1),this.state.NoSound||(this.debug(">>> ended",{paused:!0,currentTime:0}),this.isEnabled()&&this.props.plugin.putAttributes({paused:!0,currentTime:0}))},this.syncPlayerWithAttributes=()=>{var i;const n=this.getAttributes();if(!n)return;const r=this.player;if(!r||this.state.NoSound&&(this.noSoundSyncCount+=1)%8!=0)return;r.paused()!==n.paused&&(this.debug("<<< paused -> %o",n.paused),n.paused?r.pause():(i=r.play())==null||i.catch(this.catchPlayFail)),r.muted()!==n.muted&&(this.debug("<<< muted -> %o",n.muted),r.muted(n.muted)),r.volume()!==n.volume&&(this.debug("<<< volume -> %o",n.volume),r.volume(n.volume));const s=Qs(n,this.props);let o=Kt.currentTimeMaxError;this.state.NoSound&&(o*=3),s>r.duration()?this.resetPlayer():Math.abs(r.currentTime()-s)>o&&(this.debug("<<< currentTime -> %o",s),r.currentTime(s))},this.debounceHidingController=()=>{this.controllerHiddenTimer&&(clearTimeout(this.controllerHiddenTimer),this.controllerHiddenTimer=0),this.controllerHiddenTimer=setTimeout(()=>{this.setState({controllerVisible:!1}),this.controllerHiddenTimer=0},3e3)},this.decreaseRetryCount=()=>{this.player&&this.retryCount>0&&(this.retryCount=this.retryCount-1)},this.catchPlayFail=i=>{var n,r;const s=String(i);if(Rx&&s.includes("NotAllowedError")||s.includes("interact"))(n=this.player)==null||n.autoplay("any"),this.setState({NoSound:!0});else{const o=(r=this.player)==null?void 0:r.error();o&&(this.retryCount<=3?(this.initPlayer(),this.retryCount=this.retryCount+1):(this.debug("catch videojs media error",o),this.setState({MediaError:!0}))),this.debug("catch error",i)}},this.fixPlayFail=()=>{this.debug("try to fix play state"),this.setState({NoSound:!1});const{muted:i,volume:n}=this.getAttributes();this.player&&(this.player.muted(i),this.player.volume(n))},this.initPlayer=async()=>{var i;(i=this.player)==null||i.dispose(),this.player=void 0,this.debug("creating elements ...");const{type:n,src:r,poster:s}=this.getAttributes(),o=document.createElement("div");o.setAttribute("data-vjs-player","");const a=document.createElement("video");a.className="video-js",s&&(a.poster=s),a.setAttribute("playsInline",""),a.setAttribute("webkit-playsinline","");const l=document.createElement("source");new URL(r).pathname.endsWith(".m3u8")?l.type="application/x-mpegURL":a.src=r,l.src=r,n&&(l.type=n),a.appendChild(l),o.appendChild(a),this.container.current.appendChild(o),await new Promise(h=>(window.requestAnimationFrame||window.setTimeout)(h)),this.debug("initializing videojs() ...");const u=su.default(a);this.player=u,window.player=u,u.one("loadedmetadata",this.gracefullyUpdate),u.on("ready",()=>{var h;(h=Kt.onPlayer)==null||h.call(Kt,u),u.on("timeupdate",this.gracefullyUpdate),u.on("volumechange",this.gracefullyUpdate),u.on("seeked",this.gracefullyUpdate),u.on("play",this.gracefullyUpdate),u.on("pause",this.gracefullyUpdate),u.on("ended",this.resetPlayer)}),u.on("error",this.catchPlayFail),this.setState({MediaError:!1})},this.gracefullyUpdate=()=>this.setState({updater:!this.state.updater}),this.setupAlert=i=>{i&&(i.addEventListener("touchstart",this.fixPlayFail),i.addEventListener("click",this.fixPlayFail)),this.alertMask=i},this.setupReload=i=>{i&&(i.addEventListener("touchstart",this.initPlayer),i.addEventListener("click",this.initPlayer))},this.state={NoSound:!1,MediaError:!1,updater:!1,controllerVisible:!1},t.room&&function(i){if(!i.calibrationTimestamp)throw new Error("@netless/app-media-player@0.1.0-alpha.5 requires white-web-sdk@^2.13.8 to work properly.")}(t.room)}getAttributes(){const{context:t}=this.props;let i=t.getAttributes();if(i){if(i=Oe(Oe({},Df),i),this.player){let r=Qs(i,this.props),s=this.player.duration();!i.paused&&r>s&&(n=Oe({},i),i=zx(n,Dx({currentTime:0,paused:!0})),this.resetPlayer())}var n;return i}}isShowingPoster(){const t=this.getAttributes();return!(t!=null&&t.src)||Bx.some(i=>t.src.endsWith(i))}render(){var t,i;if(!this.props.room&&!this.props.player)return null;const n=this.getAttributes();if(!n)return null;const r=1e3*(((t=this.player)==null?void 0:t.duration())||1e3),s=((i=this.player)==null?void 0:i.bufferedPercent())||0;return _.createElement("div",{className:this.isEnabled()?"vjs-p":"vjs-p disabled",onMouseEnter:this.showController,onMouseMove:this.showController},_.createElement("div",{className:"video-js-plugin-player",ref:this.container}),this.isShowingPoster()&&_.createElement("div",{className:"video-js-plugin-poster"},n.poster&&_.createElement("img",{src:n.poster,alt:"",draggable:!1})),_.createElement(eS,{duration:r,volume:n.volume,setVolume:this.setVolume,paused:n.paused,play:this.play,pause:this.pause,currentTime:1e3*Qs(n,this.props),setCurrentTime:this.setCurrentTime,buffered:r*s,visible:!0}),this.state.NoSound&&_.createElement("div",{ref:this.setupAlert,className:"videojs-plugin-muted-alert"}),this.state.MediaError&&_.createElement("div",{className:"videojs-plugin-recovery-mode"},_.createElement("button",{ref:this.setupReload},"Reload Player")))}debug(t,...i){Kt.verbose&&Kt.log(`[MediaPlayer] ${t}`,...i)}componentDidMount(){this.debug("app version =","0.1.0-alpha.5"),this.debug("video.js version =",su.default.VERSION),this.initPlayer(),this.props.context.emitter.on("attributesUpdate",this.syncPlayerWithAttributes),this.syncPlayerTimer=setInterval(this.syncPlayerWithAttributes,Kt.syncInterval),this.decreaseRetryTimer=setInterval(this.decreaseRetryCount,Kt.retryInterval)}componentWillUnmount(){var t;this.debug("unmount"),this.props.context.emitter.off("attributesUpdate",this.syncPlayerWithAttributes),(t=this.player)==null||t.dispose(),clearInterval(this.syncPlayerTimer),clearInterval(this.decreaseRetryTimer)}isEnabled(){return this.props.context.getIsWritable()}}const Gs={kind:"MediaPlayer",setup(e){let t=e.getAttributes();if(!t||!t.src)return e.emitter.emit("destroy",{error:new Error("[MediaPlayer]: Missing 'attributes'.'src'.")});t=Oe(Oe({},Df),t);const i=e.getBox();i.mountStyles(`.vjs-p{display:flex;flex-grow:1}.vjs-p *{pointer-events:auto}.vjs-p.disabled *{pointer-events:none}.vjs-p .video-js-plugin-poster{position:absolute;top:0;left:0;right:0;bottom:0;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgQAAACACAYAAAB0vHFxAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAACBKADAAQAAAABAAAAgAAAAACE3oPTAAAKXUlEQVR4Ae3dYW4ktxEG0LW9FwkC2McycokAOUGAXMLwtQwYvomdP4akHUnNnm6SVUU+/xqpe8ji+yiDWz3a/e7L5v/98se//3pL8K9//O+7t19Hv85eX7RP9vnllz2h4/rkd+wz+ir/0cLfjv/9t1/6igABAgQIENhRwIFgx9StmQABAgQIPAg4EDyA+JIAAQIECOwo8HXHRVvzPIHRzwBHjz9PKudMo31Hj59TdZ2qsueXvb5sO0GHIFsi6iFAgAABAgECOgQB6KbsJ5Dtt0L6rWyPkeRXO+fs+WWvL1v6OgTZElEPAQIECBAIENAhCEA3ZT8Bzwj7WUaMJL8I9X5zZs8ve339kugzkg5BH0ejECBAgACB0gIOBKXjUzwBAgQIEOgj4EDQx9EoBAgQIECgtIADQen4FE+AAAECBPoIOBD0cTQKAQIECBAoLeC3DErHp/iWgE8Zt4RyX5df7nxa1Y3Ob/T4rfWtdl2HYLVErYcAAQIECFwQWL5DsPoJcvX1XdjTpd4iv1JxvStWfu9IfCORwLP7U4cgUXhKIUCAAAECUQIOBFHy5iVAgAABAokEHAgShaEUAgQIECAQJXD7MwTPPqOIWujVeUevb/T4V9ftfecE5HfOKetd8suajLoiBHQIItTNSYAAAQIEkgnc7hAkW0/3ckb/e9qjx+8OYsBvBOT3DUe5L+RXLjIFDxTQIRiIa2gCBAgQIFBFoNkh2P0Z2+j1jx4/+0asvv7q9d/dH9XXX73+3fO7u/7W+3fbHzoErR3hOgECBAgQ2ECg2SHwjG2DXRC4xOj9tdufAHpHLb/eonPHk9+xd7TPcXX9r+oQ9Dc1IgECBAgQKCfgQFAuMgUTIECAAIH+Ag4E/U2NSIAAAQIEygk0P0MQvaLsz3hb9bWu840WOJ5ffsc+2a/KL3tC6jsSmL1/dQiO0nCNAAECBAhsItDsEMw+oTzrHl1f61OorevPrvfZ+6N9WvVmr09+xwnKr7ZP9vyOdcdfze7Tuz4dgvF7ygwECBAgQCC9QLNDkH0F0X+C45NdoHZ99rf8aguofqRA7/8/6BCMTMvYBAgQIECgiED5DkHvZyhFcjtdJp/TVClvlF/KWE4XJb/TVG68INB7f+kQXAjBWwgQIECAwGoCDgSrJWo9BAgQIEDggoADwQU0byFAgAABAqsJfO39DGI1IOuJFbA/Y/3vzi6/u4Kx7189v7vru/v+2HTfz65D8N7EdwgQIECAwHYCw3/LYLUT1HY7pLFg+TaAkl+WX/KAGuXJrwEUfLlaPjoEwRvG9AQIECBAIIPA8A5B779JKQOaGl4F5PtqUfGV/Cqm9lqz/F4tMr6qlo8OQcZdpCYCBAgQIDBZYHiHoNozlMn+5aeTb+0I5Se/2gK5q6/286VDkHs/qY4AAQIECEwRcCCYwmwSAgQIECCQW8CBIHc+qiNAgAABAlMEhn+GYMoqTEKAAAEC7wSqPcN+twDfmCqgQzCV22QECBAgQCCnQHiHoPoJtlV/63rObfFaVfX6X1dy7VX19Vev/1pqr++qvv7q9b8m4dVHAtny1SH4KCXfI0CAAAECmwmEdwiq/U1Om+2PL/Kpnbj85FdbYO3qs/186hCsvd+sjgABAgQInBJwIDjF5CYCBAgQILC2gAPB2vlaHQECBAgQOCUQ/hmCbJ+yPKW20U3yqR22/ORXW2Dt6qN/Ph/n1yFYe79ZHQECBAgQOCXgQHCKyU0ECBAgQGBtAQeCtfO1OgIECBAgcErAgeAUk5sIECBAgMDaAg4Ea+drdQQIECBA4JTA1+///OGnoztd52N/fC7g58PPx+e748sX+8P+qLQ/dAiO0nKNAAECBAhsIuBAsEnQlkmAAAECBI4EHAiOdFwjQIAAAQKbCDgQbBK0ZRIgQIAAgSMBB4IjHdcIECBAgMAmAuH/lsHP//zvb5tYl1ymfErG9lK0/F4oSr6QX8nYThcdne/j/DoEp6NzIwECBAgQWFfAgWDdbK2MAAECBAicFnAgOE3lRgIECBAgsK5A+GcIfv39Pz++5X18pvH2mtfzBeQz37znjPLrqTl/LPnNN585Y7Z8dQhmpm8uAgQIECCQVCC8Q1C9I9Cqv3U96b54Kat6/S8Lufii+vqr138xtpe3VV9/9fpfgvDiQ4Fs+eoQfBiTbxIgQIAAgb0EwjsEe3FbLQECBOYJZPsT6LyVm+mKgA7BFTXvIUCAAAECiwk4ECwWqOUQIECAAIErAg4EV9S8hwABAgQILCYw/DMEnmEttmMeliPfB5BiX8qvWGAP5crvASTZl9Xy0SFItoGUQ4AAAQIEIgSGdwiy/U1MEcgrzynf2unKT361BXJXX+3nS4cg935SHQECBAgQmCIwvENQ7RnKFPWFJpFv7TDlJ7/aArmrr/bzpUOQez+pjgABAgQITBH4Wu0EM0XFJGkE7M80UVwqRH6X2NK8afX87q7v7vvTBP13IToE2RJRDwECBAgQCBBwIAhANyUBAgQIEMgm4ECQLRH1ECBAgACBAIHhv2Uwek2rPcPp7cWnt+jc8eQ317v3bPLrLWq8twK995cOwVtdrwkQIECAwKYC5TsE1f4mqNn7jM9s8b7zya+v5+zR5DdbfK/5eu8vHYK99o/VEiBAgACBDwWaHYLezyg+rOLGN6Pra53QWtdvLP3UW6N9WkVmr09+xwnKr7ZP9vyOdcdfze7Tuz4dgvF7ygwECBAgQCC9QLNDEL2C3ieg3utp1de63rueZ8fLXt+z6+l9f3af7PX1zuPZ8bL7ZK/vWW/39xWYvT90CPrmZzQCBAgQIFBSwIGgZGyKJkCAAAECfQUcCPp6Go0AAQIECJQUaH6GIPpT1iVVFX1aIHp/zX5GdxqmyI3yKxLUJ2XK7xOYv78d7XNcXf+rOgT9TY1IgAABAgTKCTQ7BLv/CWr0+kePn31HVl9/9frv7o/q669e/+753V1/6/277Q8dgtaOcJ0AAQIECGwg0OwQbGBwuMTRz5BGj3+4OBdvC8jvNmHoAPIL5Td5MgEdgmSBKIcAAQIECEQI3O4QrP6MZfT6Ro8fsal2mlN+tdOWX+38VN9XQIegr6fRCBAgQIBASQEHgpKxKZoAAQIECPQVcCDo62k0AgQIECBQUuD2Zwiyr3r1Z4Srry/7/rpbn/zuCsa+X36x/mY/Fnh2f+oQHHu6SoAAAQIEthBYvkOwRYoW+anAsyfkTwdyIURAfiHs3SYdnd/o8btBFBlIh6BIUMokQIAAAQIjBRwIRuoamwABAgQIFBFwICgSlDIJECBAgMBIAQeCkbrGJkCAAAECRQQcCIoEpUwCBAgQIDBSwG8ZjNQ19nABnzIeTjx0AvkN5R0+ePb8stc3PKAnJ9AheBLM7QQIECBAYEUBHYIVU91oTf49+9phy09+IwXsr+d0dQie83I3AQIECBBYUkCHYMlY8yxq9DO80ePnkYypZLTv6PFj1PaZNXt+2evLtlN0CLIloh4CBAgQIBAg4EAQgG5KAgQIECCQTcCBIFsi6iFAgAABAgEC/wdVfx9UuC8B6AAAAABJRU5ErkJggg==);background-repeat:repeat-x;background-position:0 50%;display:flex;align-items:center;justify-content:center}.vjs-p .video-js-plugin-poster img{box-shadow:0 0 5px 10px #0006}.vjs-p .player-controller,.vjs-p .videojs-plugin-muted-alert{pointer-events:auto}.vjs-p.disabled .videojs-plugin-close-icon,.vjs-p.disabled .player-controller{pointer-events:none}.vjs-p .video-js-plugin-player{position:absolute;top:0;left:0;right:0;bottom:0}.video-js,[data-vjs-player]{width:100%;height:100%}.vjs-p .videojs-plugin-muted-alert{pointer-events:auto;cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:43}.vjs-p .videojs-plugin-muted-alert:before{pointer-events:auto;cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:43;content:"\\f104";background:rgba(0,0,0,.3);font-family:VideoJS;font-size:2em;display:flex;align-items:center;justify-content:center;color:#fff}.vjs-p .videojs-plugin-recovery-mode{pointer-events:auto;cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:44}.vjs-p .videojs-plugin-recovery-mode button{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.vjs-p .seek-slider{position:relative;width:100%}.vjs-p .seek-slider:focus{outline:none}.vjs-p .seek-slider .track{padding:10px 0;cursor:pointer;outline:none}.vjs-p .seek-slider .track:focus{border:0;outline:none}.vjs-p .seek-slider .track .main{width:100%;height:3px;background-color:#ffffff4d;border-radius:30px;position:absolute;left:0;top:8.5px;transition:transform .4s;outline:none}.vjs-p .seek-slider .track .main:focus{border:0;outline:none}.vjs-p .seek-slider .track .main .buffered{position:absolute;background-color:#ffffff4d;width:100%;height:100%;transform:scaleX(.8);z-index:2;transform-origin:0 0}.vjs-p .seek-slider .track .main .seek-hover{position:absolute;background-color:#ffffff80;width:100%;height:100%;z-index:1;transform:scaleX(.6);transform-origin:0 0;opacity:0;transition:opacity .4s}.vjs-p .seek-slider .track .main .connect{position:absolute;background-color:#fff;width:100%;height:100%;z-index:3;left:0;transform:scaleX(.13);transform-origin:0 0}.vjs-p .seek-slider .track.active .main{transform:scaleY(2)}.vjs-p .seek-slider .thumb{pointer-events:none;position:absolute;width:12px;height:12px;left:-6px;top:4px;z-index:4;transform:translate(100px)}.vjs-p .seek-slider .thumb .handler{border-radius:100%;width:100%;height:100%;background-color:#fff;opacity:0;transform:scale(.4);cursor:pointer;transition:transform .2s;pointer-events:none}.vjs-p .seek-slider .thumb.active .handler{opacity:1;transform:scale(1)}.vjs-p .seek-slider .hover-time{position:absolute;background-color:#0000004d;line-height:18px;font-size:16px;color:#ddd;top:-25px;left:0;padding:5px 10px;border-radius:5px;box-shadow:0 0 5px #0000004d;opacity:0;transform:translate(150px);pointer-events:none}.vjs-p .seek-slider .hover-time.active{opacity:1}.vjs-p .seek-slider:hover .track .main .seek-hover{opacity:1}.vjs-p .player-controller{position:absolute;z-index:100;bottom:0px;left:0;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:stretch;height:64px;background-image:linear-gradient(0deg,#000,transparent);transition:opacity .2s;color:#fff}.vjs-p .player-menu-box{display:flex;align-items:center;justify-content:center;flex-direction:column;margin-bottom:40px}.vjs-p .player-menu-cell{width:100%;text-align:center;font-size:12px;color:#7a7b7c}.vjs-p .player-multiple-play{width:64px;height:120px}.vjs-p .player-controller-actions-left{display:flex;justify-content:center;align-items:center;flex-shrink:0}.vjs-p .player-right-box{font-size:14px;color:#7a7b7c;cursor:pointer;margin-right:12px}.vjs-p .player-controller-actions{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-left:8px;padding-right:8px;margin-top:2px}.vjs-p .player-mid-box-time{font-size:9px;display:flex;justify-content:center;align-items:center;color:#fff;flex-shrink:0;margin-right:8px;font-family:monospace}.vjs-p .player-controller-play{display:flex;align-items:center;justify-content:center;cursor:pointer;padding-right:4px}.vjs-p .player-controller-progress{width:calc(100% - 28px);margin-left:14px;display:flex;align-items:center;justify-content:center;margin-top:8px}.vjs-p .player-volume{display:flex;align-items:center;justify-content:center;cursor:pointer;margin-right:16px;margin-left:8px}.vjs-p .player-volume-slider{width:60px;margin-right:12px;display:flex;align-items:center}.vjs-p .player-volume-box{display:flex;flex-direction:row}.netless-app-media-player-container{display:flex;position:relative;height:100%}
154
- `);const n=document.createElement("div");n.classList.add("netless-app-media-player-container"),kf.render(_.createElement(tS,{context:e}),n),i.mountContent(n),e.emitter.on("destroy",()=>{console.log("[MediaPlayer]: destroy"),kf.unmountComponentAtNode(n)})}},nS=()=>{we.debug&&Vx({verbose:!0}),we.register({kind:Lr.kind,src:Lr}),we.register({kind:Gs.kind,src:Gs})},tu={DocsViewer:Lr.kind,MediaPlayer:Gs.kind},rS={[tu.DocsViewer]:Lr,[tu.MediaPlayer]:Gs};var IS="",bS="",AS="";const $f=new gv({emitter:j}),B=class extends b.InvisiblePlugin{constructor(e){super(e);this.version="1.0.0-canary.32",this.dependencies={dependencies:{"@juggle/resize-observer":"^3.3.1","@netless/telebox-insider":"1.0.0-alpha.29",emittery:"^0.11.0",lodash:"^4.17.21","p-retry":"^4.6.1","side-effect-manager":"^1.1.0",uuid:"^7.0.3","value-enhancer":"^1.3.0","video.js":">=7"},peerDependencies:{"white-web-sdk":"^2.16.0"},devDependencies:{"@netless/app-docs-viewer":"^0.2.9","@netless/app-media-player":"0.1.0-beta.5","@playwright/test":"^1.23.0","@rollup/plugin-commonjs":"^20.0.0","@rollup/plugin-node-resolve":"^13.0.4","@rollup/plugin-url":"^6.1.0","@sveltejs/vite-plugin-svelte":"^1.0.0-next.22","@tsconfig/svelte":"^2.0.1","@types/debug":"^4.1.7","@types/lodash":"^4.14.182","@types/lodash-es":"^4.17.4","@types/node":"^18.0.0","@types/uuid":"^8.3.1","@typescript-eslint/eslint-plugin":"^4.30.0","@typescript-eslint/parser":"^4.30.0","@vitest/ui":"^0.14.1",cypress:"^8.7.0",dotenv:"^10.0.0",eslint:"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-svelte3":"^3.2.0",jsdom:"^19.0.0",less:"^4.1.1",prettier:"^2.3.2","prettier-plugin-svelte":"^2.4.0","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-styles":"^3.14.1",svelte:"^3.42.4",typescript:"^4.5.5",vite:"^2.5.3","vite-plugin-dts":"^1.2.0",vitest:"^0.14.1","white-web-sdk":"2.16.10"}},this.emitter=ee,this.viewMode=b.ViewMode.Broadcaster,this.viewMode$=new I.Val(b.ViewMode.Broadcaster),this.isReplay=b.isPlayer(this.displayer),this.containerSizeRatio=B.containerSizeRatio,B.displayer=e.displayer,window.NETLESS_DEPS={dependencies:{"@juggle/resize-observer":"^3.3.1","@netless/telebox-insider":"1.0.0-alpha.29",emittery:"^0.11.0",lodash:"^4.17.21","p-retry":"^4.6.1","side-effect-manager":"^1.1.0",uuid:"^7.0.3","value-enhancer":"^1.3.0","video.js":">=7"},peerDependencies:{"white-web-sdk":"^2.16.0"},devDependencies:{"@netless/app-docs-viewer":"^0.2.9","@netless/app-media-player":"0.1.0-beta.5","@playwright/test":"^1.23.0","@rollup/plugin-commonjs":"^20.0.0","@rollup/plugin-node-resolve":"^13.0.4","@rollup/plugin-url":"^6.1.0","@sveltejs/vite-plugin-svelte":"^1.0.0-next.22","@tsconfig/svelte":"^2.0.1","@types/debug":"^4.1.7","@types/lodash":"^4.14.182","@types/lodash-es":"^4.17.4","@types/node":"^18.0.0","@types/uuid":"^8.3.1","@typescript-eslint/eslint-plugin":"^4.30.0","@typescript-eslint/parser":"^4.30.0","@vitest/ui":"^0.14.1",cypress:"^8.7.0",dotenv:"^10.0.0",eslint:"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-svelte3":"^3.2.0",jsdom:"^19.0.0",less:"^4.1.1",prettier:"^2.3.2","prettier-plugin-svelte":"^2.4.0","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-styles":"^3.14.1",svelte:"^3.42.4",typescript:"^4.5.5",vite:"^2.5.3","vite-plugin-dts":"^1.2.0",vitest:"^0.14.1","white-web-sdk":"2.16.10"}}}static async mount(e){var s;const t=e.room;B.container=e.container;const i=e.debug,n=e.cursor;B.params=e,B.displayer=e.room,Ag();let r;if(b.isRoom(t)){if(t.phase!==b.RoomPhase.Connected)throw new Error("[WindowManager]: Room only Connected can be mount");t.phase===b.RoomPhase.Connected&&t.isWritable&&(t.disableSerialization=!1),r=await this.initManager(t)}if(B.isCreated)throw new Error("[WindowManager]: Already created cannot be created again");if(this.debug=Boolean(i),Pt("Already insert room",r),b.isRoom(this.displayer)){if(!r)throw new Error("[WindowManager]: init InvisiblePlugin failed")}else await Yf.default(async o=>{if(r=await t.getInvisiblePlugin(B.kind),!r)throw Pt(`manager is empty. retrying ${o}`),new Error},{retries:10});if(!r)throw new Error("[WindowManager]: create manager failed");e.containerSizeRatio&&(B.containerSizeRatio=e.containerSizeRatio),r.containerSizeRatio=B.containerSizeRatio,await r.ensureAttributes(),r.appManager=new Vg(r),r._pageState=new fv(r.appManager),r.cursorManager=new pv(r.appManager,Boolean(n),e.applianceIcons),r.boxManager=$m(r,ee,j,gt,{collectorContainer:e.collectorContainer,collectorStyles:e.collectorStyles,prefersColorScheme:e.prefersColorScheme,stageRatio:B.containerSizeRatio,containerStyle:e.containerStyle,stageStyle:e.stageStyle,fullscreen:e.fullscreen}),(s=r.appManager)==null||s.setBoxManager(r.boxManager),e.container&&r.bindContainer(e.container),mv(t,r),j.emit("onCreated"),B.isCreated=!0;try{await eg()}catch(o){console.warn("[WindowManager]: indexedDB open failed"),console.log(o)}return r}static async initManager(e){let t=e.getInvisiblePlugin(B.kind);if(!t&&b.isRoom(e))if(e.isWritable===!1){try{await e.setWritable(!0)}catch{throw new Error("[WindowManger]: room must be switched to be writable")}t=await Nu(e),t==null||t.ensureAttributes(),await cr(500),await e.setWritable(!1)}else t=await Nu(e);return t}static initContainer(e,t,i){B.container||(B.container=e);const{playground:n,mainViewElement:r}=bg(e,t);if(B.playground=n,i){const s=document.createElement("style");s.textContent=i,n.appendChild(s)}return r}static get registered(){return Ie.registered}bindContainer(e){var t,i,n,r,s,o;if(b.isRoom(this.displayer)&&this.room.phase!==b.RoomPhase.Connected)throw new Cu;if(B.isCreated&&B.container)B.container.firstChild&&e.appendChild(B.container.firstChild);else{const a=(t=this.boxManager)==null?void 0:t.teleBoxManager.$stage;if(B.params&&a){const l=B.params,u=B.initContainer(e,a,l.overwriteStyles);this.boxManager&&B.playground&&this.boxManager.setRoot(B.playground),this.bindMainView(u,l.disableCameraTransform),B.playground&&((i=this.cursorManager)==null||i.setupWrapper(B.playground))}}j.emit("updateManagerRect"),(n=this.appManager)==null||n.refresh(),(r=this.appManager)==null||r.resetMaximized(),(s=this.appManager)==null||s.resetMinimized(),(o=this.appManager)==null||o.displayerWritableListener(!this.room.isWritable),B.container=e}bindCollectorContainer(e){B.isCreated&&this.boxManager?this.boxManager.setCollector(e):B.params&&(B.params.collectorContainer=e)}static register(e){return Ie.register(e)}static unregister(e){return Ie.unregister(e)}async addApp(e){if(this.appManager)return this.appManager.rootDirRemoving?new Promise((t,i)=>{j.once("rootDirRemoved").then(async()=>{try{const n=await this._addApp(e);t(n)}catch(n){i(n.message)}})}):this._addApp(e);throw new be}async _addApp(e){var t,i,n;if(this.appManager){if(!e.kind||typeof e.kind!="string")throw new wu;const r=await((t=Ie.appClasses.get(e.kind))==null?void 0:t());if(r&&((i=r.config)==null?void 0:i.singleton)&&this.appManager.appProxies.has(e.kind))throw new mu;const s=this.setupScenePath(e,this.appManager);return s===void 0?void 0:((n=e==null?void 0:e.options)!=null&&n.scenePath&&(e.options.scenePath=vg(e.options.scenePath)),await this.appManager.addApp(e,Boolean(s)))}else throw new be}setupScenePath(e,t){let i=!1;if(e.options){const{scenePath:n,scenes:r}=e.options;if(n){if(!mg(n))throw new xu;const s=Object.keys(this.apps||{});for(const o of s){const a=t.store.getAppScenePath(o);if(a&&a===n){if(console.warn(`[WindowManager]: ScenePath ${n} Already opened`),this.boxManager){const l=this.boxManager.getTopBox();l&&this.boxManager.setZIndex(o,l.zIndex+1,!1)}return}}}n&&r&&r.length>0&&(this.isDynamicPPT(r)?(i=!0,ni(this.displayer)[n]||Ti(this.room,n,r)):ni(this.displayer)[n]||Ti(this.room,n,[{name:r[0].name}])),n&&r===void 0&&Ti(this.room,n,[{}])}return i}async setMainViewScenePath(e){this.appManager&&await this.appManager.setMainViewScenePath(e)}async setMainViewSceneIndex(e){this.appManager&&await this.appManager.setMainViewSceneIndex(e)}async nextPage(){if(this.appManager){const e=this.mainViewSceneIndex+1;return e>=this.mainViewScenesLength?(console.warn("[WindowManager]: current page is the last page"),!1):(await this.appManager.setMainViewSceneIndex(e),!0)}else return!1}async prevPage(){if(this.appManager){const e=this.mainViewSceneIndex-1;return e<0?(console.warn("[WindowManager]: current page is the first page"),!1):(await this.appManager.setMainViewSceneIndex(e),!0)}else return!1}async jumpPage(e){return this.appManager?e<0||e>=this.pageState.length?(console.warn(`[WindowManager]: index ${e} out of range`),!1):(await this.appManager.setMainViewSceneIndex(e),!0):!1}async addPage(e){if(this.appManager){const t=e==null?void 0:e.after,i=e==null?void 0:e.scene;if(t){const n=this.mainViewSceneIndex+1;this.room.putScenes(ze,[i||{}],n)}else this.room.putScenes(ze,[i||{}])}}async removePage(e){if(this.appManager){const t=e===void 0?this.pageState.index:e;return this.pageState.length===1?(console.warn("[WindowManager]: can not remove the last page"),!1):t<0||t>=this.pageState.length?(console.warn(`[WindowManager]: index ${e} out of range`),!1):this.appManager.removeSceneByIndex(t)}else return!1}getMainViewScenePath(){var e;return(e=this.appManager)==null?void 0:e.store.getMainViewScenePath()}getMainViewSceneIndex(){var e;return(e=this.appManager)==null?void 0:e.store.getMainViewSceneIndex()}setReadonly(e){var t;this.readonly=e,(t=this.boxManager)==null||t.setReadonly(e),j.emit("setReadonly",e)}switchMainViewToWriter(){var e;return(e=this.appManager)==null?void 0:e.mainViewProxy.mainViewClickHandler()}onAppDestroy(e,t){fg(`destroy-${e}`,t)}setViewMode(e){var i;Pt("setViewMode",e);const t=(i=this.appManager)==null?void 0:i.mainViewProxy;e===b.ViewMode.Broadcaster&&(this.canOperate&&(t==null||t.storeCurrentCamera()),t==null||t.start()),e===b.ViewMode.Freedom&&(t==null||t.stop()),this.viewMode=e,this.viewMode$.setValue(e)}setBoxState(e){if(!!this.canOperate)switch(e){case"normal":this.setMaximized(!1),this.setMinimized(!1);break;case"maximized":this.setMaximized(!0),this.setMinimized(!1);break;case"minimized":this.setMinimized(!0);break}}setMaximized(e){var t;!this.canOperate||(t=this.boxManager)==null||t.setMaximized(e,!1)}setMinimized(e){var t;!this.canOperate||(t=this.boxManager)==null||t.setMinimized(e,!1)}get mainView(){if(this.appManager)return this.appManager.mainViewProxy.view;throw new be}get camera(){if(this.appManager)return this.appManager.mainViewProxy.view.camera;throw new be}get baseCamera$(){if(this.appManager)return this.appManager.mainViewProxy.camera$;throw new be}get baseSize$(){if(this.appManager)return this.appManager.mainViewProxy.size$;throw new be}get cameraState(){if(this.appManager)return this.appManager.mainViewProxy.cameraState;throw new be}get apps(){var e;return(e=this.appManager)==null?void 0:e.store.apps()}get boxState(){var e;if(this.appManager)return(e=this.appManager.boxManager)==null?void 0:e.boxState;throw new be}get darkMode(){var e,t;return Boolean((t=(e=this.appManager)==null?void 0:e.boxManager)==null?void 0:t.darkMode)}get prefersColorScheme(){var e;if(this.appManager)return(e=this.appManager.boxManager)==null?void 0:e.prefersColorScheme;throw new be}get fullscreen(){var e;if(this.appManager)return(e=this.appManager.boxManager)==null?void 0:e.teleBoxManager.fullscreen;throw new be}get focused(){return this.attributes.focus}get focusedView(){var e,t;return((t=(e=this.appManager)==null?void 0:e.focusApp)==null?void 0:t.view)||this.mainView}get mainViewSceneIndex(){var e;return((e=this._pageState)==null?void 0:e.index)||0}get mainViewSceneDir(){var e;if(this.appManager)return(e=this.appManager)==null?void 0:e.getMainViewSceneDir();throw new be}get topApp(){var e,t;return(t=(e=this.boxManager)==null?void 0:e.getTopBox())==null?void 0:t.id}get mainViewScenesLength(){var e;return((e=this._pageState)==null?void 0:e.length)||0}get canRedoSteps(){var e;return((e=this.focusedView)==null?void 0:e.canRedoSteps)||0}get canUndoSteps(){var e;return((e=this.focusedView)==null?void 0:e.canUndoSteps)||0}get sceneState(){if(this.appManager)return this.appManager.sceneState;throw new be}get pageState(){if(this._pageState)return this._pageState.toObject();throw new be}queryAll(){var e;return Array.from(((e=this.appManager)==null?void 0:e.appProxies.values())||[])}queryOne(e){var t;return(t=this.appManager)==null?void 0:t.appProxies.get(e)}async closeApp(e){var t;return(t=this.appManager)==null?void 0:t.closeApp(e)}moveCamera(e){const t=F({},this.mainView.camera),i=F(F({},t),e);A.isEqual(i,t)||!this.appManager||this.appManager.mainViewProxy.storeCamera(F({id:this.appManager.uid},i))}moveCameraToContain(e){if(!this.appManager)return;const t=this.appManager.mainViewProxy.size$.value;if(t){const i=t.width/e.width,n=t.height/e.height,r=Math.min(i,n);this.appManager.mainViewProxy.storeCamera({id:this.appManager.uid,scale:r,centerX:e.originX,centerY:e.originY})}}convertToPointInWorld(e){return this.mainView.convertToPointInWorld(e)}setCameraBound(e){this.mainView.setCameraBound(e)}onDestroy(){this._destroy()}destroy(){this._destroy()}_destroy(){var e,t,i;(e=this.appManager)==null||e.destroy(),(t=this.cursorManager)==null||t.destroy(),B.container=void 0,B.isCreated=!1,B.playground&&((i=B.playground.parentNode)==null||i.removeChild(B.playground)),B.params=void 0,Pt("Destroyed")}bindMainView(e,t){var i;this.appManager&&(this.appManager.bindMainView(e,Boolean(t)),(i=this.cursorManager)==null||i.setMainViewDivElement(e))}get canOperate(){return b.isRoom(this.displayer)?this.displayer.isWritable&&this.displayer.phase===b.RoomPhase.Connected:!1}get room(){return this.displayer}safeSetAttributes(e){this.canOperate&&this.setAttributes(e)}safeUpdateAttributes(e,t){this.canOperate&&this.updateAttributes(e,t)}setPrefersColorScheme(e){var t,i;(i=(t=this.appManager)==null?void 0:t.boxManager)==null||i.setPrefersColorScheme(e)}setFullscreen(e){var t,i;(i=(t=this.appManager)==null?void 0:t.boxManager)==null||i.teleBoxManager.setFullscreen(e)}cleanCurrentScene(){var e;(e=this.focusedView)==null||e.cleanCurrentScene()}redo(){var e;return((e=this.focusedView)==null?void 0:e.redo())||0}undo(){var e;return((e=this.focusedView)==null?void 0:e.undo())||0}delete(){var e;(e=this.focusedView)==null||e.delete()}copy(){var e;(e=this.focusedView)==null||e.copy()}paste(){var e;(e=this.focusedView)==null||e.paste()}duplicate(){var e;(e=this.focusedView)==null||e.duplicate()}insertText(e,t,i){var n;return((n=this.focusedView)==null?void 0:n.insertText(e,t,i))||""}insertImage(e){var t;return(t=this.focusedView)==null?void 0:t.insertImage(e)}completeImageUpload(e,t){var i;return(i=this.focusedView)==null?void 0:i.completeImageUpload(e,t)}lockImage(e,t){var i;return(i=this.focusedView)==null?void 0:i.lockImage(e,t)}lockImages(e){var t;return(t=this.focusedView)==null?void 0:t.lockImages(e)}refresh(){var e;this._refresh(),(e=this.appManager)==null||e.dispatchInternalEvent(Z.Refresh)}_refresh(){var e,t;(e=this.appManager)==null||e.mainViewProxy.rebind(),B.container&&this.bindContainer(B.container),(t=this.appManager)==null||t.refresher.refresh()}setContainerSizeRatio(e){if(!A.isNumber(e))throw new Error(`[WindowManager]: updateContainerSizeRatio error, ratio must be a number. but got ${e}`);B.containerSizeRatio=e,this.containerSizeRatio=e,j.emit("containerSizeRatioUpdate",e)}setContainerStyle(e){var t;(t=this.boxManager)==null||t.teleBoxManager.setContainerStyle(e)}setStageStyle(e){var t;(t=this.boxManager)==null||t.teleBoxManager.setStageStyle(e)}createPPTHandler(){return{onPageJumpTo:(e,t)=>{var i,n,r,s;(s=(r=(n=(i=this.appManager)==null?void 0:i.focusApp)==null?void 0:n.appContext)==null?void 0:r.whiteBoardView)==null||s.jumpPage(t)},onPageToNext:()=>{var e,t,i,n;this.focused&&((n=(i=(t=(e=this.appManager)==null?void 0:e.focusApp)==null?void 0:t.appContext)==null?void 0:i.whiteBoardView)==null||n.nextPage())},onPageToPrev:()=>{var e,t,i,n;this.focused&&((n=(i=(t=(e=this.appManager)==null?void 0:e.focusApp)==null?void 0:t.appContext)==null?void 0:i.whiteBoardView)==null||n.prevPage())}}}isDynamicPPT(e){var i,n;const t=(n=(i=e[0])==null?void 0:i.ppt)==null?void 0:n.src;return t==null?void 0:t.startsWith("pptx://")}async ensureAttributes(){A.isNull(this.attributes)&&await cr(50),A.isObject(this.attributes)&&(this.attributes[oe.Apps]||this.safeSetAttributes({[oe.Apps]:{}}),this.attributes[oe.Cursors]||this.safeSetAttributes({[oe.Cursors]:{}}),this.attributes._mainScenePath||this.safeSetAttributes({_mainScenePath:uu}),this.attributes._mainSceneIndex||this.safeSetAttributes({_mainSceneIndex:0}),this.attributes[oe.Registered]||this.safeSetAttributes({[oe.Registered]:{}}))}};let we=B;we.kind="WindowManager",we.debug=!1,we.containerSizeRatio=Jf,we.isCreated=!1,nS(),O.AppCreateError=mu,O.AppManagerNotInitError=be,O.AppNotRegisterError=xg,O.BindContainerRoomPhaseInvalidError=Cu,O.BoxManagerNotFoundError=Su,O.BoxNotCreatedError=yu,O.BuiltinApps=tu,O.BuiltinAppsMap=rS,O.InvalidScenePath=xu,O.ParamsInvalidError=wu,O.WhiteWebSDKInvalidError=vu,O.WindowManager=we,O.calculateNextIndex=ro,O.reconnectRefresher=$f,Object.defineProperties(O,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
154
+ `);const n=document.createElement("div");n.classList.add("netless-app-media-player-container"),kf.render(_.createElement(tS,{context:e}),n),i.mountContent(n),e.emitter.on("destroy",()=>{console.log("[MediaPlayer]: destroy"),kf.unmountComponentAtNode(n)})}},nS=()=>{we.debug&&Vx({verbose:!0}),we.register({kind:Lr.kind,src:Lr}),we.register({kind:Gs.kind,src:Gs})},tu={DocsViewer:Lr.kind,MediaPlayer:Gs.kind},rS={[tu.DocsViewer]:Lr,[tu.MediaPlayer]:Gs};var IS="",bS="",AS="";const $f=new gv({emitter:j}),B=class extends b.InvisiblePlugin{constructor(e){super(e);this.version="1.0.0-canary.33",this.dependencies={dependencies:{"@juggle/resize-observer":"^3.3.1","@netless/telebox-insider":"1.0.0-alpha.30",emittery:"^0.11.0",lodash:"^4.17.21","p-retry":"^4.6.1","side-effect-manager":"^1.1.0",uuid:"^7.0.3","value-enhancer":"^1.3.0","video.js":">=7"},peerDependencies:{"white-web-sdk":"^2.16.0"},devDependencies:{"@netless/app-docs-viewer":"^0.2.9","@netless/app-media-player":"0.1.0-beta.5","@playwright/test":"^1.23.0","@rollup/plugin-commonjs":"^20.0.0","@rollup/plugin-node-resolve":"^13.0.4","@rollup/plugin-url":"^6.1.0","@sveltejs/vite-plugin-svelte":"^1.0.0-next.22","@tsconfig/svelte":"^2.0.1","@types/debug":"^4.1.7","@types/lodash":"^4.14.182","@types/lodash-es":"^4.17.4","@types/node":"^18.0.0","@types/uuid":"^8.3.1","@typescript-eslint/eslint-plugin":"^4.30.0","@typescript-eslint/parser":"^4.30.0","@vitest/ui":"^0.14.1",cypress:"^8.7.0",dotenv:"^10.0.0",eslint:"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-svelte3":"^3.2.0",jsdom:"^19.0.0",less:"^4.1.1",prettier:"^2.3.2","prettier-plugin-svelte":"^2.4.0","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-styles":"^3.14.1",svelte:"^3.42.4",typescript:"^4.5.5",vite:"^2.5.3","vite-plugin-dts":"^1.2.0",vitest:"^0.14.1","white-web-sdk":"2.16.10"}},this.emitter=ee,this.viewMode=b.ViewMode.Broadcaster,this.viewMode$=new I.Val(b.ViewMode.Broadcaster),this.isReplay=b.isPlayer(this.displayer),this.containerSizeRatio=B.containerSizeRatio,B.displayer=e.displayer,window.NETLESS_DEPS={dependencies:{"@juggle/resize-observer":"^3.3.1","@netless/telebox-insider":"1.0.0-alpha.30",emittery:"^0.11.0",lodash:"^4.17.21","p-retry":"^4.6.1","side-effect-manager":"^1.1.0",uuid:"^7.0.3","value-enhancer":"^1.3.0","video.js":">=7"},peerDependencies:{"white-web-sdk":"^2.16.0"},devDependencies:{"@netless/app-docs-viewer":"^0.2.9","@netless/app-media-player":"0.1.0-beta.5","@playwright/test":"^1.23.0","@rollup/plugin-commonjs":"^20.0.0","@rollup/plugin-node-resolve":"^13.0.4","@rollup/plugin-url":"^6.1.0","@sveltejs/vite-plugin-svelte":"^1.0.0-next.22","@tsconfig/svelte":"^2.0.1","@types/debug":"^4.1.7","@types/lodash":"^4.14.182","@types/lodash-es":"^4.17.4","@types/node":"^18.0.0","@types/uuid":"^8.3.1","@typescript-eslint/eslint-plugin":"^4.30.0","@typescript-eslint/parser":"^4.30.0","@vitest/ui":"^0.14.1",cypress:"^8.7.0",dotenv:"^10.0.0",eslint:"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-svelte3":"^3.2.0",jsdom:"^19.0.0",less:"^4.1.1",prettier:"^2.3.2","prettier-plugin-svelte":"^2.4.0","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-styles":"^3.14.1",svelte:"^3.42.4",typescript:"^4.5.5",vite:"^2.5.3","vite-plugin-dts":"^1.2.0",vitest:"^0.14.1","white-web-sdk":"2.16.10"}}}static async mount(e){var s;const t=e.room;B.container=e.container;const i=e.debug,n=e.cursor;B.params=e,B.displayer=e.room,Ag();let r;if(b.isRoom(t)){if(t.phase!==b.RoomPhase.Connected)throw new Error("[WindowManager]: Room only Connected can be mount");t.phase===b.RoomPhase.Connected&&t.isWritable&&(t.disableSerialization=!1),r=await this.initManager(t)}if(B.isCreated)throw new Error("[WindowManager]: Already created cannot be created again");if(this.debug=Boolean(i),Pt("Already insert room",r),b.isRoom(this.displayer)){if(!r)throw new Error("[WindowManager]: init InvisiblePlugin failed")}else await Yf.default(async o=>{if(r=await t.getInvisiblePlugin(B.kind),!r)throw Pt(`manager is empty. retrying ${o}`),new Error},{retries:10});if(!r)throw new Error("[WindowManager]: create manager failed");e.containerSizeRatio&&(B.containerSizeRatio=e.containerSizeRatio),r.containerSizeRatio=B.containerSizeRatio,await r.ensureAttributes(),r.appManager=new Vg(r),r._pageState=new fv(r.appManager),r.cursorManager=new pv(r.appManager,Boolean(n),e.applianceIcons),r.boxManager=$m(r,ee,j,gt,{collectorContainer:e.collectorContainer,collectorStyles:e.collectorStyles,prefersColorScheme:e.prefersColorScheme,stageRatio:B.containerSizeRatio,containerStyle:e.containerStyle,stageStyle:e.stageStyle,fullscreen:e.fullscreen}),(s=r.appManager)==null||s.setBoxManager(r.boxManager),e.container&&r.bindContainer(e.container),mv(t,r),j.emit("onCreated"),B.isCreated=!0;try{await eg()}catch(o){console.warn("[WindowManager]: indexedDB open failed"),console.log(o)}return r}static async initManager(e){let t=e.getInvisiblePlugin(B.kind);if(!t&&b.isRoom(e))if(e.isWritable===!1){try{await e.setWritable(!0)}catch{throw new Error("[WindowManger]: room must be switched to be writable")}t=await Nu(e),t==null||t.ensureAttributes(),await cr(500),await e.setWritable(!1)}else t=await Nu(e);return t}static initContainer(e,t,i){B.container||(B.container=e);const{playground:n,mainViewElement:r}=bg(e,t);if(B.playground=n,i){const s=document.createElement("style");s.textContent=i,n.appendChild(s)}return r}static get registered(){return Ie.registered}bindContainer(e){var t,i,n,r,s,o;if(b.isRoom(this.displayer)&&this.room.phase!==b.RoomPhase.Connected)throw new Cu;if(B.isCreated&&B.container)B.container.firstChild&&e.appendChild(B.container.firstChild);else{const a=(t=this.boxManager)==null?void 0:t.teleBoxManager.$stage;if(B.params&&a){const l=B.params,u=B.initContainer(e,a,l.overwriteStyles);this.boxManager&&B.playground&&this.boxManager.setRoot(B.playground),this.bindMainView(u,l.disableCameraTransform),B.playground&&((i=this.cursorManager)==null||i.setupWrapper(B.playground))}}j.emit("updateManagerRect"),(n=this.appManager)==null||n.refresh(),(r=this.appManager)==null||r.resetMaximized(),(s=this.appManager)==null||s.resetMinimized(),(o=this.appManager)==null||o.displayerWritableListener(!this.room.isWritable),B.container=e}bindCollectorContainer(e){B.isCreated&&this.boxManager?this.boxManager.setCollector(e):B.params&&(B.params.collectorContainer=e)}static register(e){return Ie.register(e)}static unregister(e){return Ie.unregister(e)}async addApp(e){if(this.appManager)return this.appManager.rootDirRemoving?new Promise((t,i)=>{j.once("rootDirRemoved").then(async()=>{try{const n=await this._addApp(e);t(n)}catch(n){i(n.message)}})}):this._addApp(e);throw new be}async _addApp(e){var t,i,n;if(this.appManager){if(!e.kind||typeof e.kind!="string")throw new wu;const r=await((t=Ie.appClasses.get(e.kind))==null?void 0:t());if(r&&((i=r.config)==null?void 0:i.singleton)&&this.appManager.appProxies.has(e.kind))throw new mu;const s=this.setupScenePath(e,this.appManager);return s===void 0?void 0:((n=e==null?void 0:e.options)!=null&&n.scenePath&&(e.options.scenePath=vg(e.options.scenePath)),await this.appManager.addApp(e,Boolean(s)))}else throw new be}setupScenePath(e,t){let i=!1;if(e.options){const{scenePath:n,scenes:r}=e.options;if(n){if(!mg(n))throw new xu;const s=Object.keys(this.apps||{});for(const o of s){const a=t.store.getAppScenePath(o);if(a&&a===n){if(console.warn(`[WindowManager]: ScenePath ${n} Already opened`),this.boxManager){const l=this.boxManager.getTopBox();l&&this.boxManager.setZIndex(o,l.zIndex+1,!1)}return}}}n&&r&&r.length>0&&(this.isDynamicPPT(r)?(i=!0,ni(this.displayer)[n]||Ti(this.room,n,r)):ni(this.displayer)[n]||Ti(this.room,n,[{name:r[0].name}])),n&&r===void 0&&Ti(this.room,n,[{}])}return i}async setMainViewScenePath(e){this.appManager&&await this.appManager.setMainViewScenePath(e)}async setMainViewSceneIndex(e){this.appManager&&await this.appManager.setMainViewSceneIndex(e)}async nextPage(){if(this.appManager){const e=this.mainViewSceneIndex+1;return e>=this.mainViewScenesLength?(console.warn("[WindowManager]: current page is the last page"),!1):(await this.appManager.setMainViewSceneIndex(e),!0)}else return!1}async prevPage(){if(this.appManager){const e=this.mainViewSceneIndex-1;return e<0?(console.warn("[WindowManager]: current page is the first page"),!1):(await this.appManager.setMainViewSceneIndex(e),!0)}else return!1}async jumpPage(e){return this.appManager?e<0||e>=this.pageState.length?(console.warn(`[WindowManager]: index ${e} out of range`),!1):(await this.appManager.setMainViewSceneIndex(e),!0):!1}async addPage(e){if(this.appManager){const t=e==null?void 0:e.after,i=e==null?void 0:e.scene;if(t){const n=this.mainViewSceneIndex+1;this.room.putScenes(ze,[i||{}],n)}else this.room.putScenes(ze,[i||{}])}}async removePage(e){if(this.appManager){const t=e===void 0?this.pageState.index:e;return this.pageState.length===1?(console.warn("[WindowManager]: can not remove the last page"),!1):t<0||t>=this.pageState.length?(console.warn(`[WindowManager]: index ${e} out of range`),!1):this.appManager.removeSceneByIndex(t)}else return!1}getMainViewScenePath(){var e;return(e=this.appManager)==null?void 0:e.store.getMainViewScenePath()}getMainViewSceneIndex(){var e;return(e=this.appManager)==null?void 0:e.store.getMainViewSceneIndex()}setReadonly(e){var t;this.readonly=e,(t=this.boxManager)==null||t.setReadonly(e),j.emit("setReadonly",e)}switchMainViewToWriter(){var e;return(e=this.appManager)==null?void 0:e.mainViewProxy.mainViewClickHandler()}onAppDestroy(e,t){fg(`destroy-${e}`,t)}setViewMode(e){var i;Pt("setViewMode",e);const t=(i=this.appManager)==null?void 0:i.mainViewProxy;e===b.ViewMode.Broadcaster&&(this.canOperate&&(t==null||t.storeCurrentCamera()),t==null||t.start()),e===b.ViewMode.Freedom&&(t==null||t.stop()),this.viewMode=e,this.viewMode$.setValue(e)}setBoxState(e){if(!!this.canOperate)switch(e){case"normal":this.setMaximized(!1),this.setMinimized(!1);break;case"maximized":this.setMaximized(!0),this.setMinimized(!1);break;case"minimized":this.setMinimized(!0);break}}setMaximized(e){var t;!this.canOperate||(t=this.boxManager)==null||t.setMaximized(e,!1)}setMinimized(e){var t;!this.canOperate||(t=this.boxManager)==null||t.setMinimized(e,!1)}get mainView(){if(this.appManager)return this.appManager.mainViewProxy.view;throw new be}get camera(){if(this.appManager)return this.appManager.mainViewProxy.view.camera;throw new be}get baseCamera$(){if(this.appManager)return this.appManager.mainViewProxy.camera$;throw new be}get baseSize$(){if(this.appManager)return this.appManager.mainViewProxy.size$;throw new be}get cameraState(){if(this.appManager)return this.appManager.mainViewProxy.cameraState;throw new be}get apps(){var e;return(e=this.appManager)==null?void 0:e.store.apps()}get boxState(){var e;if(this.appManager)return(e=this.appManager.boxManager)==null?void 0:e.boxState;throw new be}get darkMode(){var e,t;return Boolean((t=(e=this.appManager)==null?void 0:e.boxManager)==null?void 0:t.darkMode)}get prefersColorScheme(){var e;if(this.appManager)return(e=this.appManager.boxManager)==null?void 0:e.prefersColorScheme;throw new be}get fullscreen(){var e;if(this.appManager)return(e=this.appManager.boxManager)==null?void 0:e.teleBoxManager.fullscreen;throw new be}get focused(){return this.attributes.focus}get focusedView(){var e,t;return((t=(e=this.appManager)==null?void 0:e.focusApp)==null?void 0:t.view)||this.mainView}get mainViewSceneIndex(){var e;return((e=this._pageState)==null?void 0:e.index)||0}get mainViewSceneDir(){var e;if(this.appManager)return(e=this.appManager)==null?void 0:e.getMainViewSceneDir();throw new be}get topApp(){var e,t;return(t=(e=this.boxManager)==null?void 0:e.getTopBox())==null?void 0:t.id}get mainViewScenesLength(){var e;return((e=this._pageState)==null?void 0:e.length)||0}get canRedoSteps(){var e;return((e=this.focusedView)==null?void 0:e.canRedoSteps)||0}get canUndoSteps(){var e;return((e=this.focusedView)==null?void 0:e.canUndoSteps)||0}get sceneState(){if(this.appManager)return this.appManager.sceneState;throw new be}get pageState(){if(this._pageState)return this._pageState.toObject();throw new be}queryAll(){var e;return Array.from(((e=this.appManager)==null?void 0:e.appProxies.values())||[])}queryOne(e){var t;return(t=this.appManager)==null?void 0:t.appProxies.get(e)}async closeApp(e){var t;return(t=this.appManager)==null?void 0:t.closeApp(e)}moveCamera(e){const t=F({},this.mainView.camera),i=F(F({},t),e);A.isEqual(i,t)||!this.appManager||this.appManager.mainViewProxy.storeCamera(F({id:this.appManager.uid},i))}moveCameraToContain(e){if(!this.appManager)return;const t=this.appManager.mainViewProxy.size$.value;if(t){const i=t.width/e.width,n=t.height/e.height,r=Math.min(i,n);this.appManager.mainViewProxy.storeCamera({id:this.appManager.uid,scale:r,centerX:e.originX,centerY:e.originY})}}convertToPointInWorld(e){return this.mainView.convertToPointInWorld(e)}setCameraBound(e){this.mainView.setCameraBound(e)}onDestroy(){this._destroy()}destroy(){this._destroy()}_destroy(){var e,t,i;(e=this.appManager)==null||e.destroy(),(t=this.cursorManager)==null||t.destroy(),B.container=void 0,B.isCreated=!1,B.playground&&((i=B.playground.parentNode)==null||i.removeChild(B.playground)),B.params=void 0,Pt("Destroyed")}bindMainView(e,t){var i;this.appManager&&(this.appManager.bindMainView(e,Boolean(t)),(i=this.cursorManager)==null||i.setMainViewDivElement(e))}get canOperate(){return b.isRoom(this.displayer)?this.displayer.isWritable&&this.displayer.phase===b.RoomPhase.Connected:!1}get room(){return this.displayer}safeSetAttributes(e){this.canOperate&&this.setAttributes(e)}safeUpdateAttributes(e,t){this.canOperate&&this.updateAttributes(e,t)}setPrefersColorScheme(e){var t,i;(i=(t=this.appManager)==null?void 0:t.boxManager)==null||i.setPrefersColorScheme(e)}setFullscreen(e){var t,i;(i=(t=this.appManager)==null?void 0:t.boxManager)==null||i.teleBoxManager.setFullscreen(e)}cleanCurrentScene(){var e;(e=this.focusedView)==null||e.cleanCurrentScene()}redo(){var e;return((e=this.focusedView)==null?void 0:e.redo())||0}undo(){var e;return((e=this.focusedView)==null?void 0:e.undo())||0}delete(){var e;(e=this.focusedView)==null||e.delete()}copy(){var e;(e=this.focusedView)==null||e.copy()}paste(){var e;(e=this.focusedView)==null||e.paste()}duplicate(){var e;(e=this.focusedView)==null||e.duplicate()}insertText(e,t,i){var n;return((n=this.focusedView)==null?void 0:n.insertText(e,t,i))||""}insertImage(e){var t;return(t=this.focusedView)==null?void 0:t.insertImage(e)}completeImageUpload(e,t){var i;return(i=this.focusedView)==null?void 0:i.completeImageUpload(e,t)}lockImage(e,t){var i;return(i=this.focusedView)==null?void 0:i.lockImage(e,t)}lockImages(e){var t;return(t=this.focusedView)==null?void 0:t.lockImages(e)}refresh(){var e;this._refresh(),(e=this.appManager)==null||e.dispatchInternalEvent(Z.Refresh)}_refresh(){var e,t;(e=this.appManager)==null||e.mainViewProxy.rebind(),B.container&&this.bindContainer(B.container),(t=this.appManager)==null||t.refresher.refresh()}setContainerSizeRatio(e){if(!A.isNumber(e))throw new Error(`[WindowManager]: updateContainerSizeRatio error, ratio must be a number. but got ${e}`);B.containerSizeRatio=e,this.containerSizeRatio=e,j.emit("containerSizeRatioUpdate",e)}setContainerStyle(e){var t;(t=this.boxManager)==null||t.teleBoxManager.setContainerStyle(e)}setStageStyle(e){var t;(t=this.boxManager)==null||t.teleBoxManager.setStageStyle(e)}createPPTHandler(){return{onPageJumpTo:(e,t)=>{var i,n,r,s;(s=(r=(n=(i=this.appManager)==null?void 0:i.focusApp)==null?void 0:n.appContext)==null?void 0:r.whiteBoardView)==null||s.jumpPage(t)},onPageToNext:()=>{var e,t,i,n;this.focused&&((n=(i=(t=(e=this.appManager)==null?void 0:e.focusApp)==null?void 0:t.appContext)==null?void 0:i.whiteBoardView)==null||n.nextPage())},onPageToPrev:()=>{var e,t,i,n;this.focused&&((n=(i=(t=(e=this.appManager)==null?void 0:e.focusApp)==null?void 0:t.appContext)==null?void 0:i.whiteBoardView)==null||n.prevPage())}}}isDynamicPPT(e){var i,n;const t=(n=(i=e[0])==null?void 0:i.ppt)==null?void 0:n.src;return t==null?void 0:t.startsWith("pptx://")}async ensureAttributes(){A.isNull(this.attributes)&&await cr(50),A.isObject(this.attributes)&&(this.attributes[oe.Apps]||this.safeSetAttributes({[oe.Apps]:{}}),this.attributes[oe.Cursors]||this.safeSetAttributes({[oe.Cursors]:{}}),this.attributes._mainScenePath||this.safeSetAttributes({_mainScenePath:uu}),this.attributes._mainSceneIndex||this.safeSetAttributes({_mainSceneIndex:0}),this.attributes[oe.Registered]||this.safeSetAttributes({[oe.Registered]:{}}))}};let we=B;we.kind="WindowManager",we.debug=!1,we.containerSizeRatio=Jf,we.isCreated=!1,nS(),O.AppCreateError=mu,O.AppManagerNotInitError=be,O.AppNotRegisterError=xg,O.BindContainerRoomPhaseInvalidError=Cu,O.BoxManagerNotFoundError=Su,O.BoxNotCreatedError=yu,O.BuiltinApps=tu,O.BuiltinAppsMap=rS,O.InvalidScenePath=xu,O.ParamsInvalidError=wu,O.WhiteWebSDKInvalidError=vu,O.WindowManager=we,O.calculateNextIndex=ro,O.reconnectRefresher=$f,Object.defineProperties(O,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});