@opencx/widget 3.0.25 → 3.0.26

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.
@@ -37,7 +37,7 @@ var wre=Object.defineProperty;var XI=lt=>{throw TypeError(lt)};var bre=(lt,Qe,Ct
37
37
  `+i[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=o&&0<=s);break}}}finally{_h=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?tu(e):""}function CO(e){switch(e.tag){case 5:return tu(e.type);case 16:return tu("Lazy");case 13:return tu("Suspense");case 19:return tu("SuspenseList");case 0:case 2:case 15:return e=Sh(e.type,!1),e;case 11:return e=Sh(e.type.render,!1),e;case 1:return e=Sh(e.type,!0),e;default:return""}}function Ch(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case So:return"Fragment";case _o:return"Portal";case vh:return"Profiler";case yh:return"StrictMode";case wh:return"Suspense";case bh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case lx:return(e.displayName||"Context")+".Consumer";case ux:return(e._context.displayName||"Context")+".Provider";case xh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Eh:return t=e.displayName||null,t!==null?t:Ch(e.type)||"Memo";case Pi:t=e._payload,e=e._init;try{return Ch(e(t))}catch{}}return null}function AO(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ch(t);case 8:return t===yh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ii(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kO(e){var t=fx(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _c(e){e._valueTracker||(e._valueTracker=kO(e))}function px(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fx(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Sc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ah(e,t){var n=t.checked;return ct({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function hx(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ii(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function mx(e,t){t=t.checked,t!=null&&gh(e,"checked",t,!1)}function kh(e,t){mx(e,t);var n=Ii(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Rh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Rh(e,t.type,Ii(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function gx(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Rh(e,t,n){(t!=="number"||Sc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var nu=Array.isArray;function Co(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ii(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Nh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return ct({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function yx(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Q(92));if(nu(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ii(n)}}function vx(e,t){var n=Ii(t.value),r=Ii(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function xx(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function wx(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 Ph(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?wx(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Cc,bx=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Cc=Cc||document.createElement("div"),Cc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Cc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ru(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var iu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},RO=["Webkit","ms","Moz","O"];Object.keys(iu).forEach(function(e){RO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),iu[t]=iu[e]})});function Ex(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||iu.hasOwnProperty(e)&&iu[e]?(""+t).trim():t+"px"}function Tx(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ex(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var NO=ct({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 Ih(e,t){if(t){if(NO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function Oh(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 Dh=null;function Lh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Mh=null,Ao=null,ko=null;function _x(e){if(e=Cu(e)){if(typeof Mh!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=Kc(t),Mh(e.stateNode,e.type,t))}}function Sx(e){Ao?ko?ko.push(e):ko=[e]:Ao=e}function Cx(){if(Ao){var e=Ao,t=ko;if(ko=Ao=null,_x(e),t)for(e=0;e<t.length;e++)_x(t[e])}}function Ax(e,t){return e(t)}function kx(){}var Fh=!1;function Rx(e,t,n){if(Fh)return e(t,n);Fh=!0;try{return Ax(e,t,n)}finally{Fh=!1,(Ao!==null||ko!==null)&&(kx(),Cx())}}function au(e,t){var n=e.stateNode;if(n===null)return null;var r=Kc(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Q(231,t,typeof n));return n}var Bh=!1;if(ti)try{var ou={};Object.defineProperty(ou,"passive",{get:function(){Bh=!0}}),window.addEventListener("test",ou,ou),window.removeEventListener("test",ou,ou)}catch{Bh=!1}function PO(e,t,n,r,i,a,o,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(c){this.onError(c)}}var su=!1,Ac=null,kc=!1,jh=null,IO={onError:function(e){su=!0,Ac=e}};function OO(e,t,n,r,i,a,o,s,u){su=!1,Ac=null,PO.apply(IO,arguments)}function DO(e,t,n,r,i,a,o,s,u){if(OO.apply(this,arguments),su){if(su){var l=Ac;su=!1,Ac=null}else throw Error(Q(198));kc||(kc=!0,jh=l)}}function La(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Nx(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 Px(e){if(La(e)!==e)throw Error(Q(188))}function LO(e){var t=e.alternate;if(!t){if(t=La(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Px(i),e;if(a===r)return Px(i),t;a=a.sibling}throw Error(Q(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,r=a;break}if(s===r){o=!0,r=i,n=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===n){o=!0,n=a,r=i;break}if(s===r){o=!0,r=a,n=i;break}s=s.sibling}if(!o)throw Error(Q(189))}}if(n.alternate!==r)throw Error(Q(190))}if(n.tag!==3)throw Error(Q(188));return n.stateNode.current===n?e:t}function Ix(e){return e=LO(e),e!==null?Ox(e):null}function Ox(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ox(e);if(t!==null)return t;e=e.sibling}return null}var Dx=Dn.unstable_scheduleCallback,Lx=Dn.unstable_cancelCallback,MO=Dn.unstable_shouldYield,FO=Dn.unstable_requestPaint,Et=Dn.unstable_now,BO=Dn.unstable_getCurrentPriorityLevel,Uh=Dn.unstable_ImmediatePriority,Mx=Dn.unstable_UserBlockingPriority,Rc=Dn.unstable_NormalPriority,jO=Dn.unstable_LowPriority,Fx=Dn.unstable_IdlePriority,Nc=null,Dr=null;function UO(e){if(Dr&&typeof Dr.onCommitFiberRoot=="function")try{Dr.onCommitFiberRoot(Nc,e,void 0,(e.current.flags&128)===128)}catch{}}var mr=Math.clz32?Math.clz32:VO,HO=Math.log,zO=Math.LN2;function VO(e){return e>>>=0,e===0?32:31-(HO(e)/zO|0)|0}var Pc=64,Ic=4194304;function uu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Oc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=uu(s):(a&=o,a!==0&&(r=uu(a)))}else o=n&~i,o!==0?r=uu(o):a!==0&&(r=uu(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-mr(t),i=1<<n,r|=e[n],t&=~i;return r}function $O(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function WO(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-mr(a),s=1<<o,u=i[o];u===-1?(!(s&n)||s&r)&&(i[o]=$O(s,t)):u<=t&&(e.expiredLanes|=s),a&=~s}}function Hh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Bx(){var e=Pc;return Pc<<=1,!(Pc&4194240)&&(Pc=64),e}function zh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function lu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mr(t),e[t]=n}function YO(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-mr(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Vh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-mr(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var qe=0;function jx(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ux,$h,Hx,zx,Vx,Wh=!1,Dc=[],Oi=null,Di=null,Li=null,cu=new Map,du=new Map,Mi=[],qO="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function $x(e,t){switch(e){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Di=null;break;case"mouseover":case"mouseout":Li=null;break;case"pointerover":case"pointerout":cu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":du.delete(t.pointerId)}}function fu(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Cu(t),t!==null&&$h(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function GO(e,t,n,r,i){switch(t){case"focusin":return Oi=fu(Oi,e,t,n,r,i),!0;case"dragenter":return Di=fu(Di,e,t,n,r,i),!0;case"mouseover":return Li=fu(Li,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return cu.set(a,fu(cu.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,du.set(a,fu(du.get(a)||null,e,t,n,r,i)),!0}return!1}function Wx(e){var t=Ma(e.target);if(t!==null){var n=La(t);if(n!==null){if(t=n.tag,t===13){if(t=Nx(n),t!==null){e.blockedOn=t,Vx(e.priority,function(){Hx(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Lc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=qh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Dh=r,n.target.dispatchEvent(r),Dh=null}else return t=Cu(n),t!==null&&$h(t),e.blockedOn=n,!1;t.shift()}return!0}function Yx(e,t,n){Lc(e)&&n.delete(t)}function KO(){Wh=!1,Oi!==null&&Lc(Oi)&&(Oi=null),Di!==null&&Lc(Di)&&(Di=null),Li!==null&&Lc(Li)&&(Li=null),cu.forEach(Yx),du.forEach(Yx)}function pu(e,t){e.blockedOn===t&&(e.blockedOn=null,Wh||(Wh=!0,Dn.unstable_scheduleCallback(Dn.unstable_NormalPriority,KO)))}function hu(e){function t(i){return pu(i,e)}if(0<Dc.length){pu(Dc[0],e);for(var n=1;n<Dc.length;n++){var r=Dc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Oi!==null&&pu(Oi,e),Di!==null&&pu(Di,e),Li!==null&&pu(Li,e),cu.forEach(t),du.forEach(t),n=0;n<Mi.length;n++)r=Mi[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Mi.length&&(n=Mi[0],n.blockedOn===null);)Wx(n),n.blockedOn===null&&Mi.shift()}var Ro=ni.ReactCurrentBatchConfig,Mc=!0;function XO(e,t,n,r){var i=qe,a=Ro.transition;Ro.transition=null;try{qe=1,Yh(e,t,n,r)}finally{qe=i,Ro.transition=a}}function QO(e,t,n,r){var i=qe,a=Ro.transition;Ro.transition=null;try{qe=4,Yh(e,t,n,r)}finally{qe=i,Ro.transition=a}}function Yh(e,t,n,r){if(Mc){var i=qh(e,t,n,r);if(i===null)cm(e,t,r,Fc,n),$x(e,r);else if(GO(i,e,t,n,r))r.stopPropagation();else if($x(e,r),t&4&&-1<qO.indexOf(e)){for(;i!==null;){var a=Cu(i);if(a!==null&&Ux(a),a=qh(e,t,n,r),a===null&&cm(e,t,r,Fc,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else cm(e,t,r,null,n)}}var Fc=null;function qh(e,t,n,r){if(Fc=null,e=Lh(r),e=Ma(e),e!==null)if(t=La(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Nx(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Fc=e,null}function qx(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(BO()){case Uh:return 1;case Mx:return 4;case Rc:case jO:return 16;case Fx:return 536870912;default:return 16}default:return 16}}var Fi=null,Gh=null,Bc=null;function Gx(){if(Bc)return Bc;var e,t=Gh,n=t.length,r,i="value"in Fi?Fi.value:Fi.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Bc=i.slice(e,1<r?1-r:void 0)}function jc(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}function Uc(){return!0}function Kx(){return!1}function Ln(e){function t(n,r,i,a,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Uc:Kx,this.isPropagationStopped=Kx,this}return ct(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Uc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Uc)},persist:function(){},isPersistent:Uc}),t}var No={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kh=Ln(No),mu=ct({},No,{view:0,detail:0}),ZO=Ln(mu),Xh,Qh,gu,Hc=ct({},mu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==gu&&(gu&&e.type==="mousemove"?(Xh=e.screenX-gu.screenX,Qh=e.screenY-gu.screenY):Qh=Xh=0,gu=e),Xh)},movementY:function(e){return"movementY"in e?e.movementY:Qh}}),Xx=Ln(Hc),JO=ct({},Hc,{dataTransfer:0}),eD=Ln(JO),tD=ct({},mu,{relatedTarget:0}),Zh=Ln(tD),nD=ct({},No,{animationName:0,elapsedTime:0,pseudoElement:0}),rD=Ln(nD),iD=ct({},No,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),aD=Ln(iD),oD=ct({},No,{data:0}),Qx=Ln(oD),sD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uD={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"},lD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cD(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lD[e])?!!t[e]:!1}function Jh(){return cD}var dD=ct({},mu,{key:function(e){if(e.key){var t=sD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=jc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?uD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jh,charCode:function(e){return e.type==="keypress"?jc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?jc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),fD=Ln(dD),pD=ct({},Hc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zx=Ln(pD),hD=ct({},mu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jh}),mD=Ln(hD),gD=ct({},No,{propertyName:0,elapsedTime:0,pseudoElement:0}),yD=Ln(gD),vD=ct({},Hc,{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:0,deltaMode:0}),xD=Ln(vD),wD=[9,13,27,32],em=ti&&"CompositionEvent"in window,yu=null;ti&&"documentMode"in document&&(yu=document.documentMode);var bD=ti&&"TextEvent"in window&&!yu,Jx=ti&&(!em||yu&&8<yu&&11>=yu),ew=" ",tw=!1;function nw(e,t){switch(e){case"keyup":return wD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Po=!1;function ED(e,t){switch(e){case"compositionend":return rw(t);case"keypress":return t.which!==32?null:(tw=!0,ew);case"textInput":return e=t.data,e===ew&&tw?null:e;default:return null}}function TD(e,t){if(Po)return e==="compositionend"||!em&&nw(e,t)?(e=Gx(),Bc=Gh=Fi=null,Po=!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 Jx&&t.locale!=="ko"?null:t.data;default:return null}}var _D={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 iw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!_D[e.type]:t==="textarea"}function aw(e,t,n,r){Sx(r),t=Yc(t,"onChange"),0<t.length&&(n=new Kh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var vu=null,xu=null;function SD(e){Tw(e,0)}function zc(e){var t=Mo(e);if(px(t))return e}function CD(e,t){if(e==="change")return t}var ow=!1;if(ti){var tm;if(ti){var nm="oninput"in document;if(!nm){var sw=document.createElement("div");sw.setAttribute("oninput","return;"),nm=typeof sw.oninput=="function"}tm=nm}else tm=!1;ow=tm&&(!document.documentMode||9<document.documentMode)}function uw(){vu&&(vu.detachEvent("onpropertychange",lw),xu=vu=null)}function lw(e){if(e.propertyName==="value"&&zc(xu)){var t=[];aw(t,xu,e,Lh(e)),Rx(SD,t)}}function AD(e,t,n){e==="focusin"?(uw(),vu=t,xu=n,vu.attachEvent("onpropertychange",lw)):e==="focusout"&&uw()}function kD(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zc(xu)}function RD(e,t){if(e==="click")return zc(t)}function ND(e,t){if(e==="input"||e==="change")return zc(t)}function PD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gr=typeof Object.is=="function"?Object.is:PD;function wu(e,t){if(gr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ph.call(t,i)||!gr(e[i],t[i]))return!1}return!0}function cw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dw(e,t){var n=cw(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cw(n)}}function fw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pw(){for(var e=window,t=Sc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Sc(e.document)}return t}function rm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ID(e){var t=pw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fw(n.ownerDocument.documentElement,n)){if(r!==null&&rm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=dw(n,a);var o=dw(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var OD=ti&&"documentMode"in document&&11>=document.documentMode,Io=null,im=null,bu=null,am=!1;function hw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;am||Io==null||Io!==Sc(r)||(r=Io,"selectionStart"in r&&rm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),bu&&wu(bu,r)||(bu=r,r=Yc(im,"onSelect"),0<r.length&&(t=new Kh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Io)))}function Vc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Oo={animationend:Vc("Animation","AnimationEnd"),animationiteration:Vc("Animation","AnimationIteration"),animationstart:Vc("Animation","AnimationStart"),transitionend:Vc("Transition","TransitionEnd")},om={},mw={};ti&&(mw=document.createElement("div").style,"AnimationEvent"in window||(delete Oo.animationend.animation,delete Oo.animationiteration.animation,delete Oo.animationstart.animation),"TransitionEvent"in window||delete Oo.transitionend.transition);function $c(e){if(om[e])return om[e];if(!Oo[e])return e;var t=Oo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in mw)return om[e]=t[n];return e}var gw=$c("animationend"),yw=$c("animationiteration"),vw=$c("animationstart"),xw=$c("transitionend"),ww=new Map,bw="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Bi(e,t){ww.set(e,t),Da(t,[e])}for(var sm=0;sm<bw.length;sm++){var um=bw[sm],DD=um.toLowerCase(),LD=um[0].toUpperCase()+um.slice(1);Bi(DD,"on"+LD)}Bi(gw,"onAnimationEnd"),Bi(yw,"onAnimationIteration"),Bi(vw,"onAnimationStart"),Bi("dblclick","onDoubleClick"),Bi("focusin","onFocus"),Bi("focusout","onBlur"),Bi(xw,"onTransitionEnd"),To("onMouseEnter",["mouseout","mouseover"]),To("onMouseLeave",["mouseout","mouseover"]),To("onPointerEnter",["pointerout","pointerover"]),To("onPointerLeave",["pointerout","pointerover"]),Da("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Da("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Da("onBeforeInput",["compositionend","keypress","textInput","paste"]),Da("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Da("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Da("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Eu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),MD=new Set("cancel close invalid load scroll toggle".split(" ").concat(Eu));function Ew(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,DO(r,t,void 0,e),e.currentTarget=null}function Tw(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==a&&i.isPropagationStopped())break e;Ew(i,s,l),a=u}else for(o=0;o<r.length;o++){if(s=r[o],u=s.instance,l=s.currentTarget,s=s.listener,u!==a&&i.isPropagationStopped())break e;Ew(i,s,l),a=u}}}if(kc)throw e=jh,kc=!1,jh=null,e}function nt(e,t){var n=t[gm];n===void 0&&(n=t[gm]=new Set);var r=e+"__bubble";n.has(r)||(_w(t,e,2,!1),n.add(r))}function lm(e,t,n){var r=0;t&&(r|=4),_w(n,e,r,t)}var Wc="_reactListening"+Math.random().toString(36).slice(2);function Tu(e){if(!e[Wc]){e[Wc]=!0,ax.forEach(function(n){n!=="selectionchange"&&(MD.has(n)||lm(n,!1,e),lm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wc]||(t[Wc]=!0,lm("selectionchange",!1,t))}}function _w(e,t,n,r){switch(qx(t)){case 1:var i=XO;break;case 4:i=QO;break;default:i=Yh}n=i.bind(null,t,n,e),i=void 0,!Bh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function cm(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var u=o.tag;if((u===3||u===4)&&(u=o.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ma(s),o===null)return;if(u=o.tag,u===5||u===6){r=a=o;continue e}s=s.parentNode}}r=r.return}Rx(function(){var l=a,c=Lh(n),d=[];e:{var f=ww.get(e);if(f!==void 0){var p=Kh,m=e;switch(e){case"keypress":if(jc(n)===0)break e;case"keydown":case"keyup":p=fD;break;case"focusin":m="focus",p=Zh;break;case"focusout":m="blur",p=Zh;break;case"beforeblur":case"afterblur":p=Zh;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Xx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=eD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=mD;break;case gw:case yw:case vw:p=rD;break;case xw:p=yD;break;case"scroll":p=ZO;break;case"wheel":p=xD;break;case"copy":case"cut":case"paste":p=aD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Zx}var y=(t&4)!==0,w=!y&&e==="scroll",g=y?f!==null?f+"Capture":null:f;y=[];for(var x=l,b;x!==null;){b=x;var T=b.stateNode;if(b.tag===5&&T!==null&&(b=T,g!==null&&(T=au(x,g),T!=null&&y.push(_u(x,T,b)))),w)break;x=x.return}0<y.length&&(f=new p(f,m,null,n,c),d.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Dh&&(m=n.relatedTarget||n.fromElement)&&(Ma(m)||m[ri]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=l,m=m?Ma(m):null,m!==null&&(w=La(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=l),p!==m)){if(y=Xx,T="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(y=Zx,T="onPointerLeave",g="onPointerEnter",x="pointer"),w=p==null?f:Mo(p),b=m==null?f:Mo(m),f=new y(T,x+"leave",p,n,c),f.target=w,f.relatedTarget=b,T=null,Ma(c)===l&&(y=new y(g,x+"enter",m,n,c),y.target=b,y.relatedTarget=w,T=y),w=T,p&&m)t:{for(y=p,g=m,x=0,b=y;b;b=Do(b))x++;for(b=0,T=g;T;T=Do(T))b++;for(;0<x-b;)y=Do(y),x--;for(;0<b-x;)g=Do(g),b--;for(;x--;){if(y===g||g!==null&&y===g.alternate)break t;y=Do(y),g=Do(g)}y=null}else y=null;p!==null&&Sw(d,f,p,y,!1),m!==null&&w!==null&&Sw(d,w,m,y,!0)}}e:{if(f=l?Mo(l):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var S=CD;else if(iw(f))if(ow)S=ND;else{S=kD;var _=AD}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=RD);if(S&&(S=S(e,l))){aw(d,S,n,c);break e}_&&_(e,f,l),e==="focusout"&&(_=f._wrapperState)&&_.controlled&&f.type==="number"&&Rh(f,"number",f.value)}switch(_=l?Mo(l):window,e){case"focusin":(iw(_)||_.contentEditable==="true")&&(Io=_,im=l,bu=null);break;case"focusout":bu=im=Io=null;break;case"mousedown":am=!0;break;case"contextmenu":case"mouseup":case"dragend":am=!1,hw(d,n,c);break;case"selectionchange":if(OD)break;case"keydown":case"keyup":hw(d,n,c)}var N;if(em)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else Po?nw(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(Jx&&n.locale!=="ko"&&(Po||D!=="onCompositionStart"?D==="onCompositionEnd"&&Po&&(N=Gx()):(Fi=c,Gh="value"in Fi?Fi.value:Fi.textContent,Po=!0)),_=Yc(l,D),0<_.length&&(D=new Qx(D,e,null,n,c),d.push({event:D,listeners:_}),N?D.data=N:(N=rw(n),N!==null&&(D.data=N)))),(N=bD?ED(e,n):TD(e,n))&&(l=Yc(l,"onBeforeInput"),0<l.length&&(c=new Qx("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:l}),c.data=N))}Tw(d,t)})}function _u(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yc(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=au(e,n),a!=null&&r.unshift(_u(e,a,i)),a=au(e,t),a!=null&&r.push(_u(e,a,i))),e=e.return}return r}function Do(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Sw(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(u!==null&&u===r)break;s.tag===5&&l!==null&&(s=l,i?(u=au(n,a),u!=null&&o.unshift(_u(n,u,s))):i||(u=au(n,a),u!=null&&o.push(_u(n,u,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var FD=/\r\n?/g,BD=/\u0000|\uFFFD/g;function Cw(e){return(typeof e=="string"?e:""+e).replace(FD,`
38
38
  `).replace(BD,"")}function qc(e,t,n){if(t=Cw(t),Cw(e)!==t&&n)throw Error(Q(425))}function Gc(){}var dm=null,fm=null;function pm(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var hm=typeof setTimeout=="function"?setTimeout:void 0,jD=typeof clearTimeout=="function"?clearTimeout:void 0,Aw=typeof Promise=="function"?Promise:void 0,UD=typeof queueMicrotask=="function"?queueMicrotask:typeof Aw<"u"?function(e){return Aw.resolve(null).then(e).catch(HD)}:hm;function HD(e){setTimeout(function(){throw e})}function mm(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),hu(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);hu(t)}function ji(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function kw(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Lo=Math.random().toString(36).slice(2),Lr="__reactFiber$"+Lo,Su="__reactProps$"+Lo,ri="__reactContainer$"+Lo,gm="__reactEvents$"+Lo,zD="__reactListeners$"+Lo,VD="__reactHandles$"+Lo;function Ma(e){var t=e[Lr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ri]||n[Lr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=kw(e);e!==null;){if(n=e[Lr])return n;e=kw(e)}return t}e=n,n=e.parentNode}return null}function Cu(e){return e=e[Lr]||e[ri],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Mo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function Kc(e){return e[Su]||null}var ym=[],Fo=-1;function Ui(e){return{current:e}}function rt(e){0>Fo||(e.current=ym[Fo],ym[Fo]=null,Fo--)}function et(e,t){Fo++,ym[Fo]=e.current,e.current=t}var Hi={},Gt=Ui(Hi),vn=Ui(!1),Fa=Hi;function Bo(e,t){var n=e.type.contextTypes;if(!n)return Hi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function xn(e){return e=e.childContextTypes,e!=null}function Xc(){rt(vn),rt(Gt)}function Rw(e,t,n){if(Gt.current!==Hi)throw Error(Q(168));et(Gt,t),et(vn,n)}function Nw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Q(108,AO(e)||"Unknown",i));return ct({},n,r)}function Qc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hi,Fa=Gt.current,et(Gt,e),et(vn,vn.current),!0}function Pw(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=Nw(e,t,Fa),r.__reactInternalMemoizedMergedChildContext=e,rt(vn),rt(Gt),et(Gt,e)):rt(vn),et(vn,n)}var ii=null,Zc=!1,vm=!1;function Iw(e){ii===null?ii=[e]:ii.push(e)}function $D(e){Zc=!0,Iw(e)}function zi(){if(!vm&&ii!==null){vm=!0;var e=0,t=qe;try{var n=ii;for(qe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ii=null,Zc=!1}catch(i){throw ii!==null&&(ii=ii.slice(e+1)),Dx(Uh,zi),i}finally{qe=t,vm=!1}}return null}var jo=[],Uo=0,Jc=null,ed=0,Xn=[],Qn=0,Ba=null,ai=1,oi="";function ja(e,t){jo[Uo++]=ed,jo[Uo++]=Jc,Jc=e,ed=t}function Ow(e,t,n){Xn[Qn++]=ai,Xn[Qn++]=oi,Xn[Qn++]=Ba,Ba=e;var r=ai;e=oi;var i=32-mr(r)-1;r&=~(1<<i),n+=1;var a=32-mr(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ai=1<<32-mr(t)+i|n<<i|r,oi=a+e}else ai=1<<a|n<<i|r,oi=e}function xm(e){e.return!==null&&(ja(e,1),Ow(e,1,0))}function wm(e){for(;e===Jc;)Jc=jo[--Uo],jo[Uo]=null,ed=jo[--Uo],jo[Uo]=null;for(;e===Ba;)Ba=Xn[--Qn],Xn[Qn]=null,oi=Xn[--Qn],Xn[Qn]=null,ai=Xn[--Qn],Xn[Qn]=null}var Mn=null,Fn=null,ot=!1,yr=null;function Dw(e,t){var n=tr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Lw(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Mn=e,Fn=ji(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Mn=e,Fn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ba!==null?{id:ai,overflow:oi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=tr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Mn=e,Fn=null,!0):!1;default:return!1}}function bm(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Em(e){if(ot){var t=Fn;if(t){var n=t;if(!Lw(e,t)){if(bm(e))throw Error(Q(418));t=ji(n.nextSibling);var r=Mn;t&&Lw(e,t)?Dw(r,n):(e.flags=e.flags&-4097|2,ot=!1,Mn=e)}}else{if(bm(e))throw Error(Q(418));e.flags=e.flags&-4097|2,ot=!1,Mn=e}}}function Mw(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mn=e}function td(e){if(e!==Mn)return!1;if(!ot)return Mw(e),ot=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!pm(e.type,e.memoizedProps)),t&&(t=Fn)){if(bm(e))throw Fw(),Error(Q(418));for(;t;)Dw(e,t),t=ji(t.nextSibling)}if(Mw(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Fn=ji(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Fn=null}}else Fn=Mn?ji(e.stateNode.nextSibling):null;return!0}function Fw(){for(var e=Fn;e;)e=ji(e.nextSibling)}function Ho(){Fn=Mn=null,ot=!1}function Tm(e){yr===null?yr=[e]:yr.push(e)}var WD=ni.ReactCurrentBatchConfig;function Au(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Q(309));var r=n.stateNode}if(!r)throw Error(Q(147,e));var i=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var s=i.refs;o===null?delete s[a]:s[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(Q(284));if(!n._owner)throw Error(Q(290,e))}return e}function nd(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Bw(e){var t=e._init;return t(e._payload)}function jw(e){function t(g,x){if(e){var b=g.deletions;b===null?(g.deletions=[x],g.flags|=16):b.push(x)}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function i(g,x){return g=Xi(g,x),g.index=0,g.sibling=null,g}function a(g,x,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<x?(g.flags|=2,x):b):(g.flags|=2,x)):(g.flags|=1048576,x)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function s(g,x,b,T){return x===null||x.tag!==6?(x=hg(b,g.mode,T),x.return=g,x):(x=i(x,b),x.return=g,x)}function u(g,x,b,T){var S=b.type;return S===So?c(g,x,b.props.children,T,b.key):x!==null&&(x.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Pi&&Bw(S)===x.type)?(T=i(x,b.props),T.ref=Au(g,x,b),T.return=g,T):(T=Cd(b.type,b.key,b.props,null,g.mode,T),T.ref=Au(g,x,b),T.return=g,T)}function l(g,x,b,T){return x===null||x.tag!==4||x.stateNode.containerInfo!==b.containerInfo||x.stateNode.implementation!==b.implementation?(x=mg(b,g.mode,T),x.return=g,x):(x=i(x,b.children||[]),x.return=g,x)}function c(g,x,b,T,S){return x===null||x.tag!==7?(x=qa(b,g.mode,T,S),x.return=g,x):(x=i(x,b),x.return=g,x)}function d(g,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return x=hg(""+x,g.mode,b),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Tc:return b=Cd(x.type,x.key,x.props,null,g.mode,b),b.ref=Au(g,null,x),b.return=g,b;case _o:return x=mg(x,g.mode,b),x.return=g,x;case Pi:var T=x._init;return d(g,T(x._payload),b)}if(nu(x)||eu(x))return x=qa(x,g.mode,b,null),x.return=g,x;nd(g,x)}return null}function f(g,x,b,T){var S=x!==null?x.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return S!==null?null:s(g,x,""+b,T);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Tc:return b.key===S?u(g,x,b,T):null;case _o:return b.key===S?l(g,x,b,T):null;case Pi:return S=b._init,f(g,x,S(b._payload),T)}if(nu(b)||eu(b))return S!==null?null:c(g,x,b,T,null);nd(g,b)}return null}function p(g,x,b,T,S){if(typeof T=="string"&&T!==""||typeof T=="number")return g=g.get(b)||null,s(x,g,""+T,S);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Tc:return g=g.get(T.key===null?b:T.key)||null,u(x,g,T,S);case _o:return g=g.get(T.key===null?b:T.key)||null,l(x,g,T,S);case Pi:var _=T._init;return p(g,x,b,_(T._payload),S)}if(nu(T)||eu(T))return g=g.get(b)||null,c(x,g,T,S,null);nd(x,T)}return null}function m(g,x,b,T){for(var S=null,_=null,N=x,D=x=0,V=null;N!==null&&D<b.length;D++){N.index>D?(V=N,N=null):V=N.sibling;var P=f(g,N,b[D],T);if(P===null){N===null&&(N=V);break}e&&N&&P.alternate===null&&t(g,N),x=a(P,x,D),_===null?S=P:_.sibling=P,_=P,N=V}if(D===b.length)return n(g,N),ot&&ja(g,D),S;if(N===null){for(;D<b.length;D++)N=d(g,b[D],T),N!==null&&(x=a(N,x,D),_===null?S=N:_.sibling=N,_=N);return ot&&ja(g,D),S}for(N=r(g,N);D<b.length;D++)V=p(N,g,D,b[D],T),V!==null&&(e&&V.alternate!==null&&N.delete(V.key===null?D:V.key),x=a(V,x,D),_===null?S=V:_.sibling=V,_=V);return e&&N.forEach(function($){return t(g,$)}),ot&&ja(g,D),S}function y(g,x,b,T){var S=eu(b);if(typeof S!="function")throw Error(Q(150));if(b=S.call(b),b==null)throw Error(Q(151));for(var _=S=null,N=x,D=x=0,V=null,P=b.next();N!==null&&!P.done;D++,P=b.next()){N.index>D?(V=N,N=null):V=N.sibling;var $=f(g,N,P.value,T);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(g,N),x=a($,x,D),_===null?S=$:_.sibling=$,_=$,N=V}if(P.done)return n(g,N),ot&&ja(g,D),S;if(N===null){for(;!P.done;D++,P=b.next())P=d(g,P.value,T),P!==null&&(x=a(P,x,D),_===null?S=P:_.sibling=P,_=P);return ot&&ja(g,D),S}for(N=r(g,N);!P.done;D++,P=b.next())P=p(N,g,D,P.value,T),P!==null&&(e&&P.alternate!==null&&N.delete(P.key===null?D:P.key),x=a(P,x,D),_===null?S=P:_.sibling=P,_=P);return e&&N.forEach(function(H){return t(g,H)}),ot&&ja(g,D),S}function w(g,x,b,T){if(typeof b=="object"&&b!==null&&b.type===So&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Tc:e:{for(var S=b.key,_=x;_!==null;){if(_.key===S){if(S=b.type,S===So){if(_.tag===7){n(g,_.sibling),x=i(_,b.props.children),x.return=g,g=x;break e}}else if(_.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Pi&&Bw(S)===_.type){n(g,_.sibling),x=i(_,b.props),x.ref=Au(g,_,b),x.return=g,g=x;break e}n(g,_);break}else t(g,_);_=_.sibling}b.type===So?(x=qa(b.props.children,g.mode,T,b.key),x.return=g,g=x):(T=Cd(b.type,b.key,b.props,null,g.mode,T),T.ref=Au(g,x,b),T.return=g,g=T)}return o(g);case _o:e:{for(_=b.key;x!==null;){if(x.key===_)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){n(g,x.sibling),x=i(x,b.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=mg(b,g.mode,T),x.return=g,g=x}return o(g);case Pi:return _=b._init,w(g,x,_(b._payload),T)}if(nu(b))return m(g,x,b,T);if(eu(b))return y(g,x,b,T);nd(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(n(g,x.sibling),x=i(x,b),x.return=g,g=x):(n(g,x),x=hg(b,g.mode,T),x.return=g,g=x),o(g)):n(g,x)}return w}var zo=jw(!0),Uw=jw(!1),rd=Ui(null),id=null,Vo=null,_m=null;function Sm(){_m=Vo=id=null}function Cm(e){var t=rd.current;rt(rd),e._currentValue=t}function Am(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function $o(e,t){id=e,_m=Vo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(wn=!0),e.firstContext=null)}function Zn(e){var t=e._currentValue;if(_m!==e)if(e={context:e,memoizedValue:t,next:null},Vo===null){if(id===null)throw Error(Q(308));Vo=e,id.dependencies={lanes:0,firstContext:e}}else Vo=Vo.next=e;return t}var Ua=null;function km(e){Ua===null?Ua=[e]:Ua.push(e)}function Hw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,km(t)):(n.next=i.next,i.next=n),t.interleaved=n,si(e,r)}function si(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Vi=!1;function Rm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ui(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function $i(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ue&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,si(e,n)}return i=r.interleaved,i===null?(t.next=t,km(r)):(t.next=i.next,i.next=t),r.interleaved=t,si(e,n)}function ad(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vh(e,n)}}function Vw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function od(e,t,n,r){var i=e.updateQueue;Vi=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var u=s,l=u.next;u.next=null,o===null?a=l:o.next=l,o=u;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u))}if(a!==null){var d=i.baseState;o=0,c=l=u=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,y=s;switch(f=t,p=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=ct({},d,f);break e;case 2:Vi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(l=c=p,u=d):c=c.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(u=d),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Va|=o,e.lanes=o,e.memoizedState=d}}function $w(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Q(191,i));i.call(r)}}}var ku={},Mr=Ui(ku),Ru=Ui(ku),Nu=Ui(ku);function Ha(e){if(e===ku)throw Error(Q(174));return e}function Nm(e,t){switch(et(Nu,t),et(Ru,e),et(Mr,ku),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ph(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ph(t,e)}rt(Mr),et(Mr,t)}function Wo(){rt(Mr),rt(Ru),rt(Nu)}function Ww(e){Ha(Nu.current);var t=Ha(Mr.current),n=Ph(t,e.type);t!==n&&(et(Ru,e),et(Mr,n))}function Pm(e){Ru.current===e&&(rt(Mr),rt(Ru))}var dt=Ui(0);function sd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Im=[];function Om(){for(var e=0;e<Im.length;e++)Im[e]._workInProgressVersionPrimary=null;Im.length=0}var ud=ni.ReactCurrentDispatcher,Dm=ni.ReactCurrentBatchConfig,za=0,ft=null,Pt=null,Dt=null,ld=!1,Pu=!1,Iu=0,YD=0;function Kt(){throw Error(Q(321))}function Lm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gr(e[n],t[n]))return!1;return!0}function Mm(e,t,n,r,i,a){if(za=a,ft=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ud.current=e===null||e.memoizedState===null?XD:QD,e=n(r,i),Pu){a=0;do{if(Pu=!1,Iu=0,25<=a)throw Error(Q(301));a+=1,Dt=Pt=null,t.updateQueue=null,ud.current=ZD,e=n(r,i)}while(Pu)}if(ud.current=fd,t=Pt!==null&&Pt.next!==null,za=0,Dt=Pt=ft=null,ld=!1,t)throw Error(Q(300));return e}function Fm(){var e=Iu!==0;return Iu=0,e}function Fr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?ft.memoizedState=Dt=e:Dt=Dt.next=e,Dt}function Jn(){if(Pt===null){var e=ft.alternate;e=e!==null?e.memoizedState:null}else e=Pt.next;var t=Dt===null?ft.memoizedState:Dt.next;if(t!==null)Dt=t,Pt=e;else{if(e===null)throw Error(Q(310));Pt=e,e={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},Dt===null?ft.memoizedState=Dt=e:Dt=Dt.next=e}return Dt}function Ou(e,t){return typeof t=="function"?t(e):t}function Bm(e){var t=Jn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=Pt,i=r.baseQueue,a=n.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(i!==null){a=i.next,r=r.baseState;var s=o=null,u=null,l=a;do{var c=l.lane;if((za&c)===c)u!==null&&(u=u.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var d={lane:c,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};u===null?(s=u=d,o=r):u=u.next=d,ft.lanes|=c,Va|=c}l=l.next}while(l!==null&&l!==a);u===null?o=r:u.next=s,gr(r,t.memoizedState)||(wn=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do a=i.lane,ft.lanes|=a,Va|=a,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function jm(e){var t=Jn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);gr(a,t.memoizedState)||(wn=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Yw(){}function qw(e,t){var n=ft,r=Jn(),i=t(),a=!gr(r.memoizedState,i);if(a&&(r.memoizedState=i,wn=!0),r=r.queue,Um(Xw.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||Dt!==null&&Dt.memoizedState.tag&1){if(n.flags|=2048,Du(9,Kw.bind(null,n,r,i,t),void 0,null),Lt===null)throw Error(Q(349));za&30||Gw(n,t,i)}return i}function Gw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Kw(e,t,n,r){t.value=n,t.getSnapshot=r,Qw(t)&&Zw(e)}function Xw(e,t,n){return n(function(){Qw(t)&&Zw(e)})}function Qw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gr(e,n)}catch{return!0}}function Zw(e){var t=si(e,1);t!==null&&br(t,e,1,-1)}function Jw(e){var t=Fr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ou,lastRenderedState:e},t.queue=e,e=e.dispatch=KD.bind(null,ft,e),[t.memoizedState,e]}function Du(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function eb(){return Jn().memoizedState}function cd(e,t,n,r){var i=Fr();ft.flags|=e,i.memoizedState=Du(1|t,n,void 0,r===void 0?null:r)}function dd(e,t,n,r){var i=Jn();r=r===void 0?null:r;var a=void 0;if(Pt!==null){var o=Pt.memoizedState;if(a=o.destroy,r!==null&&Lm(r,o.deps)){i.memoizedState=Du(t,n,a,r);return}}ft.flags|=e,i.memoizedState=Du(1|t,n,a,r)}function tb(e,t){return cd(8390656,8,e,t)}function Um(e,t){return dd(2048,8,e,t)}function nb(e,t){return dd(4,2,e,t)}function rb(e,t){return dd(4,4,e,t)}function ib(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 ab(e,t,n){return n=n!=null?n.concat([e]):null,dd(4,4,ib.bind(null,t,e),n)}function Hm(){}function ob(e,t){var n=Jn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Lm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function sb(e,t){var n=Jn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Lm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ub(e,t,n){return za&21?(gr(n,t)||(n=Bx(),ft.lanes|=n,Va|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,wn=!0),e.memoizedState=n)}function qD(e,t){var n=qe;qe=n!==0&&4>n?n:4,e(!0);var r=Dm.transition;Dm.transition={};try{e(!1),t()}finally{qe=n,Dm.transition=r}}function lb(){return Jn().memoizedState}function GD(e,t,n){var r=Gi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cb(e))db(t,n);else if(n=Hw(e,t,n,r),n!==null){var i=fn();br(n,e,r,i),fb(n,t,r)}}function KD(e,t,n){var r=Gi(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cb(e))db(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,gr(s,o)){var u=t.interleaved;u===null?(i.next=i,km(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=Hw(e,t,i,r),n!==null&&(i=fn(),br(n,e,r,i),fb(n,t,r))}}function cb(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function db(e,t){Pu=ld=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fb(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vh(e,n)}}var fd={readContext:Zn,useCallback:Kt,useContext:Kt,useEffect:Kt,useImperativeHandle:Kt,useInsertionEffect:Kt,useLayoutEffect:Kt,useMemo:Kt,useReducer:Kt,useRef:Kt,useState:Kt,useDebugValue:Kt,useDeferredValue:Kt,useTransition:Kt,useMutableSource:Kt,useSyncExternalStore:Kt,useId:Kt,unstable_isNewReconciler:!1},XD={readContext:Zn,useCallback:function(e,t){return Fr().memoizedState=[e,t===void 0?null:t],e},useContext:Zn,useEffect:tb,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,cd(4194308,4,ib.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cd(4194308,4,e,t)},useInsertionEffect:function(e,t){return cd(4,2,e,t)},useMemo:function(e,t){var n=Fr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Fr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=GD.bind(null,ft,e),[r.memoizedState,e]},useRef:function(e){var t=Fr();return e={current:e},t.memoizedState=e},useState:Jw,useDebugValue:Hm,useDeferredValue:function(e){return Fr().memoizedState=e},useTransition:function(){var e=Jw(!1),t=e[0];return e=qD.bind(null,e[1]),Fr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ft,i=Fr();if(ot){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),Lt===null)throw Error(Q(349));za&30||Gw(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,tb(Xw.bind(null,r,a,e),[e]),r.flags|=2048,Du(9,Kw.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Fr(),t=Lt.identifierPrefix;if(ot){var n=oi,r=ai;n=(r&~(1<<32-mr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Iu++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=YD++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},QD={readContext:Zn,useCallback:ob,useContext:Zn,useEffect:Um,useImperativeHandle:ab,useInsertionEffect:nb,useLayoutEffect:rb,useMemo:sb,useReducer:Bm,useRef:eb,useState:function(){return Bm(Ou)},useDebugValue:Hm,useDeferredValue:function(e){var t=Jn();return ub(t,Pt.memoizedState,e)},useTransition:function(){var e=Bm(Ou)[0],t=Jn().memoizedState;return[e,t]},useMutableSource:Yw,useSyncExternalStore:qw,useId:lb,unstable_isNewReconciler:!1},ZD={readContext:Zn,useCallback:ob,useContext:Zn,useEffect:Um,useImperativeHandle:ab,useInsertionEffect:nb,useLayoutEffect:rb,useMemo:sb,useReducer:jm,useRef:eb,useState:function(){return jm(Ou)},useDebugValue:Hm,useDeferredValue:function(e){var t=Jn();return Pt===null?t.memoizedState=e:ub(t,Pt.memoizedState,e)},useTransition:function(){var e=jm(Ou)[0],t=Jn().memoizedState;return[e,t]},useMutableSource:Yw,useSyncExternalStore:qw,useId:lb,unstable_isNewReconciler:!1};function vr(e,t){if(e&&e.defaultProps){t=ct({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function zm(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ct({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var pd={isMounted:function(e){return(e=e._reactInternals)?La(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fn(),i=Gi(e),a=ui(r,i);a.payload=t,n!=null&&(a.callback=n),t=$i(e,a,i),t!==null&&(br(t,e,i,r),ad(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fn(),i=Gi(e),a=ui(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=$i(e,a,i),t!==null&&(br(t,e,i,r),ad(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fn(),r=Gi(e),i=ui(n,r);i.tag=2,t!=null&&(i.callback=t),t=$i(e,i,r),t!==null&&(br(t,e,r,n),ad(t,e,r))}};function pb(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!wu(n,r)||!wu(i,a):!0}function hb(e,t,n){var r=!1,i=Hi,a=t.contextType;return typeof a=="object"&&a!==null?a=Zn(a):(i=xn(t)?Fa:Gt.current,r=t.contextTypes,a=(r=r!=null)?Bo(e,i):Hi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=pd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function mb(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&pd.enqueueReplaceState(t,t.state,null)}function Vm(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Rm(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=Zn(a):(a=xn(t)?Fa:Gt.current,i.context=Bo(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(zm(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&pd.enqueueReplaceState(i,i.state,null),od(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Yo(e,t){try{var n="",r=t;do n+=CO(r),r=r.return;while(r);var i=n}catch(a){i=`
39
39
  Error generating stack: `+a.message+`
40
- `+a.stack}return{value:e,source:t,stack:i,digest:null}}function $m(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Wm(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var JD=typeof WeakMap=="function"?WeakMap:Map;function gb(e,t,n){n=ui(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){wd||(wd=!0,og=r),Wm(e,t)},n}function yb(e,t,n){n=ui(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Wm(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){Wm(e,t),typeof r!="function"&&(Yi===null?Yi=new Set([this]):Yi.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function vb(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new JD;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=p6.bind(null,e,t,n),t.then(e,e))}function xb(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function wb(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ui(-1,1),t.tag=2,$i(n,t,1))),n.lanes|=1),e)}var e6=ni.ReactCurrentOwner,wn=!1;function dn(e,t,n,r){t.child=e===null?Uw(t,null,n,r):zo(t,e.child,n,r)}function bb(e,t,n,r,i){n=n.render;var a=t.ref;return $o(t,i),r=Mm(e,t,n,r,a,i),n=Fm(),e!==null&&!wn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,li(e,t,i)):(ot&&n&&xm(t),t.flags|=1,dn(e,t,r,i),t.child)}function Eb(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!pg(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Tb(e,t,a,r,i)):(e=Cd(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:wu,n(o,r)&&e.ref===t.ref)return li(e,t,i)}return t.flags|=1,e=Xi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Tb(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(wu(a,r)&&e.ref===t.ref)if(wn=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(wn=!0);else return t.lanes=e.lanes,li(e,t,i)}return Ym(e,t,n,r,i)}function _b(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},et(Go,Bn),Bn|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,et(Go,Bn),Bn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,et(Go,Bn),Bn|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,et(Go,Bn),Bn|=r;return dn(e,t,i,n),t.child}function Sb(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ym(e,t,n,r,i){var a=xn(n)?Fa:Gt.current;return a=Bo(t,a),$o(t,i),n=Mm(e,t,n,r,a,i),r=Fm(),e!==null&&!wn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,li(e,t,i)):(ot&&r&&xm(t),t.flags|=1,dn(e,t,n,i),t.child)}function Cb(e,t,n,r,i){if(xn(n)){var a=!0;Qc(t)}else a=!1;if($o(t,i),t.stateNode===null)md(e,t),hb(t,n,r),Vm(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var u=o.context,l=n.contextType;typeof l=="object"&&l!==null?l=Zn(l):(l=xn(n)?Fa:Gt.current,l=Bo(t,l));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==r||u!==l)&&mb(t,o,r,l),Vi=!1;var f=t.memoizedState;o.state=f,od(t,r,o,i),u=t.memoizedState,s!==r||f!==u||vn.current||Vi?(typeof c=="function"&&(zm(t,n,c,r),u=t.memoizedState),(s=Vi||pb(t,n,s,r,f,u,l))?(d||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.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=l,r=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,zw(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:vr(t.type,s),o.props=l,d=t.pendingProps,f=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=Zn(u):(u=xn(n)?Fa:Gt.current,u=Bo(t,u));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==d||f!==u)&&mb(t,o,r,u),Vi=!1,f=t.memoizedState,o.state=f,od(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||vn.current||Vi?(typeof p=="function"&&(zm(t,n,p,r),m=t.memoizedState),(l=Vi||pb(t,n,l,r,f,m,u)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,u)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=u,r=l):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return qm(e,t,n,r,a,i)}function qm(e,t,n,r,i,a){Sb(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Pw(t,n,!1),li(e,t,a);r=t.stateNode,e6.current=t;var s=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=zo(t,e.child,null,a),t.child=zo(t,null,s,a)):dn(e,t,s,a),t.memoizedState=r.state,i&&Pw(t,n,!0),t.child}function Ab(e){var t=e.stateNode;t.pendingContext?Rw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Rw(e,t.context,!1),Nm(e,t.containerInfo)}function kb(e,t,n,r,i){return Ho(),Tm(i),t.flags|=256,dn(e,t,n,r),t.child}var Gm={dehydrated:null,treeContext:null,retryLane:0};function Km(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rb(e,t,n){var r=t.pendingProps,i=dt.current,a=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),et(dt,i&1),e===null)return Em(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:"hidden",children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Ad(o,r,0,null),e=qa(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Km(n),t.memoizedState=Gm,e):Xm(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return t6(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Xi(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=Xi(s,a):(a=qa(a,o,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?Km(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Gm,r}return a=e.child,e=a.sibling,r=Xi(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Xm(e,t){return t=Ad({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function hd(e,t,n,r){return r!==null&&Tm(r),zo(t,e.child,null,n),e=Xm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function t6(e,t,n,r,i,a,o){if(n)return t.flags&256?(t.flags&=-257,r=$m(Error(Q(422))),hd(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Ad({mode:"visible",children:r.children},i,0,null),a=qa(a,i,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&zo(t,e.child,null,o),t.child.memoizedState=Km(o),t.memoizedState=Gm,a);if(!(t.mode&1))return hd(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,a=Error(Q(419)),r=$m(a,r,void 0),hd(e,t,o,r)}if(s=(o&e.childLanes)!==0,wn||s){if(r=Lt,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,si(e,i),br(r,e,i,-1))}return fg(),r=$m(Error(Q(421))),hd(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=h6.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Fn=ji(i.nextSibling),Mn=t,ot=!0,yr=null,e!==null&&(Xn[Qn++]=ai,Xn[Qn++]=oi,Xn[Qn++]=Ba,ai=e.id,oi=e.overflow,Ba=t),t=Xm(t,r.children),t.flags|=4096,t)}function Nb(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Am(e.return,t,n)}function Qm(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Pb(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(dn(e,t,r.children,n),r=dt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nb(e,n,t);else if(e.tag===19)Nb(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(et(dt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&sd(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Qm(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&sd(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Qm(t,!0,n,null,a);break;case"together":Qm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function md(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function li(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Va|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=Xi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function n6(e,t,n){switch(t.tag){case 3:Ab(t),Ho();break;case 5:Ww(t);break;case 1:xn(t.type)&&Qc(t);break;case 4:Nm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;et(rd,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(et(dt,dt.current&1),t.flags|=128,null):n&t.child.childLanes?Rb(e,t,n):(et(dt,dt.current&1),e=li(e,t,n),e!==null?e.sibling:null);et(dt,dt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Pb(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),et(dt,dt.current),r)break;return null;case 22:case 23:return t.lanes=0,_b(e,t,n)}return li(e,t,n)}var Ib,Zm,Ob,Db;Ib=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Zm=function(){},Ob=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ha(Mr.current);var a=null;switch(n){case"input":i=Ah(e,i),r=Ah(e,r),a=[];break;case"select":i=ct({},i,{value:void 0}),r=ct({},r,{value:void 0}),a=[];break;case"textarea":i=Nh(e,i),r=Nh(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Gc)}Ih(n,r);var o;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Js.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in r){var u=r[l];if(s=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&u!==s&&(u!=null||s!=null))if(l==="style")if(s){for(o in s)!s.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&s[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(a||(a=[]),a.push(l,n)),n=u;else l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(a=a||[]).push(l,u)):l==="children"?typeof u!="string"&&typeof u!="number"||(a=a||[]).push(l,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(Js.hasOwnProperty(l)?(u!=null&&l==="onScroll"&&nt("scroll",e),a||s===u||(a=[])):(a=a||[]).push(l,u))}n&&(a=a||[]).push("style",n);var l=a;(t.updateQueue=l)&&(t.flags|=4)}},Db=function(e,t,n,r){n!==r&&(t.flags|=4)};function Lu(e,t){if(!ot)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function r6(e,t,n){var r=t.pendingProps;switch(wm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(t),null;case 1:return xn(t.type)&&Xc(),Xt(t),null;case 3:return r=t.stateNode,Wo(),rt(vn),rt(Gt),Om(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(td(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yr!==null&&(lg(yr),yr=null))),Zm(e,t),Xt(t),null;case 5:Pm(t);var i=Ha(Nu.current);if(n=t.type,e!==null&&t.stateNode!=null)Ob(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return Xt(t),null}if(e=Ha(Mr.current),td(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Lr]=t,r[Su]=a,e=(t.mode&1)!==0,n){case"dialog":nt("cancel",r),nt("close",r);break;case"iframe":case"object":case"embed":nt("load",r);break;case"video":case"audio":for(i=0;i<Eu.length;i++)nt(Eu[i],r);break;case"source":nt("error",r);break;case"img":case"image":case"link":nt("error",r),nt("load",r);break;case"details":nt("toggle",r);break;case"input":hx(r,a),nt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},nt("invalid",r);break;case"textarea":yx(r,a),nt("invalid",r)}Ih(n,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var s=a[o];o==="children"?typeof s=="string"?r.textContent!==s&&(a.suppressHydrationWarning!==!0&&qc(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&qc(r.textContent,s,e),i=["children",""+s]):Js.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&nt("scroll",r)}switch(n){case"input":_c(r),gx(r,a,!0);break;case"textarea":_c(r),xx(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Gc)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=wx(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Lr]=t,e[Su]=r,Ib(e,t,!1,!1),t.stateNode=e;e:{switch(o=Oh(n,r),n){case"dialog":nt("cancel",e),nt("close",e),i=r;break;case"iframe":case"object":case"embed":nt("load",e),i=r;break;case"video":case"audio":for(i=0;i<Eu.length;i++)nt(Eu[i],e);i=r;break;case"source":nt("error",e),i=r;break;case"img":case"image":case"link":nt("error",e),nt("load",e),i=r;break;case"details":nt("toggle",e),i=r;break;case"input":hx(e,r),i=Ah(e,r),nt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ct({},r,{value:void 0}),nt("invalid",e);break;case"textarea":yx(e,r),i=Nh(e,r),nt("invalid",e);break;default:i=r}Ih(n,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var u=s[a];a==="style"?Tx(e,u):a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&bx(e,u)):a==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&ru(e,u):typeof u=="number"&&ru(e,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Js.hasOwnProperty(a)?u!=null&&a==="onScroll"&&nt("scroll",e):u!=null&&gh(e,a,u,o))}switch(n){case"input":_c(e),gx(e,r,!1);break;case"textarea":_c(e),xx(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ii(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?Co(e,!!r.multiple,a,!1):r.defaultValue!=null&&Co(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Gc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Xt(t),null;case 6:if(e&&t.stateNode!=null)Db(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=Ha(Nu.current),Ha(Mr.current),td(t)){if(r=t.stateNode,n=t.memoizedProps,r[Lr]=t,(a=r.nodeValue!==n)&&(e=Mn,e!==null))switch(e.tag){case 3:qc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qc(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Lr]=t,t.stateNode=r}return Xt(t),null;case 13:if(rt(dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ot&&Fn!==null&&t.mode&1&&!(t.flags&128))Fw(),Ho(),t.flags|=98560,a=!1;else if(a=td(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(Q(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Q(317));a[Lr]=t}else Ho(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xt(t),a=!1}else yr!==null&&(lg(yr),yr=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||dt.current&1?It===0&&(It=3):fg())),t.updateQueue!==null&&(t.flags|=4),Xt(t),null);case 4:return Wo(),Zm(e,t),e===null&&Tu(t.stateNode.containerInfo),Xt(t),null;case 10:return Cm(t.type._context),Xt(t),null;case 17:return xn(t.type)&&Xc(),Xt(t),null;case 19:if(rt(dt),a=t.memoizedState,a===null)return Xt(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)Lu(a,!1);else{if(It!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=sd(e),o!==null){for(t.flags|=128,Lu(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return et(dt,dt.current&1|2),t.child}e=e.sibling}a.tail!==null&&Et()>Ko&&(t.flags|=128,r=!0,Lu(a,!1),t.lanes=4194304)}else{if(!r)if(e=sd(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Lu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!ot)return Xt(t),null}else 2*Et()-a.renderingStartTime>Ko&&n!==1073741824&&(t.flags|=128,r=!0,Lu(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Et(),t.sibling=null,n=dt.current,et(dt,r?n&1|2:n&1),t):(Xt(t),null);case 22:case 23:return dg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Bn&1073741824&&(Xt(t),t.subtreeFlags&6&&(t.flags|=8192)):Xt(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function i6(e,t){switch(wm(t),t.tag){case 1:return xn(t.type)&&Xc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wo(),rt(vn),rt(Gt),Om(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Pm(t),null;case 13:if(rt(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));Ho()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(dt),null;case 4:return Wo(),null;case 10:return Cm(t.type._context),null;case 22:case 23:return dg(),null;case 24:return null;default:return null}}var gd=!1,Qt=!1,a6=typeof WeakSet=="function"?WeakSet:Set,ue=null;function qo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){yt(e,t,r)}else n.current=null}function Jm(e,t,n){try{n()}catch(r){yt(e,t,r)}}var Lb=!1;function o6(e,t){if(dm=Mc,e=pw(),rm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,s=-1,u=-1,l=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=o+i),d!==a||r!==0&&d.nodeType!==3||(u=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++l===i&&(s=o),f===a&&++c===r&&(u=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(fm={focusedElem:e,selectionRange:n},Mc=!1,ue=t;ue!==null;)if(t=ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ue=e;else for(;ue!==null;){t=ue;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,w=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:vr(t.type,y),w);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(T){yt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,ue=e;break}ue=t.return}return m=Lb,Lb=!1,m}function Mu(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Jm(t,n,a)}i=i.next}while(i!==r)}}function yd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function eg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Mb(e){var t=e.alternate;t!==null&&(e.alternate=null,Mb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lr],delete t[Su],delete t[gm],delete t[zD],delete t[VD])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fb(e){return e.tag===5||e.tag===3||e.tag===4}function Bb(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gc));else if(r!==4&&(e=e.child,e!==null))for(tg(e,t,n),e=e.sibling;e!==null;)tg(e,t,n),e=e.sibling}function ng(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ng(e,t,n),e=e.sibling;e!==null;)ng(e,t,n),e=e.sibling}var zt=null,xr=!1;function Wi(e,t,n){for(n=n.child;n!==null;)jb(e,t,n),n=n.sibling}function jb(e,t,n){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(Nc,n)}catch{}switch(n.tag){case 5:Qt||qo(n,t);case 6:var r=zt,i=xr;zt=null,Wi(e,t,n),zt=r,xr=i,zt!==null&&(xr?(e=zt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):zt.removeChild(n.stateNode));break;case 18:zt!==null&&(xr?(e=zt,n=n.stateNode,e.nodeType===8?mm(e.parentNode,n):e.nodeType===1&&mm(e,n),hu(e)):mm(zt,n.stateNode));break;case 4:r=zt,i=xr,zt=n.stateNode.containerInfo,xr=!0,Wi(e,t,n),zt=r,xr=i;break;case 0:case 11:case 14:case 15:if(!Qt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Jm(n,t,o),i=i.next}while(i!==r)}Wi(e,t,n);break;case 1:if(!Qt&&(qo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){yt(n,t,s)}Wi(e,t,n);break;case 21:Wi(e,t,n);break;case 22:n.mode&1?(Qt=(r=Qt)||n.memoizedState!==null,Wi(e,t,n),Qt=r):Wi(e,t,n);break;default:Wi(e,t,n)}}function Ub(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new a6),t.forEach(function(r){var i=m6.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function wr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:zt=s.stateNode,xr=!1;break e;case 3:zt=s.stateNode.containerInfo,xr=!0;break e;case 4:zt=s.stateNode.containerInfo,xr=!0;break e}s=s.return}if(zt===null)throw Error(Q(160));jb(a,o,i),zt=null,xr=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(l){yt(i,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Hb(t,e),t=t.sibling}function Hb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wr(t,e),Br(e),r&4){try{Mu(3,e,e.return),yd(3,e)}catch(y){yt(e,e.return,y)}try{Mu(5,e,e.return)}catch(y){yt(e,e.return,y)}}break;case 1:wr(t,e),Br(e),r&512&&n!==null&&qo(n,n.return);break;case 5:if(wr(t,e),Br(e),r&512&&n!==null&&qo(n,n.return),e.flags&32){var i=e.stateNode;try{ru(i,"")}catch(y){yt(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&mx(i,a),Oh(s,o);var l=Oh(s,a);for(o=0;o<u.length;o+=2){var c=u[o],d=u[o+1];c==="style"?Tx(i,d):c==="dangerouslySetInnerHTML"?bx(i,d):c==="children"?ru(i,d):gh(i,c,d,l)}switch(s){case"input":kh(i,a);break;case"textarea":vx(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?Co(i,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?Co(i,!!a.multiple,a.defaultValue,!0):Co(i,!!a.multiple,a.multiple?[]:"",!1))}i[Su]=a}catch(y){yt(e,e.return,y)}}break;case 6:if(wr(t,e),Br(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(y){yt(e,e.return,y)}}break;case 3:if(wr(t,e),Br(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{hu(t.containerInfo)}catch(y){yt(e,e.return,y)}break;case 4:wr(t,e),Br(e);break;case 13:wr(t,e),Br(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(ag=Et())),r&4&&Ub(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Qt=(l=Qt)||c,wr(t,e),Qt=l):wr(t,e),Br(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!c&&e.mode&1)for(ue=e,c=e.child;c!==null;){for(d=ue=c;ue!==null;){switch(f=ue,p=f.child,f.tag){case 0:case 11:case 14:case 15:Mu(4,f,f.return);break;case 1:qo(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(y){yt(r,n,y)}}break;case 5:qo(f,f.return);break;case 22:if(f.memoizedState!==null){$b(d);continue}}p!==null?(p.return=f,ue=p):$b(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,l?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,u=d.memoizedProps.style,o=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Ex("display",o))}catch(y){yt(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(y){yt(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:wr(t,e),Br(e),r&4&&Ub(e);break;case 21:break;default:wr(t,e),Br(e)}}function Br(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fb(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ru(i,""),r.flags&=-33);var a=Bb(e);ng(e,a,i);break;case 3:case 4:var o=r.stateNode.containerInfo,s=Bb(e);tg(e,s,o);break;default:throw Error(Q(161))}}catch(u){yt(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function s6(e,t,n){ue=e,zb(e)}function zb(e,t,n){for(var r=(e.mode&1)!==0;ue!==null;){var i=ue,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||gd;if(!o){var s=i.alternate,u=s!==null&&s.memoizedState!==null||Qt;s=gd;var l=Qt;if(gd=o,(Qt=u)&&!l)for(ue=i;ue!==null;)o=ue,u=o.child,o.tag===22&&o.memoizedState!==null?Wb(i):u!==null?(u.return=o,ue=u):Wb(i);for(;a!==null;)ue=a,zb(a),a=a.sibling;ue=i,gd=s,Qt=l}Vb(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,ue=a):Vb(e)}}function Vb(e){for(;ue!==null;){var t=ue;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Qt||yd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Qt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:vr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&$w(t,a,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}$w(t,o,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var c=l.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&hu(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}Qt||t.flags&512&&eg(t)}catch(f){yt(t,t.return,f)}}if(t===e){ue=null;break}if(n=t.sibling,n!==null){n.return=t.return,ue=n;break}ue=t.return}}function $b(e){for(;ue!==null;){var t=ue;if(t===e){ue=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ue=n;break}ue=t.return}}function Wb(e){for(;ue!==null;){var t=ue;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{yd(4,t)}catch(u){yt(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){yt(t,i,u)}}var a=t.return;try{eg(t)}catch(u){yt(t,a,u)}break;case 5:var o=t.return;try{eg(t)}catch(u){yt(t,o,u)}}}catch(u){yt(t,t.return,u)}if(t===e){ue=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ue=s;break}ue=t.return}}var u6=Math.ceil,vd=ni.ReactCurrentDispatcher,rg=ni.ReactCurrentOwner,er=ni.ReactCurrentBatchConfig,Ue=0,Lt=null,At=null,Vt=0,Bn=0,Go=Ui(0),It=0,Fu=null,Va=0,xd=0,ig=0,Bu=null,bn=null,ag=0,Ko=1/0,ci=null,wd=!1,og=null,Yi=null,bd=!1,qi=null,Ed=0,ju=0,sg=null,Td=-1,_d=0;function fn(){return Ue&6?Et():Td!==-1?Td:Td=Et()}function Gi(e){return e.mode&1?Ue&2&&Vt!==0?Vt&-Vt:WD.transition!==null?(_d===0&&(_d=Bx()),_d):(e=qe,e!==0||(e=window.event,e=e===void 0?16:qx(e.type)),e):1}function br(e,t,n,r){if(50<ju)throw ju=0,sg=null,Error(Q(185));lu(e,n,r),(!(Ue&2)||e!==Lt)&&(e===Lt&&(!(Ue&2)&&(xd|=n),It===4&&Ki(e,Vt)),En(e,r),n===1&&Ue===0&&!(t.mode&1)&&(Ko=Et()+500,Zc&&zi()))}function En(e,t){var n=e.callbackNode;WO(e,t);var r=Oc(e,e===Lt?Vt:0);if(r===0)n!==null&&Lx(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Lx(n),t===1)e.tag===0?$D(qb.bind(null,e)):Iw(qb.bind(null,e)),UD(function(){!(Ue&6)&&zi()}),n=null;else{switch(jx(r)){case 1:n=Uh;break;case 4:n=Mx;break;case 16:n=Rc;break;case 536870912:n=Fx;break;default:n=Rc}n=tE(n,Yb.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Yb(e,t){if(Td=-1,_d=0,Ue&6)throw Error(Q(327));var n=e.callbackNode;if(Xo()&&e.callbackNode!==n)return null;var r=Oc(e,e===Lt?Vt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Sd(e,r);else{t=r;var i=Ue;Ue|=2;var a=Kb();(Lt!==e||Vt!==t)&&(ci=null,Ko=Et()+500,Wa(e,t));do try{d6();break}catch(s){Gb(e,s)}while(!0);Sm(),vd.current=a,Ue=i,At!==null?t=0:(Lt=null,Vt=0,t=It)}if(t!==0){if(t===2&&(i=Hh(e),i!==0&&(r=i,t=ug(e,i))),t===1)throw n=Fu,Wa(e,0),Ki(e,r),En(e,Et()),n;if(t===6)Ki(e,r);else{if(i=e.current.alternate,!(r&30)&&!l6(i)&&(t=Sd(e,r),t===2&&(a=Hh(e),a!==0&&(r=a,t=ug(e,a))),t===1))throw n=Fu,Wa(e,0),Ki(e,r),En(e,Et()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:Ya(e,bn,ci);break;case 3:if(Ki(e,r),(r&130023424)===r&&(t=ag+500-Et(),10<t)){if(Oc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){fn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=hm(Ya.bind(null,e,bn,ci),t);break}Ya(e,bn,ci);break;case 4:if(Ki(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-mr(r);a=1<<o,o=t[o],o>i&&(i=o),r&=~a}if(r=i,r=Et()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*u6(r/1960))-r,10<r){e.timeoutHandle=hm(Ya.bind(null,e,bn,ci),r);break}Ya(e,bn,ci);break;case 5:Ya(e,bn,ci);break;default:throw Error(Q(329))}}}return En(e,Et()),e.callbackNode===n?Yb.bind(null,e):null}function ug(e,t){var n=Bu;return e.current.memoizedState.isDehydrated&&(Wa(e,t).flags|=256),e=Sd(e,t),e!==2&&(t=bn,bn=n,t!==null&&lg(t)),e}function lg(e){bn===null?bn=e:bn.push.apply(bn,e)}function l6(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!gr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ki(e,t){for(t&=~ig,t&=~xd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-mr(t),r=1<<n;e[n]=-1,t&=~r}}function qb(e){if(Ue&6)throw Error(Q(327));Xo();var t=Oc(e,0);if(!(t&1))return En(e,Et()),null;var n=Sd(e,t);if(e.tag!==0&&n===2){var r=Hh(e);r!==0&&(t=r,n=ug(e,r))}if(n===1)throw n=Fu,Wa(e,0),Ki(e,t),En(e,Et()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ya(e,bn,ci),En(e,Et()),null}function cg(e,t){var n=Ue;Ue|=1;try{return e(t)}finally{Ue=n,Ue===0&&(Ko=Et()+500,Zc&&zi())}}function $a(e){qi!==null&&qi.tag===0&&!(Ue&6)&&Xo();var t=Ue;Ue|=1;var n=er.transition,r=qe;try{if(er.transition=null,qe=1,e)return e()}finally{qe=r,er.transition=n,Ue=t,!(Ue&6)&&zi()}}function dg(){Bn=Go.current,rt(Go)}function Wa(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,jD(n)),At!==null)for(n=At.return;n!==null;){var r=n;switch(wm(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xc();break;case 3:Wo(),rt(vn),rt(Gt),Om();break;case 5:Pm(r);break;case 4:Wo();break;case 13:rt(dt);break;case 19:rt(dt);break;case 10:Cm(r.type._context);break;case 22:case 23:dg()}n=n.return}if(Lt=e,At=e=Xi(e.current,null),Vt=Bn=t,It=0,Fu=null,ig=xd=Va=0,bn=Bu=null,Ua!==null){for(t=0;t<Ua.length;t++)if(n=Ua[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}Ua=null}return e}function Gb(e,t){do{var n=At;try{if(Sm(),ud.current=fd,ld){for(var r=ft.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ld=!1}if(za=0,Dt=Pt=ft=null,Pu=!1,Iu=0,rg.current=null,n===null||n.return===null){It=1,Fu=t,At=null;break}e:{var a=e,o=n.return,s=n,u=t;if(t=Vt,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var l=u,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=xb(o);if(p!==null){p.flags&=-257,wb(p,o,s,a,t),p.mode&1&&vb(a,l,t),t=p,u=l;var m=t.updateQueue;if(m===null){var y=new Set;y.add(u),t.updateQueue=y}else m.add(u);break e}else{if(!(t&1)){vb(a,l,t),fg();break e}u=Error(Q(426))}}else if(ot&&s.mode&1){var w=xb(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),wb(w,o,s,a,t),Tm(Yo(u,s));break e}}a=u=Yo(u,s),It!==4&&(It=2),Bu===null?Bu=[a]:Bu.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var g=gb(a,u,t);Vw(a,g);break e;case 1:s=u;var x=a.type,b=a.stateNode;if(!(a.flags&128)&&(typeof x.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Yi===null||!Yi.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t;var T=yb(a,s,t);Vw(a,T);break e}}a=a.return}while(a!==null)}Qb(n)}catch(S){t=S,At===n&&n!==null&&(At=n=n.return);continue}break}while(!0)}function Kb(){var e=vd.current;return vd.current=fd,e===null?fd:e}function fg(){(It===0||It===3||It===2)&&(It=4),Lt===null||!(Va&268435455)&&!(xd&268435455)||Ki(Lt,Vt)}function Sd(e,t){var n=Ue;Ue|=2;var r=Kb();(Lt!==e||Vt!==t)&&(ci=null,Wa(e,t));do try{c6();break}catch(i){Gb(e,i)}while(!0);if(Sm(),Ue=n,vd.current=r,At!==null)throw Error(Q(261));return Lt=null,Vt=0,It}function c6(){for(;At!==null;)Xb(At)}function d6(){for(;At!==null&&!MO();)Xb(At)}function Xb(e){var t=eE(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,t===null?Qb(e):At=t,rg.current=null}function Qb(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=i6(n,t),n!==null){n.flags&=32767,At=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{It=6,At=null;return}}else if(n=r6(n,t,Bn),n!==null){At=n;return}if(t=t.sibling,t!==null){At=t;return}At=t=e}while(t!==null);It===0&&(It=5)}function Ya(e,t,n){var r=qe,i=er.transition;try{er.transition=null,qe=1,f6(e,t,n,r)}finally{er.transition=i,qe=r}return null}function f6(e,t,n,r){do Xo();while(qi!==null);if(Ue&6)throw Error(Q(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Q(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(YO(e,a),e===Lt&&(At=Lt=null,Vt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||bd||(bd=!0,tE(Rc,function(){return Xo(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=er.transition,er.transition=null;var o=qe;qe=1;var s=Ue;Ue|=4,rg.current=null,o6(e,n),Hb(n,e),ID(fm),Mc=!!dm,fm=dm=null,e.current=n,s6(n),FO(),Ue=s,qe=o,er.transition=a}else e.current=n;if(bd&&(bd=!1,qi=e,Ed=i),a=e.pendingLanes,a===0&&(Yi=null),UO(n.stateNode),En(e,Et()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(wd)throw wd=!1,e=og,og=null,e;return Ed&1&&e.tag!==0&&Xo(),a=e.pendingLanes,a&1?e===sg?ju++:(ju=0,sg=e):ju=0,zi(),null}function Xo(){if(qi!==null){var e=jx(Ed),t=er.transition,n=qe;try{if(er.transition=null,qe=16>e?16:e,qi===null)var r=!1;else{if(e=qi,qi=null,Ed=0,Ue&6)throw Error(Q(331));var i=Ue;for(Ue|=4,ue=e.current;ue!==null;){var a=ue,o=a.child;if(ue.flags&16){var s=a.deletions;if(s!==null){for(var u=0;u<s.length;u++){var l=s[u];for(ue=l;ue!==null;){var c=ue;switch(c.tag){case 0:case 11:case 15:Mu(8,c,a)}var d=c.child;if(d!==null)d.return=c,ue=d;else for(;ue!==null;){c=ue;var f=c.sibling,p=c.return;if(Mb(c),c===l){ue=null;break}if(f!==null){f.return=p,ue=f;break}ue=p}}}var m=a.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var w=y.sibling;y.sibling=null,y=w}while(y!==null)}}ue=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,ue=o;else e:for(;ue!==null;){if(a=ue,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Mu(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,ue=g;break e}ue=a.return}}var x=e.current;for(ue=x;ue!==null;){o=ue;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,ue=b;else e:for(o=x;ue!==null;){if(s=ue,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:yd(9,s)}}catch(S){yt(s,s.return,S)}if(s===o){ue=null;break e}var T=s.sibling;if(T!==null){T.return=s.return,ue=T;break e}ue=s.return}}if(Ue=i,zi(),Dr&&typeof Dr.onPostCommitFiberRoot=="function")try{Dr.onPostCommitFiberRoot(Nc,e)}catch{}r=!0}return r}finally{qe=n,er.transition=t}}return!1}function Zb(e,t,n){t=Yo(n,t),t=gb(e,t,1),e=$i(e,t,1),t=fn(),e!==null&&(lu(e,1,t),En(e,t))}function yt(e,t,n){if(e.tag===3)Zb(e,e,n);else for(;t!==null;){if(t.tag===3){Zb(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yi===null||!Yi.has(r))){e=Yo(n,e),e=yb(t,e,1),t=$i(t,e,1),e=fn(),t!==null&&(lu(t,1,e),En(t,e));break}}t=t.return}}function p6(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=fn(),e.pingedLanes|=e.suspendedLanes&n,Lt===e&&(Vt&n)===n&&(It===4||It===3&&(Vt&130023424)===Vt&&500>Et()-ag?Wa(e,0):ig|=n),En(e,t)}function Jb(e,t){t===0&&(e.mode&1?(t=Ic,Ic<<=1,!(Ic&130023424)&&(Ic=4194304)):t=1);var n=fn();e=si(e,t),e!==null&&(lu(e,t,n),En(e,n))}function h6(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jb(e,n)}function m6(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(t),Jb(e,n)}var eE;eE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||vn.current)wn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return wn=!1,n6(e,t,n);wn=!!(e.flags&131072)}else wn=!1,ot&&t.flags&1048576&&Ow(t,ed,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;md(e,t),e=t.pendingProps;var i=Bo(t,Gt.current);$o(t,n),i=Mm(null,t,r,e,i,n);var a=Fm();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xn(r)?(a=!0,Qc(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Rm(t),i.updater=pd,t.stateNode=i,i._reactInternals=t,Vm(t,r,e,n),t=qm(null,t,r,!0,a,n)):(t.tag=0,ot&&a&&xm(t),dn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(md(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=y6(r),e=vr(r,e),i){case 0:t=Ym(null,t,r,e,n);break e;case 1:t=Cb(null,t,r,e,n);break e;case 11:t=bb(null,t,r,e,n);break e;case 14:t=Eb(null,t,r,vr(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),Ym(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),Cb(e,t,r,i,n);case 3:e:{if(Ab(t),e===null)throw Error(Q(387));r=t.pendingProps,a=t.memoizedState,i=a.element,zw(e,t),od(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Yo(Error(Q(423)),t),t=kb(e,t,r,n,i);break e}else if(r!==i){i=Yo(Error(Q(424)),t),t=kb(e,t,r,n,i);break e}else for(Fn=ji(t.stateNode.containerInfo.firstChild),Mn=t,ot=!0,yr=null,n=Uw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ho(),r===i){t=li(e,t,n);break e}dn(e,t,r,n)}t=t.child}return t;case 5:return Ww(t),e===null&&Em(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,pm(r,i)?o=null:a!==null&&pm(r,a)&&(t.flags|=32),Sb(e,t),dn(e,t,o,n),t.child;case 6:return e===null&&Em(t),null;case 13:return Rb(e,t,n);case 4:return Nm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=zo(t,null,r,n):dn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),bb(e,t,r,i,n);case 7:return dn(e,t,t.pendingProps,n),t.child;case 8:return dn(e,t,t.pendingProps.children,n),t.child;case 12:return dn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,et(rd,r._currentValue),r._currentValue=o,a!==null)if(gr(a.value,o)){if(a.children===i.children&&!vn.current){t=li(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(a.tag===1){u=ui(-1,n&-n),u.tag=2;var l=a.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Am(a.return,n,t),s.lanes|=n;break}u=u.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Q(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Am(o,n,t),o=a.sibling}else o=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}dn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,$o(t,n),i=Zn(i),r=r(i),t.flags|=1,dn(e,t,r,n),t.child;case 14:return r=t.type,i=vr(r,t.pendingProps),i=vr(r.type,i),Eb(e,t,r,i,n);case 15:return Tb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),md(e,t),t.tag=1,xn(r)?(e=!0,Qc(t)):e=!1,$o(t,n),hb(t,r,i),Vm(t,r,i,n),qm(null,t,r,!0,e,n);case 19:return Pb(e,t,n);case 22:return _b(e,t,n)}throw Error(Q(156,t.tag))};function tE(e,t){return Dx(e,t)}function g6(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tr(e,t,n,r){return new g6(e,t,n,r)}function pg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function y6(e){if(typeof e=="function")return pg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xh)return 11;if(e===Eh)return 14}return 2}function Xi(e,t){var n=e.alternate;return n===null?(n=tr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Cd(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")pg(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case So:return qa(n.children,i,a,t);case yh:o=8,i|=8;break;case vh:return e=tr(12,n,t,i|2),e.elementType=vh,e.lanes=a,e;case wh:return e=tr(13,n,t,i),e.elementType=wh,e.lanes=a,e;case bh:return e=tr(19,n,t,i),e.elementType=bh,e.lanes=a,e;case cx:return Ad(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ux:o=10;break e;case lx:o=9;break e;case xh:o=11;break e;case Eh:o=14;break e;case Pi:o=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=tr(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function qa(e,t,n,r){return e=tr(7,e,r,t),e.lanes=n,e}function Ad(e,t,n,r){return e=tr(22,e,r,t),e.elementType=cx,e.lanes=n,e.stateNode={isHidden:!1},e}function hg(e,t,n){return e=tr(6,e,null,t),e.lanes=n,e}function mg(e,t,n){return t=tr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function v6(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zh(0),this.expirationTimes=zh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gg(e,t,n,r,i,a,o,s,u){return e=new v6(e,t,n,s,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=tr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rm(a),e}function x6(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_o,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function nE(e){if(!e)return Hi;e=e._reactInternals;e:{if(La(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(xn(n))return Nw(e,n,t)}return t}function rE(e,t,n,r,i,a,o,s,u){return e=gg(n,r,!0,e,i,a,o,s,u),e.context=nE(null),n=e.current,r=fn(),i=Gi(n),a=ui(r,i),a.callback=t??null,$i(n,a,i),e.current.lanes=i,lu(e,i,r),En(e,r),e}function kd(e,t,n,r){var i=t.current,a=fn(),o=Gi(i);return n=nE(n),t.context===null?t.context=n:t.pendingContext=n,t=ui(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=$i(i,t,o),e!==null&&(br(e,i,o,a),ad(e,i,o)),o}function Rd(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 iE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function yg(e,t){iE(e,t),(e=e.alternate)&&iE(e,t)}function w6(){return null}var aE=typeof reportError=="function"?reportError:function(e){console.error(e)};function vg(e){this._internalRoot=e}Nd.prototype.render=vg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));kd(e,t,null,null)},Nd.prototype.unmount=vg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$a(function(){kd(null,e,null,null)}),t[ri]=null}};function Nd(e){this._internalRoot=e}Nd.prototype.unstable_scheduleHydration=function(e){if(e){var t=zx();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mi.length&&t!==0&&t<Mi[n].priority;n++);Mi.splice(n,0,e),n===0&&Wx(e)}};function xg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Pd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function oE(){}function b6(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var l=Rd(o);a.call(l)}}var o=rE(t,r,e,0,null,!1,!1,"",oE);return e._reactRootContainer=o,e[ri]=o.current,Tu(e.nodeType===8?e.parentNode:e),$a(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=Rd(u);s.call(l)}}var u=gg(e,0,!1,null,null,!1,!1,"",oE);return e._reactRootContainer=u,e[ri]=u.current,Tu(e.nodeType===8?e.parentNode:e),$a(function(){kd(t,u,n,r)}),u}function Id(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var s=i;i=function(){var u=Rd(o);s.call(u)}}kd(t,o,e,i)}else o=b6(n,t,e,i,r);return Rd(o)}Ux=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=uu(t.pendingLanes);n!==0&&(Vh(t,n|1),En(t,Et()),!(Ue&6)&&(Ko=Et()+500,zi()))}break;case 13:$a(function(){var r=si(e,1);if(r!==null){var i=fn();br(r,e,1,i)}}),yg(e,1)}},$h=function(e){if(e.tag===13){var t=si(e,134217728);if(t!==null){var n=fn();br(t,e,134217728,n)}yg(e,134217728)}},Hx=function(e){if(e.tag===13){var t=Gi(e),n=si(e,t);if(n!==null){var r=fn();br(n,e,t,r)}yg(e,t)}},zx=function(){return qe},Vx=function(e,t){var n=qe;try{return qe=e,t()}finally{qe=n}},Mh=function(e,t,n){switch(t){case"input":if(kh(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Kc(r);if(!i)throw Error(Q(90));px(r),kh(r,i)}}}break;case"textarea":vx(e,n);break;case"select":t=n.value,t!=null&&Co(e,!!n.multiple,t,!1)}},Ax=cg,kx=$a;var E6={usingClientEntryPoint:!1,Events:[Cu,Mo,Kc,Sx,Cx,cg]},Uu={findFiberByHostInstance:Ma,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},T6={bundleType:Uu.bundleType,version:Uu.version,rendererPackageName:Uu.rendererPackageName,rendererConfig:Uu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ni.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ix(e),e===null?null:e.stateNode},findFiberByHostInstance:Uu.findFiberByHostInstance||w6,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Od=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Od.isDisabled&&Od.supportsFiber)try{Nc=Od.inject(T6),Dr=Od}catch{}}On.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=E6,On.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xg(t))throw Error(Q(200));return x6(e,t,null,n)},On.createRoot=function(e,t){if(!xg(e))throw Error(Q(299));var n=!1,r="",i=aE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=gg(e,1,!1,null,null,n,!1,r,i),e[ri]=t.current,Tu(e.nodeType===8?e.parentNode:e),new vg(t)},On.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=Ix(t),e=e===null?null:e.stateNode,e},On.flushSync=function(e){return $a(e)},On.hydrate=function(e,t,n){if(!Pd(t))throw Error(Q(200));return Id(null,e,t,!0,n)},On.hydrateRoot=function(e,t,n){if(!xg(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",o=aE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=rE(t,null,e,1,n??null,i,!1,a,o),e[ri]=t.current,Tu(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Nd(t)},On.render=function(e,t,n){if(!Pd(t))throw Error(Q(200));return Id(null,e,t,!1,n)},On.unmountComponentAtNode=function(e){if(!Pd(e))throw Error(Q(40));return e._reactRootContainer?($a(function(){Id(null,null,e,!1,function(){e._reactRootContainer=null,e[ri]=null})}),!0):!1},On.unstable_batchedUpdates=cg,On.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Pd(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Id(e,t,n,!1,r)},On.version="18.3.1-next-f1338f8080-20240426";function sE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sE)}catch(e){console.error(e)}}sE(),nx.exports=On;var Qo=nx.exports,uE,lE=Qo;uE=lE.createRoot,lE.hydrateRoot;const cE="3.0.25";function Dd(e){"@babel/helpers - typeof";return Dd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dd(e)}var _6=/^\s+/,S6=/\s+$/;function fe(e,t){if(e=e||"",t=t||{},e instanceof fe)return e;if(!(this instanceof fe))return new fe(e,t);var n=C6(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}fe.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,a,o,s;return n=t.r/255,r=t.g/255,i=t.b/255,n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*a+.7152*o+.0722*s},setAlpha:function(t){return this._a=gE(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=fE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=fE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=dE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=dE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return pE(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return N6(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(st(this._r,255)*100)+"%",g:Math.round(st(this._g,255)*100)+"%",b:Math.round(st(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(st(this._r,255)*100)+"%, "+Math.round(st(this._g,255)*100)+"%, "+Math.round(st(this._b,255)*100)+"%)":"rgba("+Math.round(st(this._r,255)*100)+"%, "+Math.round(st(this._g,255)*100)+"%, "+Math.round(st(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:z6[pE(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+hE(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=fe(t);r="#"+hE(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,a=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return a?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return fe(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(D6,arguments)},brighten:function(){return this._applyModification(L6,arguments)},darken:function(){return this._applyModification(M6,arguments)},desaturate:function(){return this._applyModification(P6,arguments)},saturate:function(){return this._applyModification(I6,arguments)},greyscale:function(){return this._applyModification(O6,arguments)},spin:function(){return this._applyModification(F6,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(U6,arguments)},complement:function(){return this._applyCombination(B6,arguments)},monochromatic:function(){return this._applyCombination(H6,arguments)},splitcomplement:function(){return this._applyCombination(j6,arguments)},triad:function(){return this._applyCombination(mE,[3])},tetrad:function(){return this._applyCombination(mE,[4])}},fe.fromRatio=function(e,t){if(Dd(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Hu(e[r]));e=n}return fe(e,t)};function C6(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,s=!1;return typeof e=="string"&&(e=Y6(e)),Dd(e)=="object"&&(di(e.r)&&di(e.g)&&di(e.b)?(t=A6(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):di(e.h)&&di(e.s)&&di(e.v)?(r=Hu(e.s),i=Hu(e.v),t=R6(e.h,r,i),o=!0,s="hsv"):di(e.h)&&di(e.s)&&di(e.l)&&(r=Hu(e.s),a=Hu(e.l),t=k6(e.h,r,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=gE(n),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function A6(e,t,n){return{r:st(e,255)*255,g:st(t,255)*255,b:st(n,255)*255}}function dE(e,t,n){e=st(e,255),t=st(t,255),n=st(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=(r+i)/2;if(r==i)a=o=0;else{var u=r-i;switch(o=s>.5?u/(2-r-i):u/(r+i),r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:o,l:s}}function k6(e,t,n){var r,i,a;e=st(e,360),t=st(t,100),n=st(n,100);function o(l,c,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?l+(c-l)*6*d:d<1/2?c:d<2/3?l+(c-l)*(2/3-d)*6:l}if(t===0)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=o(u,s,e+1/3),i=o(u,s,e),a=o(u,s,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function fE(e,t,n){e=st(e,255),t=st(t,255),n=st(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=r,u=r-i;if(o=r===0?0:u/r,r==i)a=0;else{switch(r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:o,v:s}}function R6(e,t,n){e=st(e,360)*6,t=st(t,100),n=st(n,100);var r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),u=r%6,l=[n,o,a,a,s,n][u],c=[s,n,n,o,a,a][u],d=[a,a,s,n,n,o][u];return{r:l*255,g:c*255,b:d*255}}function pE(e,t,n,r){var i=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function N6(e,t,n,r,i){var a=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(n).toString(16)),Er(yE(r))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function hE(e,t,n,r){var i=[Er(yE(r)),Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(n).toString(16))];return i.join("")}fe.equals=function(e,t){return!e||!t?!1:fe(e).toRgbString()==fe(t).toRgbString()},fe.random=function(){return fe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function P6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s-=t/100,n.s=Ld(n.s),fe(n)}function I6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s+=t/100,n.s=Ld(n.s),fe(n)}function O6(e){return fe(e).desaturate(100)}function D6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l+=t/100,n.l=Ld(n.l),fe(n)}function L6(e,t){t=t===0?0:t||10;var n=fe(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),fe(n)}function M6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l-=t/100,n.l=Ld(n.l),fe(n)}function F6(e,t){var n=fe(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,fe(n)}function B6(e){var t=fe(e).toHsl();return t.h=(t.h+180)%360,fe(t)}function mE(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=fe(e).toHsl(),r=[fe(e)],i=360/t,a=1;a<t;a++)r.push(fe({h:(n.h+a*i)%360,s:n.s,l:n.l}));return r}function j6(e){var t=fe(e).toHsl(),n=t.h;return[fe(e),fe({h:(n+72)%360,s:t.s,l:t.l}),fe({h:(n+216)%360,s:t.s,l:t.l})]}function U6(e,t,n){t=t||6,n=n||30;var r=fe(e).toHsl(),i=360/n,a=[fe(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(fe(r));return a}function H6(e,t){t=t||6;for(var n=fe(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(fe({h:r,s:i,v:a})),a=(a+s)%1;return o}fe.mix=function(e,t,n){n=n===0?0:n||50;var r=fe(e).toRgb(),i=fe(t).toRgb(),a=n/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return fe(o)},fe.readability=function(e,t){var n=fe(e),r=fe(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},fe.isReadable=function(e,t,n){var r=fe.readability(e,t),i,a;switch(a=!1,i=q6(n),i.level+i.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a},fe.mostReadable=function(e,t,n){var r=null,i=0,a,o,s,u;n=n||{},o=n.includeFallbackColors,s=n.level,u=n.size;for(var l=0;l<t.length;l++)a=fe.readability(e,t[l]),a>i&&(i=a,r=fe(t[l]));return fe.isReadable(e,r,{level:s,size:u})||!o?r:(n.includeFallbackColors=!1,fe.mostReadable(e,["#fff","#000"],n))};var wg=fe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},z6=fe.hexNames=V6(wg);function V6(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function gE(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function st(e,t){$6(e)&&(e="100%");var n=W6(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Ld(e){return Math.min(1,Math.max(0,e))}function jn(e){return parseInt(e,16)}function $6(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function W6(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Er(e){return e.length==1?"0"+e:""+e}function Hu(e){return e<=1&&(e=e*100+"%"),e}function yE(e){return Math.round(parseFloat(e)*255).toString(16)}function vE(e){return jn(e)/255}var Tr=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function di(e){return!!Tr.CSS_UNIT.exec(e)}function Y6(e){e=e.replace(_6,"").replace(S6,"").toLowerCase();var t=!1;if(wg[e])e=wg[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Tr.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Tr.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Tr.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Tr.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Tr.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Tr.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Tr.hex8.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),a:vE(n[4]),format:t?"name":"hex8"}:(n=Tr.hex6.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),format:t?"name":"hex"}:(n=Tr.hex4.exec(e))?{r:jn(n[1]+""+n[1]),g:jn(n[2]+""+n[2]),b:jn(n[3]+""+n[3]),a:vE(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Tr.hex3.exec(e))?{r:jn(n[1]+""+n[1]),g:jn(n[2]+""+n[2]),b:jn(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function q6(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const G6=350,xE=400,wE=600,bg={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},bE=({primary:e="hsl(0, 0%, 0%)"})=>{const t=fe(e).toHsl(),n=fe(e).isLight()?"240 10% 3.9%":"0 0% 100%";return{"--opencx-primary":`${t.h} ${t.s*100}% ${t.l*100}%`,"--opencx-primary-foreground":n,"--opencx-background":"0 0% 100%","--opencx-foreground":"240 10% 3.9%","--opencx-accent":"240 4.8% 95.9%","--opencx-accent-foreground":"240 5.9% 10%","--opencx-destructive":"0 84.2% 60.2%","--opencx-destructive-foreground":"0 0% 98%","--opencx-secondary":"240 4.8% 95.9%","--opencx-secondary-foreground":"240 5.9% 10%","--opencx-muted":"240 4.8% 95.9%","--opencx-muted-foreground":"240 3.8% 46.1%","--opencx-input":"240 5.9% 90%","--opencx-border":"240 5.9% 90%","--opencx-ring":"240 5.9% 10%"}};function K6(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function zu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Eg=e=>Array.isArray(e);function EE(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Vu(e){return typeof e=="string"||Array.isArray(e)}function TE(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Tg(e,t,n,r){if(typeof t=="function"){const[i,a]=TE(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=TE(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function Md(e,t,n){const r=e.getProps();return Tg(r,t,n!==void 0?n:r.custom,e)}const _g=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sg=["initial",..._g],$u=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qi=new Set($u),fi=e=>e*1e3,pi=e=>e/1e3,X6={type:"spring",stiffness:500,damping:25,restSpeed:10},Q6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Z6={type:"keyframes",duration:.8},J6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},eL=(e,{keyframes:t})=>t.length>2?Z6:Qi.has(e)?e.startsWith("scale")?Q6(t[1]):X6:J6;function Cg(e,t){return e?e[t]||e.default||e:void 0}const tL={skipAnimations:!1,useManualTiming:!1},nL=e=>e!==null;function Fd(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(nL),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const Zt=e=>e;function rL(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(l){a.has(l)&&(u.schedule(l),e()),l(o)}const u={schedule:(l,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&a.add(l),p.has(l)||p.add(l),l},cancel:l=>{n.delete(l),a.delete(l)},process:l=>{if(o=l,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,u.process(l))}};return u}const Bd=["read","resolveKeyframes","update","preRender","render","postRender"],iL=40;function _E(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Bd.reduce((g,x)=>(g[x]=rL(a),g),{}),{read:s,resolveKeyframes:u,update:l,preRender:c,render:d,postRender:f}=o,p=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,iL),1),i.timestamp=g,i.isProcessing=!0,s.process(i),u.process(i),l.process(i),c.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Bd.reduce((g,x)=>{const b=o[x];return g[x]=(T,S=!1,_=!1)=>(n||m(),b.schedule(T,S,_)),g},{}),cancel:g=>{for(let x=0;x<Bd.length;x++)o[Bd[x]].cancel(g)},state:i,steps:o}}const{schedule:Xe,cancel:Zi,state:$t,steps:Ag}=_E(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zt,!0),SE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,aL=1e-7,oL=12;function sL(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=SE(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>aL&&++s<oL);return o}function Wu(e,t,n,r){if(e===t&&n===r)return Zt;const i=a=>sL(a,0,1,e,n);return a=>a===0||a===1?a:SE(i(a),t,r)}const CE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,AE=e=>t=>1-e(1-t),kE=Wu(.33,1.53,.69,.99),kg=AE(kE),RE=CE(kg),NE=e=>(e*=2)<1?.5*kg(e):.5*(2-Math.pow(2,-10*(e-1))),Rg=e=>1-Math.sin(Math.acos(e)),PE=AE(Rg),IE=CE(Rg),OE=e=>/^0[^.\s]+$/u.test(e);function uL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||OE(e):!0}let Ng=Zt;const DE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),LE=e=>t=>typeof t=="string"&&t.startsWith(e),ME=LE("--"),lL=LE("var(--"),Pg=e=>lL(e)?cL.test(e.split("/*")[0].trim()):!1,cL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,dL=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function fL(e){const t=dL.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function FE(e,t,n=1){const[r,i]=fL(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return DE(o)?parseFloat(o):o}return Pg(i)?FE(i,t,n+1):i}const Ji=(e,t,n)=>n>t?t:n<e?e:n,Zo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Yu={...Zo,transform:e=>Ji(0,1,e)},jd={...Zo,default:1},qu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ea=qu("deg"),jr=qu("%"),ye=qu("px"),pL=qu("vh"),hL=qu("vw"),BE={...jr,parse:e=>jr.parse(e)/100,transform:e=>jr.transform(e*100)},mL=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),jE=e=>e===Zo||e===ye,UE=(e,t)=>parseFloat(e.split(", ")[t]),HE=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return UE(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?UE(a[1],e):0}},gL=new Set(["x","y","z"]),yL=$u.filter(e=>!gL.has(e));function vL(e){const t=[];return yL.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Jo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:HE(4,13),y:HE(5,14)};Jo.translateX=Jo.x,Jo.translateY=Jo.y;const zE=e=>t=>t.test(e),VE=[Zo,ye,jr,ea,hL,pL,{test:e=>e==="auto",parse:e=>e}],$E=e=>VE.find(zE(e)),Ga=new Set;let Ig=!1,Og=!1;function WE(){if(Og){const e=Array.from(Ga).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=vL(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,o])=>{var s;(s=r.getValue(a))===null||s===void 0||s.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Og=!1,Ig=!1,Ga.forEach(e=>e.complete()),Ga.clear()}function YE(){Ga.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Og=!0)})}function xL(){YE(),WE()}class Dg{constructor(t,n,r,i,a,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ga.add(this),Ig||(Ig=!0,Xe.read(YE),Xe.resolveKeyframes(WE))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){const o=i==null?void 0:i.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,s);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=s),i&&o===void 0&&i.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ga.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ga.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Gu=e=>Math.round(e*1e5)/1e5,Lg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wL(e){return e==null}const bL=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Mg=(e,t)=>n=>!!(typeof n=="string"&&bL.test(n)&&n.startsWith(e)||t&&!wL(n)&&Object.prototype.hasOwnProperty.call(n,t)),qE=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,s]=r.match(Lg);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},EL=e=>Ji(0,255,e),Fg={...Zo,transform:e=>Math.round(EL(e))},Ka={test:Mg("rgb","red"),parse:qE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Fg.transform(e)+", "+Fg.transform(t)+", "+Fg.transform(n)+", "+Gu(Yu.transform(r))+")"};function TL(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Bg={test:Mg("#"),parse:TL,transform:Ka.transform},es={test:Mg("hsl","hue"),parse:qE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jr.transform(Gu(t))+", "+jr.transform(Gu(n))+", "+Gu(Yu.transform(r))+")"},Jt={test:e=>Ka.test(e)||Bg.test(e)||es.test(e),parse:e=>Ka.test(e)?Ka.parse(e):es.test(e)?es.parse(e):Bg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ka.transform(e):es.transform(e)},_L=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function SL(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Lg))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(_L))===null||n===void 0?void 0:n.length)||0)>0}const GE="number",KE="color",CL="var",AL="var(",XE="${}",kL=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ku(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(kL,u=>(Jt.test(u)?(r.color.push(a),i.push(KE),n.push(Jt.parse(u))):u.startsWith(AL)?(r.var.push(a),i.push(CL),n.push(u)):(r.number.push(a),i.push(GE),n.push(parseFloat(u))),++a,XE)).split(XE);return{values:n,split:s,indexes:r,types:i}}function QE(e){return Ku(e).values}function ZE(e){const{split:t,types:n}=Ku(e),r=t.length;return i=>{let a="";for(let o=0;o<r;o++)if(a+=t[o],i[o]!==void 0){const s=n[o];s===GE?a+=Gu(i[o]):s===KE?a+=Jt.transform(i[o]):a+=i[o]}return a}}const RL=e=>typeof e=="number"?0:e;function NL(e){const t=QE(e);return ZE(e)(t.map(RL))}const ta={test:SL,parse:QE,createTransformer:ZE,getAnimatableNone:NL},PL=new Set(["brightness","contrast","saturate","opacity"]);function IL(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Lg)||[];if(!r)return e;const i=n.replace(r,"");let a=PL.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const OL=/\b([a-z-]*)\(.*?\)/gu,jg={...ta,getAnimatableNone:e=>{const t=e.match(OL);return t?t.map(IL).join(" "):e}},DL={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},LL={rotate:ea,rotateX:ea,rotateY:ea,rotateZ:ea,scale:jd,scaleX:jd,scaleY:jd,scaleZ:jd,skew:ea,skewX:ea,skewY:ea,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Yu,originX:BE,originY:BE,originZ:ye},JE={...Zo,transform:Math.round},Ug={...DL,...LL,zIndex:JE,size:ye,fillOpacity:Yu,strokeOpacity:Yu,numOctaves:JE},ML={...Ug,color:Jt,backgroundColor:Jt,outlineColor:Jt,fill:Jt,stroke:Jt,borderColor:Jt,borderTopColor:Jt,borderRightColor:Jt,borderBottomColor:Jt,borderLeftColor:Jt,filter:jg,WebkitFilter:jg},Hg=e=>ML[e];function eT(e,t){let n=Hg(e);return n!==jg&&(n=ta),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const FL=new Set(["auto","none","0"]);function BL(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!FL.has(a)&&Ku(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=eT(n,i)}class tT extends Dg{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let l=t[u];if(typeof l=="string"&&(l=l.trim(),Pg(l))){const c=FE(l,n.current);c!==void 0&&(t[u]=c),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!mL.has(r)||t.length!==2)return;const[i,a]=t,o=$E(i),s=$E(a);if(o!==s)if(jE(o)&&jE(s))for(let u=0;u<t.length;u++){const l=t[u];typeof l=="string"&&(t[u]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)uL(t[i])&&r.push(i);r.length&&BL(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Jo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const a=n.getValue(r);a&&a.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Jo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([u,l])=>{n.getValue(u).set(l)}),this.resolveNoneKeyframes()}}function zg(e){return typeof e=="function"}let Ud;function jL(){Ud=void 0}const Ur={now:()=>(Ud===void 0&&Ur.set($t.isProcessing||tL.useManualTiming?$t.timestamp:performance.now()),Ud),set:e=>{Ud=e,queueMicrotask(jL)}},nT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ta.test(e)||e==="0")&&!e.startsWith("url("));function UL(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function HL(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=nT(i,t),s=nT(a,t);return!o||!s?!1:UL(e)||(n==="spring"||zg(n))&&r}const zL=40;class rT{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ur.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>zL?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&xL(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ur.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:o,onComplete:s,onUpdate:u,isGenerator:l}=this.options;if(!l&&!HL(t,r,i,a))if(o)this.options.duration=0;else{u==null||u(Fd(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function iT(e,t){return t?e*(1e3/t):0}const VL=5;function aT(e,t,n){const r=Math.max(t-VL,0);return iT(n-e(r),t-r)}const Vg=.001,$L=.01,WL=10,YL=.05,qL=1;function GL({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a,o=1-t;o=Ji(YL,qL,o),e=Ji($L,WL,pi(e)),o<1?(i=l=>{const c=l*o,d=c*e,f=c-n,p=$g(l,o),m=Math.exp(-d);return Vg-f/p*m},a=l=>{const d=l*o*e,f=d*n+n,p=Math.pow(o,2)*Math.pow(l,2)*e,m=Math.exp(-d),y=$g(Math.pow(l,2),o);return(-i(l)+Vg>0?-1:1)*((f-p)*m)/y}):(i=l=>{const c=Math.exp(-l*e),d=(l-n)*e+1;return-Vg+c*d},a=l=>{const c=Math.exp(-l*e),d=(n-l)*(e*e);return c*d});const s=5/e,u=XL(i,a,s);if(e=fi(e),isNaN(u))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:o*2*Math.sqrt(r*l),duration:e}}}const KL=12;function XL(e,t,n){let r=n;for(let i=1;i<KL;i++)r=r-e(r)/t(r);return r}function $g(e,t){return e*Math.sqrt(1-t*t)}const QL=["duration","bounce"],ZL=["stiffness","damping","mass"];function oT(e,t){return t.some(n=>e[n]!==void 0)}function JL(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!oT(e,ZL)&&oT(e,QL)){const n=GL(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function sT({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],o={done:!1,value:i},{stiffness:s,damping:u,mass:l,duration:c,velocity:d,isResolvedFromDuration:f}=JL({...r,velocity:-pi(r.velocity||0)}),p=d||0,m=u/(2*Math.sqrt(s*l)),y=a-i,w=pi(Math.sqrt(s/l)),g=Math.abs(y)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let x;if(m<1){const b=$g(w,m);x=T=>{const S=Math.exp(-m*w*T);return a-S*((p+m*w*y)/b*Math.sin(b*T)+y*Math.cos(b*T))}}else if(m===1)x=b=>a-Math.exp(-w*b)*(y+(p+w*y)*b);else{const b=w*Math.sqrt(m*m-1);x=T=>{const S=Math.exp(-m*w*T),_=Math.min(b*T,300);return a-S*((p+m*w*y)*Math.sinh(_)+b*y*Math.cosh(_))/b}}return{calculatedDuration:f&&c||null,next:b=>{const T=x(b);if(f)o.done=b>=c;else{let S=0;m<1&&(S=b===0?fi(p):aT(x,b,T));const _=Math.abs(S)<=n,N=Math.abs(a-T)<=t;o.done=_&&N}return o.value=o.done?a:T,o}}}function uT({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=D=>s!==void 0&&D<s||u!==void 0&&D>u,m=D=>s===void 0?u:u===void 0||Math.abs(s-D)<Math.abs(u-D)?s:u;let y=n*t;const w=d+y,g=o===void 0?w:o(w);g!==w&&(y=g-d);const x=D=>-y*Math.exp(-D/r),b=D=>g+x(D),T=D=>{const V=x(D),P=b(D);f.done=Math.abs(V)<=l,f.value=f.done?g:P};let S,_;const N=D=>{p(f.value)&&(S=D,_=sT({keyframes:[f.value,m(f.value)],velocity:aT(b,D,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:c}))};return N(0),{calculatedDuration:null,next:D=>{let V=!1;return!_&&S===void 0&&(V=!0,T(D),N(D)),S!==void 0&&D>=S?_.next(D-S):(!V&&T(D),f)}}}const e4=Wu(.42,0,1,1),t4=Wu(0,0,.58,1),lT=Wu(.42,0,.58,1),n4=e=>Array.isArray(e)&&typeof e[0]!="number",Wg=e=>Array.isArray(e)&&typeof e[0]=="number",cT={linear:Zt,easeIn:e4,easeInOut:lT,easeOut:t4,circIn:Rg,circInOut:IE,circOut:PE,backIn:kg,backInOut:RE,backOut:kE,anticipate:NE},dT=e=>{if(Wg(e)){Ng(e.length===4);const[t,n,r,i]=e;return Wu(t,n,r,i)}else if(typeof e=="string")return Ng(cT[e]!==void 0),cT[e];return e},r4=(e,t)=>n=>t(e(n)),hi=(...e)=>e.reduce(r4),ts=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},pt=(e,t,n)=>e+(t-e)*n;function Yg(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function i4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;i=Yg(u,s,e+1/3),a=Yg(u,s,e),o=Yg(u,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Hd(e,t){return n=>n>0?t:e}const qg=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},a4=[Bg,Ka,es],o4=e=>a4.find(t=>t.test(e));function fT(e){const t=o4(e);if(!t)return!1;let n=t.parse(e);return t===es&&(n=i4(n)),n}const pT=(e,t)=>{const n=fT(e),r=fT(t);if(!n||!r)return Hd(e,t);const i={...n};return a=>(i.red=qg(n.red,r.red,a),i.green=qg(n.green,r.green,a),i.blue=qg(n.blue,r.blue,a),i.alpha=pt(n.alpha,r.alpha,a),Ka.transform(i))},Gg=new Set(["none","hidden"]);function s4(e,t){return Gg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function u4(e,t){return n=>pt(e,t,n)}function Kg(e){return typeof e=="number"?u4:typeof e=="string"?Pg(e)?Hd:Jt.test(e)?pT:d4:Array.isArray(e)?hT:typeof e=="object"?Jt.test(e)?pT:l4:Hd}function hT(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>Kg(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function l4(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Kg(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function c4(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],s=e.indexes[o][i[o]],u=(n=e.values[s])!==null&&n!==void 0?n:0;r[a]=u,i[o]++}return r}const d4=(e,t)=>{const n=ta.createTransformer(t),r=Ku(e),i=Ku(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Gg.has(e)&&!i.values.length||Gg.has(t)&&!r.values.length?s4(e,t):hi(hT(c4(r,i),i.values),n):Hd(e,t)};function mT(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?pt(e,t,n):Kg(e)(e,t)}function f4(e,t,n){const r=[],i=n||mT,a=e.length-1;for(let o=0;o<a;o++){let s=i(e[o],e[o+1]);if(t){const u=Array.isArray(t)?t[o]||Zt:t;s=hi(u,s)}r.push(s)}return r}function p4(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Ng(a===t.length),a===1)return()=>t[0];if(a===2&&e[0]===e[1])return()=>t[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=f4(t,r,i),s=o.length,u=l=>{let c=0;if(s>1)for(;c<e.length-2&&!(l<e[c+1]);c++);const d=ts(e[c],e[c+1],l);return o[c](d)};return n?l=>u(Ji(e[0],e[a-1],l)):u}function h4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ts(0,t,r);e.push(pt(n,1,i))}}function m4(e){const t=[0];return h4(t,e.length-1),t}function g4(e,t){return e.map(n=>n*t)}function y4(e,t){return e.map(()=>t||lT).splice(0,e.length-1)}function zd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=n4(r)?r.map(dT):dT(r),a={done:!1,value:t[0]},o=g4(n&&n.length===t.length?n:m4(t),e),s=p4(o,t,{ease:Array.isArray(i)?i:y4(t,i)});return{calculatedDuration:e,next:u=>(a.value=s(u),a.done=u>=e,a)}}const gT=2e4;function v4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<gT;)t+=n,r=e.next(t);return t>=gT?1/0:t}const x4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Xe.update(t,!0),stop:()=>Zi(t),now:()=>$t.isProcessing?$t.timestamp:Ur.now()}},w4={decay:uT,inertia:uT,tween:zd,keyframes:zd,spring:sT},b4=e=>e/100;class Xg extends rT{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:u}=this.options;u&&u()};const{name:n,motionValue:r,element:i,keyframes:a}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Dg,s=(u,l)=>this.onKeyframesResolved(u,l);this.resolver=new o(a,s,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=this.options,s=zg(n)?n:w4[n]||zd;let u,l;s!==zd&&typeof t[0]!="number"&&(u=hi(b4,mT(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});a==="mirror"&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=v4(c));const{calculatedDuration:d}=c,f=d+i,p=f*(r+1)-i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:u,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:D}=this.options;return{done:!0,value:D[D.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:u,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return a.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:y,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let b=this.currentTime,T=a;if(p){const D=Math.min(this.currentTime,c)/d;let V=Math.floor(D),P=D%1;!P&&D>=1&&(P=1),P===1&&V--,V=Math.min(V,p+1),!!(V%2)&&(m==="reverse"?(P=1-P,y&&(P-=y/d)):m==="mirror"&&(T=o)),b=Ji(0,1,P)*d}const S=x?{done:!1,value:u[0]}:T.next(b);s&&(S.value=s(S.value));let{done:_}=S;!x&&l!==null&&(_=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return N&&i!==void 0&&(S.value=Fd(u,this.options,i)),w&&w(S.value),N&&this.finish(),S}get duration(){const{resolved:t}=this;return t?pi(t.calculatedDuration):0}get time(){return pi(this.currentTime)}set time(t){t=fi(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=pi(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=x4,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const yT=new Set(["opacity","clipPath","filter","transform"]),E4=10,T4=(e,t)=>{let n="";const r=Math.max(Math.round(t/E4),2);for(let i=0;i<r;i++)n+=e(ts(0,r-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function Qg(e){let t;return()=>(t===void 0&&(t=e()),t)}const _4={linearEasing:void 0};function S4(e,t){const n=Qg(e);return()=>{var r;return(r=_4[t])!==null&&r!==void 0?r:n()}}const Vd=S4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function vT(e){return!!(typeof e=="function"&&Vd()||!e||typeof e=="string"&&(e in Zg||Vd())||Wg(e)||Array.isArray(e)&&e.every(vT))}const Xu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Zg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xu([0,.65,.55,1]),circOut:Xu([.55,0,1,.45]),backIn:Xu([.31,.01,.66,-.59]),backOut:Xu([.33,1.53,.69,.99])};function xT(e,t){if(e)return typeof e=="function"&&Vd()?T4(e,t):Wg(e)?Xu(e):Array.isArray(e)?e.map(n=>xT(n,t)||Zg.easeOut):Zg[e]}function C4(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s,times:u}={}){const l={[t]:n};u&&(l.offset=u);const c=xT(s,i);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}function wT(e,t){e.timeline=t,e.onfinish=null}const A4=Qg(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),$d=10,k4=2e4;function R4(e){return zg(e.type)||e.type==="spring"||!vT(e.ease)}function N4(e,t){const n=new Xg({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let a=0;for(;!r.done&&a<k4;)r=n.sample(a),i.push(r.value),a+=$d;return{times:void 0,keyframes:i,duration:a-$d,ease:"linear"}}const bT={anticipate:NE,backInOut:RE,circInOut:IE};function P4(e){return e in bT}class ET extends rT{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:a}=this.options;this.resolver=new tT(a,(o,s)=>this.onKeyframesResolved(o,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:a,ease:o,type:s,motionValue:u,name:l,startTime:c}=this.options;if(!(!((r=u.owner)===null||r===void 0)&&r.current))return!1;if(typeof o=="string"&&Vd()&&P4(o)&&(o=bT[o]),R4(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,element:y,...w}=this.options,g=N4(t,w);t=g.keyframes,t.length===1&&(t[1]=t[0]),i=g.duration,a=g.times,o=g.ease,s="keyframes"}const d=C4(u.owner.current,l,t,{...this.options,duration:i,times:a,ease:o});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(wT(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;u.set(Fd(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:a,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return pi(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return pi(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=fi(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Zt;const{animation:r}=n;wT(r,t)}return Zt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:a,ease:o,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:c,onComplete:d,element:f,...p}=this.options,m=new Xg({...p,keyframes:r,duration:i,type:a,ease:o,times:s,isGenerator:!0}),y=fi(this.time);l.setWithVelocity(m.sample(y-$d).value,m.sample(y).value,$d)}const{onStop:u}=this.options;u&&u(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:a,damping:o,type:s}=t;return A4()&&r&&yT.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&a!=="mirror"&&o!==0&&s!=="inertia"}}const I4=Qg(()=>window.ScrollTimeline!==void 0);class O4{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>I4()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,a)=>{i&&i(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function D4({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const Jg=(e,t,n,r={},i,a)=>o=>{const s=Cg(r,e)||{},u=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-fi(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};D4(s)||(c={...c,...eL(e,c)}),c.duration&&(c.duration=fi(c.duration)),c.repeatDelay&&(c.repeatDelay=fi(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!a&&t.get()!==void 0){const f=Fd(c.keyframes,s);if(f!==void 0)return Xe.update(()=>{c.onUpdate(f),c.onComplete()}),new O4([])}return!a&&ET.supports(c)?new ET(c):new Xg(c)},L4=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),M4=e=>Eg(e)?e[e.length-1]||0:e;function e0(e,t){e.indexOf(t)===-1&&e.push(t)}function t0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class n0{constructor(){this.subscriptions=[]}add(t){return e0(this.subscriptions,t),()=>t0(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const TT=30,F4=e=>!isNaN(parseFloat(e));class B4{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=Ur.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ur.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=F4(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new n0);const r=this.events[t].add(n);return t==="change"?()=>{r(),Xe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ur.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>TT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,TT);return iT(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qu(e,t){return new B4(e,t)}function j4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qu(n))}function U4(e,t){const n=Md(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=M4(a[o]);j4(e,o,s)}}const Wd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_T="data-"+Wd("framerAppearId");function ST(e){return e.props[_T]}const en=e=>!!(e&&e.getVelocity);function H4(e){return!!(en(e)&&e.add)}function r0(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(H4(n))return n.add(t)}function z4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function CT(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:s,...u}=t;r&&(o=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in u){const f=e.getValue(d,(a=e.latestValues[d])!==null&&a!==void 0?a:null),p=u[d];if(p===void 0||c&&z4(c,d))continue;const m={delay:n,...Cg(o||{},d)};let y=!1;if(window.MotionHandoffAnimation){const g=ST(e);if(g){const x=window.MotionHandoffAnimation(g,d,Xe);x!==null&&(m.startTime=x,y=!0)}}r0(e,d),f.start(Jg(d,f,p,e.shouldReduceMotion&&Qi.has(d)?{type:!1}:m,e,y));const w=f.animation;w&&l.push(w)}return s&&Promise.all(l).then(()=>{Xe.update(()=>{s&&U4(e,s)})}),l}function i0(e,t,n={}){var r;const i=Md(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(CT(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=a;return V4(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:u}=a;if(u){const[l,c]=u==="beforeChildren"?[o,s]:[s,o];return l().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function V4(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,u=i===1?(l=0)=>l*r:(l=0)=>s-l*r;return Array.from(e.variantChildren).sort($4).forEach((l,c)=>{l.notify("AnimationStart",t),o.push(i0(l,t,{...a,delay:n+u(c)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(o)}function $4(e,t){return e.sortNodePosition(t)}function W4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>i0(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=i0(e,t,n);else{const i=typeof t=="function"?Md(e,t,n.custom):t;r=Promise.all(CT(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Y4=Sg.length;function AT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?AT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Y4;n++){const r=Sg[n],i=e.props[r];(Vu(i)||i===!1)&&(t[r]=i)}return t}const q4=[..._g].reverse(),G4=_g.length;function K4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>W4(e,n,r)))}function X4(e){let t=K4(e),n=kT(),r=!0;const i=u=>(l,c)=>{var d;const f=Md(e,c,u==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...y}=f;l={...l,...y,...m}}return l};function a(u){t=u(e)}function o(u){const{props:l}=e,c=AT(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let w=0;w<G4;w++){const g=q4[w],x=n[g],b=l[g]!==void 0?l[g]:c[g],T=Vu(b),S=g===u?x.isActive:null;S===!1&&(m=w);let _=b===c[g]&&b!==l[g]&&T;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),x.protectedKeys={...p},!x.isActive&&S===null||!b&&!x.prevProp||zu(b)||typeof b=="boolean")continue;const N=Q4(x.prevProp,b);let D=N||g===u&&x.isActive&&!_&&T||w>m&&T,V=!1;const P=Array.isArray(b)?b:[b];let $=P.reduce(i(g),{});S===!1&&($={});const{prevResolvedValues:H={}}=x,X={...H,...$},Y=ee=>{D=!0,f.has(ee)&&(V=!0,f.delete(ee)),x.needsAnimating[ee]=!0;const F=e.getValue(ee);F&&(F.liveStyle=!1)};for(const ee in X){const F=$[ee],B=H[ee];if(p.hasOwnProperty(ee))continue;let A=!1;Eg(F)&&Eg(B)?A=!EE(F,B):A=F!==B,A?F!=null?Y(ee):f.add(ee):F!==void 0&&f.has(ee)?Y(ee):x.protectedKeys[ee]=!0}x.prevProp=b,x.prevResolvedValues=$,x.isActive&&(p={...p,...$}),r&&e.blockInitialAnimation&&(D=!1),D&&(!(_&&N)||V)&&d.push(...P.map(ee=>({animation:ee,options:{type:g}})))}if(f.size){const w={};f.forEach(g=>{const x=e.getBaseTarget(g),b=e.getValue(g);b&&(b.liveStyle=!0),w[g]=x??null}),d.push({animation:w})}let y=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function s(u,l){var c;if(n[u].isActive===l)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(u,l)}),n[u].isActive=l;const d=o(u);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=kT(),r=!0}}}function Q4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!EE(t,e):!1}function Xa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function kT(){return{animate:Xa(!0),whileInView:Xa(),whileHover:Xa(),whileTap:Xa(),whileDrag:Xa(),whileFocus:Xa(),exit:Xa()}}class na{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Z4 extends na{constructor(t){super(t),t.animationState||(t.animationState=X4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();zu(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let J4=0;class eM extends na{constructor(){super(...arguments),this.id=J4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const tM={animation:{Feature:Z4},exit:{Feature:eM}},RT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Yd(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const nM=e=>t=>RT(t)&&e(t,Yd(t));function mi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function gi(e,t,n,r){return mi(e,t,nM(n),r)}const NT=(e,t)=>Math.abs(e-t);function rM(e,t){const n=NT(e.x,t.x),r=NT(e.y,t.y);return Math.sqrt(n**2+r**2)}class PT{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=o0(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=rM(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:y}=$t;this.history.push({...m,timestamp:y});const{onStart:w,onMove:g}=this.handlers;f||(w&&w(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=a0(f,this.transformPagePoint),Xe.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=o0(d.type==="pointercancel"?this.lastMoveEventInfo:a0(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,w),m&&m(d,w)},!RT(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Yd(t),s=a0(o,this.transformPagePoint),{point:u}=s,{timestamp:l}=$t;this.history=[{...u,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,o0(s,this.history)),this.removeListeners=hi(gi(this.contextWindow,"pointermove",this.handlePointerMove),gi(this.contextWindow,"pointerup",this.handlePointerUp),gi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zi(this.updatePoint)}}function a0(e,t){return t?{point:t(e.point)}:e}function IT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function o0({point:e},t){return{point:e,delta:IT(e,OT(t)),offset:IT(e,iM(t)),velocity:aM(t,.1)}}function iM(e){return e[0]}function OT(e){return e[e.length-1]}function aM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=OT(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>fi(t)));)n--;if(!r)return{x:0,y:0};const a=pi(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function DT(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const LT=DT("dragHorizontal"),MT=DT("dragVertical");function FT(e){let t=!1;if(e==="y")t=MT();else if(e==="x")t=LT();else{const n=LT(),r=MT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function BT(){const e=FT(!0);return e?(e(),!1):!0}function ns(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const jT=1e-4,oM=1-jT,sM=1+jT,UT=.01,uM=0-UT,lM=0+UT;function Un(e){return e.max-e.min}function cM(e,t,n){return Math.abs(e-t)<=n}function HT(e,t,n,r=.5){e.origin=r,e.originPoint=pt(t.min,t.max,e.origin),e.scale=Un(n)/Un(t),e.translate=pt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=oM&&e.scale<=sM||isNaN(e.scale))&&(e.scale=1),(e.translate>=uM&&e.translate<=lM||isNaN(e.translate))&&(e.translate=0)}function Zu(e,t,n,r){HT(e.x,t.x,n.x,r?r.originX:void 0),HT(e.y,t.y,n.y,r?r.originY:void 0)}function zT(e,t,n){e.min=n.min+t.min,e.max=e.min+Un(t)}function dM(e,t,n){zT(e.x,t.x,n.x),zT(e.y,t.y,n.y)}function VT(e,t,n){e.min=t.min-n.min,e.max=e.min+Un(t)}function Ju(e,t,n){VT(e.x,t.x,n.x),VT(e.y,t.y,n.y)}function fM(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?pt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?pt(n,e,r.max):Math.min(e,n)),e}function $T(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function pM(e,{top:t,left:n,bottom:r,right:i}){return{x:$T(e.x,n,i),y:$T(e.y,t,r)}}function WT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function hM(e,t){return{x:WT(e.x,t.x),y:WT(e.y,t.y)}}function mM(e,t){let n=.5;const r=Un(e),i=Un(t);return i>r?n=ts(t.min,t.max-r,e.min):r>i&&(n=ts(e.min,e.max-i,t.min)),Ji(0,1,n)}function gM(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const s0=.35;function yM(e=s0){return e===!1?e=0:e===!0&&(e=s0),{x:YT(e,"left","right"),y:YT(e,"top","bottom")}}function YT(e,t,n){return{min:qT(e,t),max:qT(e,n)}}function qT(e,t){return typeof e=="number"?e:e[t]||0}const GT=()=>({translate:0,scale:1,origin:0,originPoint:0}),rs=()=>({x:GT(),y:GT()}),KT=()=>({min:0,max:0}),Tt=()=>({x:KT(),y:KT()});function nr(e){return[e("x"),e("y")]}function XT({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function vM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function xM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function u0(e){return e===void 0||e===1}function l0({scale:e,scaleX:t,scaleY:n}){return!u0(e)||!u0(t)||!u0(n)}function Qa(e){return l0(e)||QT(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function QT(e){return ZT(e.x)||ZT(e.y)}function ZT(e){return e&&e!=="0%"}function qd(e,t,n){const r=e-n,i=t*r;return n+i}function JT(e,t,n,r,i){return i!==void 0&&(e=qd(e,i,r)),qd(e,n,r)+t}function c0(e,t=0,n=1,r,i){e.min=JT(e.min,t,n,r,i),e.max=JT(e.max,t,n,r,i)}function e2(e,{x:t,y:n}){c0(e.x,t.translate,t.scale,t.originPoint),c0(e.y,n.translate,n.scale,n.originPoint)}const t2=.999999999999,n2=1.0000000000001;function wM(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&as(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,e2(e,o)),r&&Qa(a.latestValues)&&as(e,a.latestValues))}t.x<n2&&t.x>t2&&(t.x=1),t.y<n2&&t.y>t2&&(t.y=1)}function is(e,t){e.min=e.min+t,e.max=e.max+t}function r2(e,t,n,r,i=.5){const a=pt(e.min,e.max,i);c0(e,t,n,a,r)}function as(e,t){r2(e.x,t.x,t.scaleX,t.scale,t.originX),r2(e.y,t.y,t.scaleY,t.scale,t.originY)}function i2(e,t){return XT(xM(e.getBoundingClientRect(),t))}function bM(e,t,n){const r=i2(e,n),{scroll:i}=t;return i&&(is(r.x,i.offset.x),is(r.y,i.offset.y)),r}const a2=({current:e})=>e?e.ownerDocument.defaultView:null,EM=new WeakMap;class TM{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Tt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Yd(c,"page").point)},a=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=FT(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nr(w=>{let g=this.getAxisMotionValue(w).get()||0;if(jr.test(g)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[w];b&&(g=Un(b)*(parseFloat(g)/100))}}this.originPoint[w]=g}),m&&Xe.postRender(()=>m(c,d)),r0(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:w}=d;if(p&&this.currentDirection===null){this.currentDirection=_M(w),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,w),this.updateAxis("y",d.point,w),this.visualElement.render(),y&&y(c,d)},s=(c,d)=>this.stop(c,d),u=()=>nr(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new PT(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:a2(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Xe.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Gd(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=fM(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&ns(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=pM(i.layoutBox,n):this.constraints=!1,this.elastic=yM(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&nr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=gM(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ns(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=bM(r,i.root,this.visualElement.getTransformPagePoint());let o=hM(i.layout.layoutBox,a);if(n){const s=n(vM(o));this.hasMutatedConstraints=!!s,s&&(o=XT(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),u=this.constraints||{},l=nr(c=>{if(!Gd(c,n,this.currentDirection))return;let d=u&&u[c]||{};o&&(d={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r0(this.visualElement,t),r.start(Jg(t,r,0,n,this.visualElement,!1))}stopAnimation(){nr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){nr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){nr(n=>{const{drag:r}=this.getProps();if(!Gd(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-pt(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ns(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};nr(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const u=s.get();i[o]=mM({min:u,max:u},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),nr(o=>{if(!Gd(o,t,null))return;const s=this.getAxisMotionValue(o),{min:u,max:l}=this.constraints[o];s.set(pt(u,l,i[o]))})}addListeners(){if(!this.visualElement.current)return;EM.set(this.visualElement,this);const t=this.visualElement.current,n=gi(t,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();ns(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Xe.read(r);const o=mi(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(nr(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=u[c].translate,d.set(d.get()+u[c].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=s0,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function Gd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function _M(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class SM extends na{constructor(t){super(t),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new TM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zt}unmount(){this.removeGroupControls(),this.removeListeners()}}const o2=e=>(t,n)=>{e&&Xe.postRender(()=>e(t,n))};class CM extends na{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(t){this.session=new PT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:a2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:o2(t),onStart:o2(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&Xe.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=gi(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Kd=v.createContext(null);function AM(){const e=v.useContext(Kd);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=v.useId();v.useEffect(()=>r(i),[]);const a=v.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,a]:[!0]}const d0=v.createContext({}),s2=v.createContext({}),Xd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function u2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const el={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=u2(e,t.target.x),r=u2(e,t.target.y);return`${n}% ${r}%`}},kM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ta.parse(e);if(i.length>5)return r;const a=ta.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,u=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=u;const l=pt(s,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=l),typeof i[3+o]=="number"&&(i[3+o]/=l),a(i)}},Qd={};function RM(e){Object.assign(Qd,e)}const{schedule:f0,cancel:_re}=_E(queueMicrotask,!1);class NM extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;RM(PM),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Xd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Xe.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),f0.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function l2(e){const[t,n]=AM(),r=v.useContext(d0);return E.jsx(NM,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(s2),isPresent:t,safeToRemove:n})}const PM={borderRadius:{...el,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:el,borderTopRightRadius:el,borderBottomLeftRadius:el,borderBottomRightRadius:el,boxShadow:kM},c2=["TopLeft","TopRight","BottomLeft","BottomRight"],IM=c2.length,d2=e=>typeof e=="string"?parseFloat(e):e,f2=e=>typeof e=="number"||ye.test(e);function OM(e,t,n,r,i,a){i?(e.opacity=pt(0,n.opacity!==void 0?n.opacity:1,DM(r)),e.opacityExit=pt(t.opacity!==void 0?t.opacity:1,0,LM(r))):a&&(e.opacity=pt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<IM;o++){const s=`border${c2[o]}Radius`;let u=p2(t,s),l=p2(n,s);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||f2(u)===f2(l)?(e[s]=Math.max(pt(d2(u),d2(l),r),0),(jr.test(l)||jr.test(u))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=pt(t.rotate||0,n.rotate||0,r))}function p2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const DM=h2(0,.5,PE),LM=h2(.5,.95,Zt);function h2(e,t,n){return r=>r<e?0:r>t?1:n(ts(e,t,r))}function m2(e,t){e.min=t.min,e.max=t.max}function rr(e,t){m2(e.x,t.x),m2(e.y,t.y)}function g2(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function y2(e,t,n,r,i){return e-=t,e=qd(e,1/n,r),i!==void 0&&(e=qd(e,1/i,r)),e}function MM(e,t=0,n=1,r=.5,i,a=e,o=e){if(jr.test(t)&&(t=parseFloat(t),t=pt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=pt(a.min,a.max,r);e===a&&(s-=t),e.min=y2(e.min,t,n,s,i),e.max=y2(e.max,t,n,s,i)}function v2(e,t,[n,r,i],a,o){MM(e,t[n],t[r],t[i],t.scale,a,o)}const FM=["x","scaleX","originX"],BM=["y","scaleY","originY"];function x2(e,t,n,r){v2(e.x,t,FM,n?n.x:void 0,r?r.x:void 0),v2(e.y,t,BM,n?n.y:void 0,r?r.y:void 0)}function w2(e){return e.translate===0&&e.scale===1}function b2(e){return w2(e.x)&&w2(e.y)}function E2(e,t){return e.min===t.min&&e.max===t.max}function jM(e,t){return E2(e.x,t.x)&&E2(e.y,t.y)}function T2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _2(e,t){return T2(e.x,t.x)&&T2(e.y,t.y)}function S2(e){return Un(e.x)/Un(e.y)}function C2(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class UM{constructor(){this.members=[]}add(t){e0(this.members,t),t.scheduleRender()}remove(t){if(t0(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function HM(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;l&&(r=`perspective(${l}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,u=e.y.scale*t.y;return(s!==1||u!==1)&&(r+=`scale(${s}, ${u})`),r||"none"}const zM=(e,t)=>e.depth-t.depth;class VM{constructor(){this.children=[],this.isDirty=!1}add(t){e0(this.children,t),this.isDirty=!0}remove(t){t0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(zM),this.isDirty=!1,this.children.forEach(t)}}function Zd(e){const t=en(e)?e.get():e;return L4(t)?t.toValue():t}function $M(e,t){const n=Ur.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Zi(r),e(a-t))};return Xe.read(r,!0),()=>Zi(r)}function WM(e){return e instanceof SVGElement&&e.tagName!=="svg"}function YM(e,t,n){const r=en(e)?e:Qu(e);return r.start(Jg("",r,t,n)),r.animation}const Za={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},tl=typeof window<"u"&&window.MotionDebug!==void 0,p0=["","X","Y","Z"],qM={visibility:"hidden"},A2=1e3;let GM=0;function h0(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function k2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ST(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xe,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&k2(r)}function R2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=GM++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,tl&&(Za.totalNodes=Za.resolvedTargetDeltas=Za.recalculatedProjection=0),this.nodes.forEach(QM),this.nodes.forEach(n5),this.nodes.forEach(r5),this.nodes.forEach(ZM),tl&&window.MotionDebug.record(Za)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new VM)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new n0),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const u=this.eventHandlers.get(o);u&&u.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=WM(o),this.instance=o;const{layoutId:u,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(l||u)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=$M(f,250),Xd.hasAnimatedSinceResize&&(Xd.hasAnimatedSinceResize=!1,this.nodes.forEach(P2))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&c&&(u||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||u5,{onLayoutAnimationStart:w,onLayoutAnimationComplete:g}=c.getProps(),x=!this.targetLayout||!_2(this.targetLayout,m)||p,b=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const T={...Cg(y,"layout"),onPlay:w,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||P2(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Zi(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(i5),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&k2(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:u}=this.options;if(s===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(N2);return}this.isUpdating||this.nodes.forEach(e5),this.isUpdating=!1,this.nodes.forEach(t5),this.nodes.forEach(KM),this.nodes.forEach(XM),this.clearAllSnapshots();const s=Ur.now();$t.delta=Ji(0,1e3/60,s-$t.timestamp),$t.timestamp=s,$t.isProcessing=!0,Ag.update.process($t),Ag.preRender.process($t),Ag.render.process($t),$t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,f0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(JM),this.sharedNodes.forEach(a5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Tt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!b2(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;o&&(s||Qa(this.latestValues)||c)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let u=this.removeElementScroll(s);return o&&(u=this.removeTransform(u)),l5(u),{animationId:this.root.animationId,measuredBox:s,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:s}=this.options;if(!s)return Tt();const u=s.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(c5))){const{scroll:c}=this.root;c&&(is(u.x,c.offset.x),is(u.y,c.offset.y))}return u}removeElementScroll(o){var s;const u=Tt();if(rr(u,o),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return u;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&rr(u,o),is(u.x,d.offset.x),is(u.y,d.offset.y))}return u}applyTransform(o,s=!1){const u=Tt();rr(u,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&as(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Qa(c.latestValues)&&as(u,c.latestValues)}return Qa(this.latestValues)&&as(u,this.latestValues),u}removeTransform(o){const s=Tt();rr(s,o);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!Qa(l.latestValues))continue;l0(l.latestValues)&&l.updateSnapshot();const c=Tt(),d=l.measurePageBox();rr(c,d),x2(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,c)}return Qa(this.latestValues)&&x2(s,this.latestValues),s}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$t.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var s;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==u;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=$t.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Tt(),this.relativeTargetOrigin=Tt(),Ju(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Tt(),this.targetWithTransforms=Tt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rr(this.target,this.layout.layoutBox),e2(this.target,this.targetDelta)):rr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Tt(),this.relativeTargetOrigin=Tt(),Ju(this.relativeTargetOrigin,this.target,p.target),rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}tl&&Za.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||l0(this.parent.latestValues)||QT(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const s=this.getLead(),u=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===$t.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;rr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;wM(this.layoutCorrected,this.treeScale,this.path,u),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Tt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(g2(this.prevProjectionDelta.x,this.projectionDelta.x),g2(this.prevProjectionDelta.y,this.projectionDelta.y)),Zu(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!C2(this.projectionDelta.x,this.prevProjectionDelta.x)||!C2(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),tl&&Za.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),o){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=rs(),this.projectionDelta=rs(),this.projectionDeltaWithTransform=rs()}setAnimationOrigin(o,s=!1){const u=this.snapshot,l=u?u.latestValues:{},c={...this.latestValues},d=rs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=Tt(),p=u?u.source:void 0,m=this.layout?this.layout.source:void 0,y=p!==m,w=this.getStack(),g=!w||w.members.length<=1,x=!!(y&&!g&&this.options.crossfade===!0&&!this.path.some(s5));this.animationProgress=0;let b;this.mixTargetDelta=T=>{const S=T/1e3;I2(d.x,o.x,S),I2(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ju(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),o5(this.relativeTarget,this.relativeTargetOrigin,f,S),b&&jM(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Tt()),rr(b,this.relativeTarget)),y&&(this.animationValues=c,OM(c,l,this.latestValues,S,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Zi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{Xd.hasAnimatedSinceResize=!0,this.currentAnimation=YM(0,A2,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(A2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:u,layout:l,latestValues:c}=o;if(!(!s||!u||!l)){if(this!==o&&this.layout&&l&&F2(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||Tt();const d=Un(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+d;const f=Un(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+f}rr(s,u),as(s,c),Zu(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new UM),this.sharedNodes.get(o).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(s=!0),!s)return;const l={};u.z&&h0("z",o,l,this.animationValues);for(let c=0;c<p0.length;c++)h0(`rotate${p0[c]}`,o,l,this.animationValues),h0(`skew${p0[c]}`,o,l,this.animationValues);o.render();for(const c in l)o.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);o.scheduleRender()}getProjectionStyles(o){var s,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return qM;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Zd(o==null?void 0:o.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=Zd(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Qa(this.latestValues)&&(y.transform=c?c({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=HM(this.projectionDeltaWithTransform,this.treeScale,f),c&&(l.transform=c(f,l.transform));const{x:p,y:m}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?l.opacity=d===this?(u=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:l.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const y in Qd){if(f[y]===void 0)continue;const{correct:w,applyTo:g}=Qd[y],x=l.transform==="none"?f[y]:w(f[y],d);if(g){const b=g.length;for(let T=0;T<b;T++)l[g[T]]=x}else l[y]=x}return this.options.layoutId&&(l.pointerEvents=d===this?Zd(o==null?void 0:o.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(N2),this.root.sharedNodes.clear()}}}function KM(e){e.updateLayout()}function XM(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?nr(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=Un(f);f.min=r[d].min,f.max=f.min+p}):F2(a,n.layoutBox,r)&&nr(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=Un(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const s=rs();Zu(s,r,n.layoutBox);const u=rs();o?Zu(u,e.applyTransform(i,!0),n.measuredBox):Zu(u,r,n.layoutBox);const l=!b2(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=Tt();Ju(m,n.layoutBox,f.layoutBox);const y=Tt();Ju(y,r,p.layoutBox),_2(m,y)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function QM(e){tl&&Za.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ZM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function JM(e){e.clearSnapshot()}function N2(e){e.clearMeasurements()}function e5(e){e.isLayoutDirty=!1}function t5(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function P2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function n5(e){e.resolveTargetDelta()}function r5(e){e.calcProjection()}function i5(e){e.resetSkewAndRotation()}function a5(e){e.removeLeadSnapshot()}function I2(e,t,n){e.translate=pt(t.translate,0,n),e.scale=pt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function O2(e,t,n,r){e.min=pt(t.min,n.min,r),e.max=pt(t.max,n.max,r)}function o5(e,t,n,r){O2(e.x,t.x,n.x,r),O2(e.y,t.y,n.y,r)}function s5(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const u5={duration:.45,ease:[.4,0,.1,1]},D2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),L2=D2("applewebkit/")&&!D2("chrome/")?Math.round:Zt;function M2(e){e.min=L2(e.min),e.max=L2(e.max)}function l5(e){M2(e.x),M2(e.y)}function F2(e,t,n){return e==="position"||e==="preserve-aspect"&&!cM(S2(t),S2(n),.2)}function c5(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const d5=R2({attachResizeListener:(e,t)=>mi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),m0={current:void 0},B2=R2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!m0.current){const e=new d5({});e.mount(window),e.setOptions({layoutScroll:!0}),m0.current=e}return m0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),f5={pan:{Feature:CM},drag:{Feature:SM,ProjectionNode:B2,MeasureLayout:l2}};function j2(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(a,o)=>{if(a.pointerType==="touch"||BT())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const u=s[r];u&&Xe.postRender(()=>u(a,o))};return gi(e.current,n,i,{passive:!e.getProps()[r]})}class p5 extends na{mount(){this.unmount=hi(j2(this.node,!0),j2(this.node,!1))}unmount(){}}class h5 extends na{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=hi(mi(this.node.current,"focus",()=>this.onFocus()),mi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const U2=(e,t)=>t?e===t?!0:U2(e,t.parentElement):!1;function g0(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Yd(n))}class m5 extends na{constructor(){super(...arguments),this.removeStartListeners=Zt,this.removeEndListeners=Zt,this.removeAccessibleListeners=Zt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),a=gi(window,"pointerup",(s,u)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!U2(this.node.current,s.target)?c:l;f&&Xe.update(()=>f(s,u))},{passive:!(r.onTap||r.onPointerUp)}),o=gi(window,"pointercancel",(s,u)=>this.cancelPress(s,u),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=hi(a,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const o=s=>{s.key!=="Enter"||!this.checkPressEnd()||g0("up",(u,l)=>{const{onTap:c}=this.node.getProps();c&&Xe.postRender(()=>c(u,l))})};this.removeEndListeners(),this.removeEndListeners=mi(this.node.current,"keyup",o),g0("down",(s,u)=>{this.startPress(s,u)})},n=mi(this.node.current,"keydown",t),r=()=>{this.isPressing&&g0("cancel",(a,o)=>this.cancelPress(a,o))},i=mi(this.node.current,"blur",r);this.removeAccessibleListeners=hi(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Xe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!BT()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Xe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=gi(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=mi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=hi(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const y0=new WeakMap,v0=new WeakMap,g5=e=>{const t=y0.get(e.target);t&&t(e)},y5=e=>{e.forEach(g5)};function v5({root:e,...t}){const n=e||document;v0.has(n)||v0.set(n,{});const r=v0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(y5,{root:e,...t})),r[i]}function x5(e,t,n){const r=v5(t);return y0.set(e,n),r.observe(e),()=>{y0.delete(e),r.unobserve(e)}}const w5={some:0,all:1};class b5 extends na{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:w5[i]},s=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,a&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=l?c:d;f&&f(u)};return x5(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(E5(t,n))&&this.startObserver()}unmount(){}}function E5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const T5={inView:{Feature:b5},tap:{Feature:m5},focus:{Feature:h5},hover:{Feature:p5}},_5={layout:{ProjectionNode:B2,MeasureLayout:l2}},x0=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Jd=v.createContext({}),w0=typeof window<"u",H2=w0?v.useLayoutEffect:v.useEffect,z2=v.createContext({strict:!1});function S5(e,t,n,r,i){var a,o;const{visualElement:s}=v.useContext(Jd),u=v.useContext(z2),l=v.useContext(Kd),c=v.useContext(x0).reducedMotion,d=v.useRef();r=r||u.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=v.useContext(s2);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&C5(d.current,n,i,p),v.useInsertionEffect(()=>{f&&f.update(n,l)});const m=n[_T],y=v.useRef(!!m&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return H2(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),f0.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),v.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)===null||w===void 0||w.call(window,m)}),y.current=!1))}),f}function C5(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:u,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:V2(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&ns(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:l})}function V2(e){if(e)return e.options.allowProjection!==!1?e.projection:V2(e.parent)}function A5(e,t,n){return v.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ns(n)&&(n.current=r))},[t])}function ef(e){return zu(e.animate)||Sg.some(t=>Vu(e[t]))}function $2(e){return!!(ef(e)||e.variants)}function k5(e,t){if(ef(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Vu(n)?n:void 0,animate:Vu(r)?r:void 0}}return e.inherit!==!1?t:{}}function R5(e){const{initial:t,animate:n}=k5(e,v.useContext(Jd));return v.useMemo(()=>({initial:t,animate:n}),[W2(t),W2(n)])}function W2(e){return Array.isArray(e)?e.join(" "):e}const Y2={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},os={};for(const e in Y2)os[e]={isEnabled:t=>Y2[e].some(n=>!!t[n])};function N5(e){for(const t in e)os[t]={...os[t],...e[t]}}const P5=Symbol.for("motionComponentSymbol");function I5({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&N5(e);function a(s,u){let l;const c={...v.useContext(x0),...s,layoutId:O5(s)},{isStatic:d}=c,f=R5(s),p=r(s,d);if(!d&&w0){D5();const m=L5(c);l=m.MeasureLayout,f.visualElement=S5(i,p,c,t,m.ProjectionNode)}return E.jsxs(Jd.Provider,{value:f,children:[l&&f.visualElement?E.jsx(l,{visualElement:f.visualElement,...c}):null,n(i,s,A5(p,f.visualElement,u),p,d,f.visualElement)]})}const o=v.forwardRef(a);return o[P5]=i,o}function O5({layoutId:e}){const t=v.useContext(d0).id;return t&&e!==void 0?t+"-"+e:e}function D5(e,t){v.useContext(z2).strict}function L5(e){const{drag:t,layout:n}=os;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const M5=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function b0(e){return typeof e!="string"||e.includes("-")?!1:!!(M5.indexOf(e)>-1||/[A-Z]/u.test(e))}function q2(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const G2=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function K2(e,t,n,r){q2(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(G2.has(i)?i:Wd(i),t.attrs[i])}function X2(e,{layout:t,layoutId:n}){return Qi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Qd[e]||e==="opacity")}function E0(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(en(i[o])||t.style&&en(t.style[o])||X2(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(a[o]=i[o]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),a}function Q2(e,t,n){const r=E0(e,t,n);for(const i in e)if(en(e[i])||en(t[i])){const a=$u.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}function T0(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}function F5(e){if(Qi.has(e))return"transform";if(yT.has(e))return Wd(e)}function B5({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,a,o,s){const u={latestValues:j5(i,a,o,s?!1:e,t),renderState:n()};return r&&(u.mount=l=>r(i,l,u)),u}const Z2=e=>(t,n)=>{const r=v.useContext(Jd),i=v.useContext(Kd),a=()=>B5(e,t,r,i,n);return n?a():T0(a)};function J2(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const a=Tg(e,r[i]);if(a){const{transitionEnd:o,transition:s,...u}=a;n(u,o)}}}function j5(e,t,n,r,i){var a;const o={},s=new Set,u=r&&((a=e.style)===null||a===void 0?void 0:a.willChange)===void 0,l=i(e,{});for(const w in l)o[w]=Zd(l[w]);let{initial:c,animate:d}=e;const f=ef(e),p=$2(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const y=m?d:c;return y&&typeof y!="boolean"&&!zu(y)&&J2(e,y,(w,g)=>{for(const x in w){let b=w[x];if(Array.isArray(b)){const T=m?b.length-1:0;b=b[T]}b!==null&&(o[x]=b)}for(const x in g)o[x]=g[x]}),u&&(d&&c!==!1&&!zu(d)&&J2(e,d,w=>{for(const g in w){const x=F5(g);x&&s.add(x)}}),s.size&&(o.willChange=Array.from(s).join(","))),o}const _0=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),e_=()=>({..._0(),attrs:{}}),t_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,U5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},H5=$u.length;function z5(e,t,n){let r="",i=!0;for(let a=0;a<H5;a++){const o=$u[a],s=e[o];if(s===void 0)continue;let u=!0;if(typeof s=="number"?u=s===(o.startsWith("scale")?1:0):u=parseFloat(s)===0,!u||n){const l=t_(s,Ug[o]);if(!u){i=!1;const c=U5[o]||o;r+=`${c}(${l}) `}n&&(t[o]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function S0(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const u in t){const l=t[u];if(Qi.has(u)){o=!0;continue}else if(ME(u)){i[u]=l;continue}else{const c=t_(l,Ug[u]);u.startsWith("origin")?(s=!0,a[u]=c):r[u]=c}}if(t.transform||(o||n?r.transform=z5(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:u="50%",originY:l="50%",originZ:c=0}=a;r.transformOrigin=`${u} ${l} ${c}`}}function n_(e,t,n){return typeof e=="string"?e:ye.transform(t+n*e)}function V5(e,t,n){const r=n_(t,e.x,e.width),i=n_(n,e.y,e.height);return`${r} ${i}`}const $5={offset:"stroke-dashoffset",array:"stroke-dasharray"},W5={offset:"strokeDashoffset",array:"strokeDasharray"};function Y5(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?$5:W5;e[a.offset]=ye.transform(-r);const o=ye.transform(t),s=ye.transform(n);e[a.array]=`${o} ${s}`}function C0(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:u=0,...l},c,d){if(S0(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=V5(m,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&Y5(f,o,s,u,!1)}const A0=e=>typeof e=="string"&&e.toLowerCase()==="svg",q5={useVisualState:Z2({scrapeMotionValuesFromProps:Q2,createRenderState:e_,onMount:(e,t,{renderState:n,latestValues:r})=>{Xe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Xe.render(()=>{C0(n,r,A0(t.tagName),e.transformTemplate),K2(t,n)})}})},G5={useVisualState:Z2({applyWillChange:!0,scrapeMotionValuesFromProps:E0,createRenderState:_0})};function r_(e,t,n){for(const r in t)!en(t[r])&&!X2(r,n)&&(e[r]=t[r])}function K5({transformTemplate:e},t){return v.useMemo(()=>{const n=_0();return S0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function X5(e,t){const n=e.style||{},r={};return r_(r,n,e),Object.assign(r,K5(e,t)),r}function Q5(e,t){const n={},r=X5(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Z5=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function tf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Z5.has(e)}let i_=e=>!tf(e);function J5(e){e&&(i_=t=>t.startsWith("on")?!tf(t):e(t))}try{J5(require("@emotion/is-prop-valid").default)}catch{}function e8(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(i_(i)||n===!0&&tf(i)||!t&&!tf(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function t8(e,t,n,r){const i=v.useMemo(()=>{const a=e_();return C0(a,t,A0(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};r_(a,e.style,e),i.style={...a,...i.style}}return i}function n8(e=!1){return(n,r,i,{latestValues:a},o)=>{const u=(b0(n)?t8:Q5)(r,a,o,n),l=e8(r,typeof n=="string",e),c=n!==v.Fragment?{...l,...u,ref:i}:{},{children:d}=r,f=v.useMemo(()=>en(d)?d.get():d,[d]);return v.createElement(n,{...c,children:f})}}function r8(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...b0(r)?q5:G5,preloadedFeatures:e,useRender:n8(i),createVisualElement:t,Component:r};return I5(o)}}const k0={current:null},a_={current:!1};function i8(){if(a_.current=!0,!!w0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>k0.current=e.matches;e.addListener(t),t()}else k0.current=!1}function a8(e,t,n){for(const r in t){const i=t[r],a=n[r];if(en(i))e.addValue(r,i);else if(en(a))e.addValue(r,Qu(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Qu(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const o_=new WeakMap,o8=[...VE,Jt,ta],s8=e=>o8.find(zE(e)),s_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class u8{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Dg,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Ur.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Xe.render(this.render,!1,!0))};const{latestValues:u,renderState:l}=o;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=ef(n),this.isVariantNode=$2(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];u[f]!==void 0&&en(p)&&p.set(u[f],!1)}}mount(t){this.current=t,o_.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),a_.current||i8(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:k0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){o_.delete(this.current),this.projection&&this.projection.unmount(),Zi(this.notifyUpdate),Zi(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Qi.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Xe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in os){const n=os[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Tt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<s_.length;r++){const i=s_[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=a8(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Qu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(DE(i)||OE(i))?i=parseFloat(i):!s8(i)&&ta.test(n)&&(i=eT(t,n)),this.setBaseTarget(t,en(i)?i.get():i)),en(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=Tg(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!en(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new n0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class u_ extends u8{constructor(){super(...arguments),this.KeyframeResolver=tT}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function l8(e){return window.getComputedStyle(e)}class c8 extends u_{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=q2}readValueFromInstance(t,n){if(Qi.has(n)){const r=Hg(n);return r&&r.default||0}else{const r=l8(t),i=(ME(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return i2(t,n)}build(t,n,r){S0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return E0(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;en(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class d8 extends u_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Tt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qi.has(n)){const r=Hg(n);return r&&r.default||0}return n=G2.has(n)?n:Wd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Q2(t,n,r)}build(t,n,r){C0(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){K2(t,n,r,i)}mount(t){this.isSVGTag=A0(t.tagName),super.mount(t)}}const f8=(e,t)=>b0(e)?new d8(t):new c8(t,{allowProjection:e!==v.Fragment}),p8=r8({...tM,...T5,...f5,..._5},f8),ss=K6(p8);class h8 extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function m8({children:e,isPresent:t}){const n=v.useId(),r=v.useRef(null),i=v.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=v.useContext(x0);return v.useInsertionEffect(()=>{const{width:o,height:s,top:u,left:l}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return a&&(c.nonce=a),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
40
+ `+a.stack}return{value:e,source:t,stack:i,digest:null}}function $m(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Wm(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var JD=typeof WeakMap=="function"?WeakMap:Map;function gb(e,t,n){n=ui(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){wd||(wd=!0,og=r),Wm(e,t)},n}function yb(e,t,n){n=ui(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Wm(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){Wm(e,t),typeof r!="function"&&(Yi===null?Yi=new Set([this]):Yi.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function vb(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new JD;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=p6.bind(null,e,t,n),t.then(e,e))}function xb(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function wb(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ui(-1,1),t.tag=2,$i(n,t,1))),n.lanes|=1),e)}var e6=ni.ReactCurrentOwner,wn=!1;function dn(e,t,n,r){t.child=e===null?Uw(t,null,n,r):zo(t,e.child,n,r)}function bb(e,t,n,r,i){n=n.render;var a=t.ref;return $o(t,i),r=Mm(e,t,n,r,a,i),n=Fm(),e!==null&&!wn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,li(e,t,i)):(ot&&n&&xm(t),t.flags|=1,dn(e,t,r,i),t.child)}function Eb(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!pg(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Tb(e,t,a,r,i)):(e=Cd(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:wu,n(o,r)&&e.ref===t.ref)return li(e,t,i)}return t.flags|=1,e=Xi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Tb(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(wu(a,r)&&e.ref===t.ref)if(wn=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(wn=!0);else return t.lanes=e.lanes,li(e,t,i)}return Ym(e,t,n,r,i)}function _b(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},et(Go,Bn),Bn|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,et(Go,Bn),Bn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,et(Go,Bn),Bn|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,et(Go,Bn),Bn|=r;return dn(e,t,i,n),t.child}function Sb(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ym(e,t,n,r,i){var a=xn(n)?Fa:Gt.current;return a=Bo(t,a),$o(t,i),n=Mm(e,t,n,r,a,i),r=Fm(),e!==null&&!wn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,li(e,t,i)):(ot&&r&&xm(t),t.flags|=1,dn(e,t,n,i),t.child)}function Cb(e,t,n,r,i){if(xn(n)){var a=!0;Qc(t)}else a=!1;if($o(t,i),t.stateNode===null)md(e,t),hb(t,n,r),Vm(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var u=o.context,l=n.contextType;typeof l=="object"&&l!==null?l=Zn(l):(l=xn(n)?Fa:Gt.current,l=Bo(t,l));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==r||u!==l)&&mb(t,o,r,l),Vi=!1;var f=t.memoizedState;o.state=f,od(t,r,o,i),u=t.memoizedState,s!==r||f!==u||vn.current||Vi?(typeof c=="function"&&(zm(t,n,c,r),u=t.memoizedState),(s=Vi||pb(t,n,s,r,f,u,l))?(d||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.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=l,r=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,zw(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:vr(t.type,s),o.props=l,d=t.pendingProps,f=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=Zn(u):(u=xn(n)?Fa:Gt.current,u=Bo(t,u));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==d||f!==u)&&mb(t,o,r,u),Vi=!1,f=t.memoizedState,o.state=f,od(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||vn.current||Vi?(typeof p=="function"&&(zm(t,n,p,r),m=t.memoizedState),(l=Vi||pb(t,n,l,r,f,m,u)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,u)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=u,r=l):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return qm(e,t,n,r,a,i)}function qm(e,t,n,r,i,a){Sb(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Pw(t,n,!1),li(e,t,a);r=t.stateNode,e6.current=t;var s=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=zo(t,e.child,null,a),t.child=zo(t,null,s,a)):dn(e,t,s,a),t.memoizedState=r.state,i&&Pw(t,n,!0),t.child}function Ab(e){var t=e.stateNode;t.pendingContext?Rw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Rw(e,t.context,!1),Nm(e,t.containerInfo)}function kb(e,t,n,r,i){return Ho(),Tm(i),t.flags|=256,dn(e,t,n,r),t.child}var Gm={dehydrated:null,treeContext:null,retryLane:0};function Km(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rb(e,t,n){var r=t.pendingProps,i=dt.current,a=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),et(dt,i&1),e===null)return Em(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:"hidden",children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Ad(o,r,0,null),e=qa(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Km(n),t.memoizedState=Gm,e):Xm(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return t6(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Xi(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=Xi(s,a):(a=qa(a,o,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?Km(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Gm,r}return a=e.child,e=a.sibling,r=Xi(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Xm(e,t){return t=Ad({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function hd(e,t,n,r){return r!==null&&Tm(r),zo(t,e.child,null,n),e=Xm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function t6(e,t,n,r,i,a,o){if(n)return t.flags&256?(t.flags&=-257,r=$m(Error(Q(422))),hd(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Ad({mode:"visible",children:r.children},i,0,null),a=qa(a,i,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&zo(t,e.child,null,o),t.child.memoizedState=Km(o),t.memoizedState=Gm,a);if(!(t.mode&1))return hd(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,a=Error(Q(419)),r=$m(a,r,void 0),hd(e,t,o,r)}if(s=(o&e.childLanes)!==0,wn||s){if(r=Lt,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,si(e,i),br(r,e,i,-1))}return fg(),r=$m(Error(Q(421))),hd(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=h6.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Fn=ji(i.nextSibling),Mn=t,ot=!0,yr=null,e!==null&&(Xn[Qn++]=ai,Xn[Qn++]=oi,Xn[Qn++]=Ba,ai=e.id,oi=e.overflow,Ba=t),t=Xm(t,r.children),t.flags|=4096,t)}function Nb(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Am(e.return,t,n)}function Qm(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Pb(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(dn(e,t,r.children,n),r=dt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nb(e,n,t);else if(e.tag===19)Nb(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(et(dt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&sd(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Qm(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&sd(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Qm(t,!0,n,null,a);break;case"together":Qm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function md(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function li(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Va|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=Xi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function n6(e,t,n){switch(t.tag){case 3:Ab(t),Ho();break;case 5:Ww(t);break;case 1:xn(t.type)&&Qc(t);break;case 4:Nm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;et(rd,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(et(dt,dt.current&1),t.flags|=128,null):n&t.child.childLanes?Rb(e,t,n):(et(dt,dt.current&1),e=li(e,t,n),e!==null?e.sibling:null);et(dt,dt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Pb(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),et(dt,dt.current),r)break;return null;case 22:case 23:return t.lanes=0,_b(e,t,n)}return li(e,t,n)}var Ib,Zm,Ob,Db;Ib=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Zm=function(){},Ob=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ha(Mr.current);var a=null;switch(n){case"input":i=Ah(e,i),r=Ah(e,r),a=[];break;case"select":i=ct({},i,{value:void 0}),r=ct({},r,{value:void 0}),a=[];break;case"textarea":i=Nh(e,i),r=Nh(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Gc)}Ih(n,r);var o;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Js.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in r){var u=r[l];if(s=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&u!==s&&(u!=null||s!=null))if(l==="style")if(s){for(o in s)!s.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&s[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(a||(a=[]),a.push(l,n)),n=u;else l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(a=a||[]).push(l,u)):l==="children"?typeof u!="string"&&typeof u!="number"||(a=a||[]).push(l,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(Js.hasOwnProperty(l)?(u!=null&&l==="onScroll"&&nt("scroll",e),a||s===u||(a=[])):(a=a||[]).push(l,u))}n&&(a=a||[]).push("style",n);var l=a;(t.updateQueue=l)&&(t.flags|=4)}},Db=function(e,t,n,r){n!==r&&(t.flags|=4)};function Lu(e,t){if(!ot)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function r6(e,t,n){var r=t.pendingProps;switch(wm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(t),null;case 1:return xn(t.type)&&Xc(),Xt(t),null;case 3:return r=t.stateNode,Wo(),rt(vn),rt(Gt),Om(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(td(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yr!==null&&(lg(yr),yr=null))),Zm(e,t),Xt(t),null;case 5:Pm(t);var i=Ha(Nu.current);if(n=t.type,e!==null&&t.stateNode!=null)Ob(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return Xt(t),null}if(e=Ha(Mr.current),td(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Lr]=t,r[Su]=a,e=(t.mode&1)!==0,n){case"dialog":nt("cancel",r),nt("close",r);break;case"iframe":case"object":case"embed":nt("load",r);break;case"video":case"audio":for(i=0;i<Eu.length;i++)nt(Eu[i],r);break;case"source":nt("error",r);break;case"img":case"image":case"link":nt("error",r),nt("load",r);break;case"details":nt("toggle",r);break;case"input":hx(r,a),nt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},nt("invalid",r);break;case"textarea":yx(r,a),nt("invalid",r)}Ih(n,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var s=a[o];o==="children"?typeof s=="string"?r.textContent!==s&&(a.suppressHydrationWarning!==!0&&qc(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&qc(r.textContent,s,e),i=["children",""+s]):Js.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&nt("scroll",r)}switch(n){case"input":_c(r),gx(r,a,!0);break;case"textarea":_c(r),xx(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Gc)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=wx(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Lr]=t,e[Su]=r,Ib(e,t,!1,!1),t.stateNode=e;e:{switch(o=Oh(n,r),n){case"dialog":nt("cancel",e),nt("close",e),i=r;break;case"iframe":case"object":case"embed":nt("load",e),i=r;break;case"video":case"audio":for(i=0;i<Eu.length;i++)nt(Eu[i],e);i=r;break;case"source":nt("error",e),i=r;break;case"img":case"image":case"link":nt("error",e),nt("load",e),i=r;break;case"details":nt("toggle",e),i=r;break;case"input":hx(e,r),i=Ah(e,r),nt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ct({},r,{value:void 0}),nt("invalid",e);break;case"textarea":yx(e,r),i=Nh(e,r),nt("invalid",e);break;default:i=r}Ih(n,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var u=s[a];a==="style"?Tx(e,u):a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&bx(e,u)):a==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&ru(e,u):typeof u=="number"&&ru(e,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Js.hasOwnProperty(a)?u!=null&&a==="onScroll"&&nt("scroll",e):u!=null&&gh(e,a,u,o))}switch(n){case"input":_c(e),gx(e,r,!1);break;case"textarea":_c(e),xx(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ii(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?Co(e,!!r.multiple,a,!1):r.defaultValue!=null&&Co(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Gc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Xt(t),null;case 6:if(e&&t.stateNode!=null)Db(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=Ha(Nu.current),Ha(Mr.current),td(t)){if(r=t.stateNode,n=t.memoizedProps,r[Lr]=t,(a=r.nodeValue!==n)&&(e=Mn,e!==null))switch(e.tag){case 3:qc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qc(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Lr]=t,t.stateNode=r}return Xt(t),null;case 13:if(rt(dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ot&&Fn!==null&&t.mode&1&&!(t.flags&128))Fw(),Ho(),t.flags|=98560,a=!1;else if(a=td(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(Q(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Q(317));a[Lr]=t}else Ho(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xt(t),a=!1}else yr!==null&&(lg(yr),yr=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||dt.current&1?It===0&&(It=3):fg())),t.updateQueue!==null&&(t.flags|=4),Xt(t),null);case 4:return Wo(),Zm(e,t),e===null&&Tu(t.stateNode.containerInfo),Xt(t),null;case 10:return Cm(t.type._context),Xt(t),null;case 17:return xn(t.type)&&Xc(),Xt(t),null;case 19:if(rt(dt),a=t.memoizedState,a===null)return Xt(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)Lu(a,!1);else{if(It!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=sd(e),o!==null){for(t.flags|=128,Lu(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return et(dt,dt.current&1|2),t.child}e=e.sibling}a.tail!==null&&Et()>Ko&&(t.flags|=128,r=!0,Lu(a,!1),t.lanes=4194304)}else{if(!r)if(e=sd(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Lu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!ot)return Xt(t),null}else 2*Et()-a.renderingStartTime>Ko&&n!==1073741824&&(t.flags|=128,r=!0,Lu(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Et(),t.sibling=null,n=dt.current,et(dt,r?n&1|2:n&1),t):(Xt(t),null);case 22:case 23:return dg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Bn&1073741824&&(Xt(t),t.subtreeFlags&6&&(t.flags|=8192)):Xt(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function i6(e,t){switch(wm(t),t.tag){case 1:return xn(t.type)&&Xc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wo(),rt(vn),rt(Gt),Om(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Pm(t),null;case 13:if(rt(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));Ho()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(dt),null;case 4:return Wo(),null;case 10:return Cm(t.type._context),null;case 22:case 23:return dg(),null;case 24:return null;default:return null}}var gd=!1,Qt=!1,a6=typeof WeakSet=="function"?WeakSet:Set,ue=null;function qo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){yt(e,t,r)}else n.current=null}function Jm(e,t,n){try{n()}catch(r){yt(e,t,r)}}var Lb=!1;function o6(e,t){if(dm=Mc,e=pw(),rm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,s=-1,u=-1,l=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=o+i),d!==a||r!==0&&d.nodeType!==3||(u=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++l===i&&(s=o),f===a&&++c===r&&(u=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(fm={focusedElem:e,selectionRange:n},Mc=!1,ue=t;ue!==null;)if(t=ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ue=e;else for(;ue!==null;){t=ue;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,w=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:vr(t.type,y),w);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(T){yt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,ue=e;break}ue=t.return}return m=Lb,Lb=!1,m}function Mu(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Jm(t,n,a)}i=i.next}while(i!==r)}}function yd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function eg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Mb(e){var t=e.alternate;t!==null&&(e.alternate=null,Mb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lr],delete t[Su],delete t[gm],delete t[zD],delete t[VD])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fb(e){return e.tag===5||e.tag===3||e.tag===4}function Bb(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gc));else if(r!==4&&(e=e.child,e!==null))for(tg(e,t,n),e=e.sibling;e!==null;)tg(e,t,n),e=e.sibling}function ng(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ng(e,t,n),e=e.sibling;e!==null;)ng(e,t,n),e=e.sibling}var zt=null,xr=!1;function Wi(e,t,n){for(n=n.child;n!==null;)jb(e,t,n),n=n.sibling}function jb(e,t,n){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(Nc,n)}catch{}switch(n.tag){case 5:Qt||qo(n,t);case 6:var r=zt,i=xr;zt=null,Wi(e,t,n),zt=r,xr=i,zt!==null&&(xr?(e=zt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):zt.removeChild(n.stateNode));break;case 18:zt!==null&&(xr?(e=zt,n=n.stateNode,e.nodeType===8?mm(e.parentNode,n):e.nodeType===1&&mm(e,n),hu(e)):mm(zt,n.stateNode));break;case 4:r=zt,i=xr,zt=n.stateNode.containerInfo,xr=!0,Wi(e,t,n),zt=r,xr=i;break;case 0:case 11:case 14:case 15:if(!Qt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Jm(n,t,o),i=i.next}while(i!==r)}Wi(e,t,n);break;case 1:if(!Qt&&(qo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){yt(n,t,s)}Wi(e,t,n);break;case 21:Wi(e,t,n);break;case 22:n.mode&1?(Qt=(r=Qt)||n.memoizedState!==null,Wi(e,t,n),Qt=r):Wi(e,t,n);break;default:Wi(e,t,n)}}function Ub(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new a6),t.forEach(function(r){var i=m6.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function wr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:zt=s.stateNode,xr=!1;break e;case 3:zt=s.stateNode.containerInfo,xr=!0;break e;case 4:zt=s.stateNode.containerInfo,xr=!0;break e}s=s.return}if(zt===null)throw Error(Q(160));jb(a,o,i),zt=null,xr=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(l){yt(i,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Hb(t,e),t=t.sibling}function Hb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wr(t,e),Br(e),r&4){try{Mu(3,e,e.return),yd(3,e)}catch(y){yt(e,e.return,y)}try{Mu(5,e,e.return)}catch(y){yt(e,e.return,y)}}break;case 1:wr(t,e),Br(e),r&512&&n!==null&&qo(n,n.return);break;case 5:if(wr(t,e),Br(e),r&512&&n!==null&&qo(n,n.return),e.flags&32){var i=e.stateNode;try{ru(i,"")}catch(y){yt(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&mx(i,a),Oh(s,o);var l=Oh(s,a);for(o=0;o<u.length;o+=2){var c=u[o],d=u[o+1];c==="style"?Tx(i,d):c==="dangerouslySetInnerHTML"?bx(i,d):c==="children"?ru(i,d):gh(i,c,d,l)}switch(s){case"input":kh(i,a);break;case"textarea":vx(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?Co(i,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?Co(i,!!a.multiple,a.defaultValue,!0):Co(i,!!a.multiple,a.multiple?[]:"",!1))}i[Su]=a}catch(y){yt(e,e.return,y)}}break;case 6:if(wr(t,e),Br(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(y){yt(e,e.return,y)}}break;case 3:if(wr(t,e),Br(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{hu(t.containerInfo)}catch(y){yt(e,e.return,y)}break;case 4:wr(t,e),Br(e);break;case 13:wr(t,e),Br(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(ag=Et())),r&4&&Ub(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Qt=(l=Qt)||c,wr(t,e),Qt=l):wr(t,e),Br(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!c&&e.mode&1)for(ue=e,c=e.child;c!==null;){for(d=ue=c;ue!==null;){switch(f=ue,p=f.child,f.tag){case 0:case 11:case 14:case 15:Mu(4,f,f.return);break;case 1:qo(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(y){yt(r,n,y)}}break;case 5:qo(f,f.return);break;case 22:if(f.memoizedState!==null){$b(d);continue}}p!==null?(p.return=f,ue=p):$b(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,l?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,u=d.memoizedProps.style,o=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Ex("display",o))}catch(y){yt(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(y){yt(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:wr(t,e),Br(e),r&4&&Ub(e);break;case 21:break;default:wr(t,e),Br(e)}}function Br(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fb(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ru(i,""),r.flags&=-33);var a=Bb(e);ng(e,a,i);break;case 3:case 4:var o=r.stateNode.containerInfo,s=Bb(e);tg(e,s,o);break;default:throw Error(Q(161))}}catch(u){yt(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function s6(e,t,n){ue=e,zb(e)}function zb(e,t,n){for(var r=(e.mode&1)!==0;ue!==null;){var i=ue,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||gd;if(!o){var s=i.alternate,u=s!==null&&s.memoizedState!==null||Qt;s=gd;var l=Qt;if(gd=o,(Qt=u)&&!l)for(ue=i;ue!==null;)o=ue,u=o.child,o.tag===22&&o.memoizedState!==null?Wb(i):u!==null?(u.return=o,ue=u):Wb(i);for(;a!==null;)ue=a,zb(a),a=a.sibling;ue=i,gd=s,Qt=l}Vb(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,ue=a):Vb(e)}}function Vb(e){for(;ue!==null;){var t=ue;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Qt||yd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Qt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:vr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&$w(t,a,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}$w(t,o,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var c=l.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&hu(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}Qt||t.flags&512&&eg(t)}catch(f){yt(t,t.return,f)}}if(t===e){ue=null;break}if(n=t.sibling,n!==null){n.return=t.return,ue=n;break}ue=t.return}}function $b(e){for(;ue!==null;){var t=ue;if(t===e){ue=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ue=n;break}ue=t.return}}function Wb(e){for(;ue!==null;){var t=ue;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{yd(4,t)}catch(u){yt(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){yt(t,i,u)}}var a=t.return;try{eg(t)}catch(u){yt(t,a,u)}break;case 5:var o=t.return;try{eg(t)}catch(u){yt(t,o,u)}}}catch(u){yt(t,t.return,u)}if(t===e){ue=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ue=s;break}ue=t.return}}var u6=Math.ceil,vd=ni.ReactCurrentDispatcher,rg=ni.ReactCurrentOwner,er=ni.ReactCurrentBatchConfig,Ue=0,Lt=null,At=null,Vt=0,Bn=0,Go=Ui(0),It=0,Fu=null,Va=0,xd=0,ig=0,Bu=null,bn=null,ag=0,Ko=1/0,ci=null,wd=!1,og=null,Yi=null,bd=!1,qi=null,Ed=0,ju=0,sg=null,Td=-1,_d=0;function fn(){return Ue&6?Et():Td!==-1?Td:Td=Et()}function Gi(e){return e.mode&1?Ue&2&&Vt!==0?Vt&-Vt:WD.transition!==null?(_d===0&&(_d=Bx()),_d):(e=qe,e!==0||(e=window.event,e=e===void 0?16:qx(e.type)),e):1}function br(e,t,n,r){if(50<ju)throw ju=0,sg=null,Error(Q(185));lu(e,n,r),(!(Ue&2)||e!==Lt)&&(e===Lt&&(!(Ue&2)&&(xd|=n),It===4&&Ki(e,Vt)),En(e,r),n===1&&Ue===0&&!(t.mode&1)&&(Ko=Et()+500,Zc&&zi()))}function En(e,t){var n=e.callbackNode;WO(e,t);var r=Oc(e,e===Lt?Vt:0);if(r===0)n!==null&&Lx(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Lx(n),t===1)e.tag===0?$D(qb.bind(null,e)):Iw(qb.bind(null,e)),UD(function(){!(Ue&6)&&zi()}),n=null;else{switch(jx(r)){case 1:n=Uh;break;case 4:n=Mx;break;case 16:n=Rc;break;case 536870912:n=Fx;break;default:n=Rc}n=tE(n,Yb.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Yb(e,t){if(Td=-1,_d=0,Ue&6)throw Error(Q(327));var n=e.callbackNode;if(Xo()&&e.callbackNode!==n)return null;var r=Oc(e,e===Lt?Vt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Sd(e,r);else{t=r;var i=Ue;Ue|=2;var a=Kb();(Lt!==e||Vt!==t)&&(ci=null,Ko=Et()+500,Wa(e,t));do try{d6();break}catch(s){Gb(e,s)}while(!0);Sm(),vd.current=a,Ue=i,At!==null?t=0:(Lt=null,Vt=0,t=It)}if(t!==0){if(t===2&&(i=Hh(e),i!==0&&(r=i,t=ug(e,i))),t===1)throw n=Fu,Wa(e,0),Ki(e,r),En(e,Et()),n;if(t===6)Ki(e,r);else{if(i=e.current.alternate,!(r&30)&&!l6(i)&&(t=Sd(e,r),t===2&&(a=Hh(e),a!==0&&(r=a,t=ug(e,a))),t===1))throw n=Fu,Wa(e,0),Ki(e,r),En(e,Et()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:Ya(e,bn,ci);break;case 3:if(Ki(e,r),(r&130023424)===r&&(t=ag+500-Et(),10<t)){if(Oc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){fn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=hm(Ya.bind(null,e,bn,ci),t);break}Ya(e,bn,ci);break;case 4:if(Ki(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-mr(r);a=1<<o,o=t[o],o>i&&(i=o),r&=~a}if(r=i,r=Et()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*u6(r/1960))-r,10<r){e.timeoutHandle=hm(Ya.bind(null,e,bn,ci),r);break}Ya(e,bn,ci);break;case 5:Ya(e,bn,ci);break;default:throw Error(Q(329))}}}return En(e,Et()),e.callbackNode===n?Yb.bind(null,e):null}function ug(e,t){var n=Bu;return e.current.memoizedState.isDehydrated&&(Wa(e,t).flags|=256),e=Sd(e,t),e!==2&&(t=bn,bn=n,t!==null&&lg(t)),e}function lg(e){bn===null?bn=e:bn.push.apply(bn,e)}function l6(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!gr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ki(e,t){for(t&=~ig,t&=~xd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-mr(t),r=1<<n;e[n]=-1,t&=~r}}function qb(e){if(Ue&6)throw Error(Q(327));Xo();var t=Oc(e,0);if(!(t&1))return En(e,Et()),null;var n=Sd(e,t);if(e.tag!==0&&n===2){var r=Hh(e);r!==0&&(t=r,n=ug(e,r))}if(n===1)throw n=Fu,Wa(e,0),Ki(e,t),En(e,Et()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ya(e,bn,ci),En(e,Et()),null}function cg(e,t){var n=Ue;Ue|=1;try{return e(t)}finally{Ue=n,Ue===0&&(Ko=Et()+500,Zc&&zi())}}function $a(e){qi!==null&&qi.tag===0&&!(Ue&6)&&Xo();var t=Ue;Ue|=1;var n=er.transition,r=qe;try{if(er.transition=null,qe=1,e)return e()}finally{qe=r,er.transition=n,Ue=t,!(Ue&6)&&zi()}}function dg(){Bn=Go.current,rt(Go)}function Wa(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,jD(n)),At!==null)for(n=At.return;n!==null;){var r=n;switch(wm(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xc();break;case 3:Wo(),rt(vn),rt(Gt),Om();break;case 5:Pm(r);break;case 4:Wo();break;case 13:rt(dt);break;case 19:rt(dt);break;case 10:Cm(r.type._context);break;case 22:case 23:dg()}n=n.return}if(Lt=e,At=e=Xi(e.current,null),Vt=Bn=t,It=0,Fu=null,ig=xd=Va=0,bn=Bu=null,Ua!==null){for(t=0;t<Ua.length;t++)if(n=Ua[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}Ua=null}return e}function Gb(e,t){do{var n=At;try{if(Sm(),ud.current=fd,ld){for(var r=ft.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ld=!1}if(za=0,Dt=Pt=ft=null,Pu=!1,Iu=0,rg.current=null,n===null||n.return===null){It=1,Fu=t,At=null;break}e:{var a=e,o=n.return,s=n,u=t;if(t=Vt,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var l=u,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=xb(o);if(p!==null){p.flags&=-257,wb(p,o,s,a,t),p.mode&1&&vb(a,l,t),t=p,u=l;var m=t.updateQueue;if(m===null){var y=new Set;y.add(u),t.updateQueue=y}else m.add(u);break e}else{if(!(t&1)){vb(a,l,t),fg();break e}u=Error(Q(426))}}else if(ot&&s.mode&1){var w=xb(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),wb(w,o,s,a,t),Tm(Yo(u,s));break e}}a=u=Yo(u,s),It!==4&&(It=2),Bu===null?Bu=[a]:Bu.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var g=gb(a,u,t);Vw(a,g);break e;case 1:s=u;var x=a.type,b=a.stateNode;if(!(a.flags&128)&&(typeof x.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Yi===null||!Yi.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t;var T=yb(a,s,t);Vw(a,T);break e}}a=a.return}while(a!==null)}Qb(n)}catch(S){t=S,At===n&&n!==null&&(At=n=n.return);continue}break}while(!0)}function Kb(){var e=vd.current;return vd.current=fd,e===null?fd:e}function fg(){(It===0||It===3||It===2)&&(It=4),Lt===null||!(Va&268435455)&&!(xd&268435455)||Ki(Lt,Vt)}function Sd(e,t){var n=Ue;Ue|=2;var r=Kb();(Lt!==e||Vt!==t)&&(ci=null,Wa(e,t));do try{c6();break}catch(i){Gb(e,i)}while(!0);if(Sm(),Ue=n,vd.current=r,At!==null)throw Error(Q(261));return Lt=null,Vt=0,It}function c6(){for(;At!==null;)Xb(At)}function d6(){for(;At!==null&&!MO();)Xb(At)}function Xb(e){var t=eE(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,t===null?Qb(e):At=t,rg.current=null}function Qb(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=i6(n,t),n!==null){n.flags&=32767,At=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{It=6,At=null;return}}else if(n=r6(n,t,Bn),n!==null){At=n;return}if(t=t.sibling,t!==null){At=t;return}At=t=e}while(t!==null);It===0&&(It=5)}function Ya(e,t,n){var r=qe,i=er.transition;try{er.transition=null,qe=1,f6(e,t,n,r)}finally{er.transition=i,qe=r}return null}function f6(e,t,n,r){do Xo();while(qi!==null);if(Ue&6)throw Error(Q(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Q(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(YO(e,a),e===Lt&&(At=Lt=null,Vt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||bd||(bd=!0,tE(Rc,function(){return Xo(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=er.transition,er.transition=null;var o=qe;qe=1;var s=Ue;Ue|=4,rg.current=null,o6(e,n),Hb(n,e),ID(fm),Mc=!!dm,fm=dm=null,e.current=n,s6(n),FO(),Ue=s,qe=o,er.transition=a}else e.current=n;if(bd&&(bd=!1,qi=e,Ed=i),a=e.pendingLanes,a===0&&(Yi=null),UO(n.stateNode),En(e,Et()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(wd)throw wd=!1,e=og,og=null,e;return Ed&1&&e.tag!==0&&Xo(),a=e.pendingLanes,a&1?e===sg?ju++:(ju=0,sg=e):ju=0,zi(),null}function Xo(){if(qi!==null){var e=jx(Ed),t=er.transition,n=qe;try{if(er.transition=null,qe=16>e?16:e,qi===null)var r=!1;else{if(e=qi,qi=null,Ed=0,Ue&6)throw Error(Q(331));var i=Ue;for(Ue|=4,ue=e.current;ue!==null;){var a=ue,o=a.child;if(ue.flags&16){var s=a.deletions;if(s!==null){for(var u=0;u<s.length;u++){var l=s[u];for(ue=l;ue!==null;){var c=ue;switch(c.tag){case 0:case 11:case 15:Mu(8,c,a)}var d=c.child;if(d!==null)d.return=c,ue=d;else for(;ue!==null;){c=ue;var f=c.sibling,p=c.return;if(Mb(c),c===l){ue=null;break}if(f!==null){f.return=p,ue=f;break}ue=p}}}var m=a.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var w=y.sibling;y.sibling=null,y=w}while(y!==null)}}ue=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,ue=o;else e:for(;ue!==null;){if(a=ue,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Mu(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,ue=g;break e}ue=a.return}}var x=e.current;for(ue=x;ue!==null;){o=ue;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,ue=b;else e:for(o=x;ue!==null;){if(s=ue,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:yd(9,s)}}catch(S){yt(s,s.return,S)}if(s===o){ue=null;break e}var T=s.sibling;if(T!==null){T.return=s.return,ue=T;break e}ue=s.return}}if(Ue=i,zi(),Dr&&typeof Dr.onPostCommitFiberRoot=="function")try{Dr.onPostCommitFiberRoot(Nc,e)}catch{}r=!0}return r}finally{qe=n,er.transition=t}}return!1}function Zb(e,t,n){t=Yo(n,t),t=gb(e,t,1),e=$i(e,t,1),t=fn(),e!==null&&(lu(e,1,t),En(e,t))}function yt(e,t,n){if(e.tag===3)Zb(e,e,n);else for(;t!==null;){if(t.tag===3){Zb(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yi===null||!Yi.has(r))){e=Yo(n,e),e=yb(t,e,1),t=$i(t,e,1),e=fn(),t!==null&&(lu(t,1,e),En(t,e));break}}t=t.return}}function p6(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=fn(),e.pingedLanes|=e.suspendedLanes&n,Lt===e&&(Vt&n)===n&&(It===4||It===3&&(Vt&130023424)===Vt&&500>Et()-ag?Wa(e,0):ig|=n),En(e,t)}function Jb(e,t){t===0&&(e.mode&1?(t=Ic,Ic<<=1,!(Ic&130023424)&&(Ic=4194304)):t=1);var n=fn();e=si(e,t),e!==null&&(lu(e,t,n),En(e,n))}function h6(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jb(e,n)}function m6(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(t),Jb(e,n)}var eE;eE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||vn.current)wn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return wn=!1,n6(e,t,n);wn=!!(e.flags&131072)}else wn=!1,ot&&t.flags&1048576&&Ow(t,ed,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;md(e,t),e=t.pendingProps;var i=Bo(t,Gt.current);$o(t,n),i=Mm(null,t,r,e,i,n);var a=Fm();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xn(r)?(a=!0,Qc(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Rm(t),i.updater=pd,t.stateNode=i,i._reactInternals=t,Vm(t,r,e,n),t=qm(null,t,r,!0,a,n)):(t.tag=0,ot&&a&&xm(t),dn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(md(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=y6(r),e=vr(r,e),i){case 0:t=Ym(null,t,r,e,n);break e;case 1:t=Cb(null,t,r,e,n);break e;case 11:t=bb(null,t,r,e,n);break e;case 14:t=Eb(null,t,r,vr(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),Ym(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),Cb(e,t,r,i,n);case 3:e:{if(Ab(t),e===null)throw Error(Q(387));r=t.pendingProps,a=t.memoizedState,i=a.element,zw(e,t),od(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Yo(Error(Q(423)),t),t=kb(e,t,r,n,i);break e}else if(r!==i){i=Yo(Error(Q(424)),t),t=kb(e,t,r,n,i);break e}else for(Fn=ji(t.stateNode.containerInfo.firstChild),Mn=t,ot=!0,yr=null,n=Uw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ho(),r===i){t=li(e,t,n);break e}dn(e,t,r,n)}t=t.child}return t;case 5:return Ww(t),e===null&&Em(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,pm(r,i)?o=null:a!==null&&pm(r,a)&&(t.flags|=32),Sb(e,t),dn(e,t,o,n),t.child;case 6:return e===null&&Em(t),null;case 13:return Rb(e,t,n);case 4:return Nm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=zo(t,null,r,n):dn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),bb(e,t,r,i,n);case 7:return dn(e,t,t.pendingProps,n),t.child;case 8:return dn(e,t,t.pendingProps.children,n),t.child;case 12:return dn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,et(rd,r._currentValue),r._currentValue=o,a!==null)if(gr(a.value,o)){if(a.children===i.children&&!vn.current){t=li(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(a.tag===1){u=ui(-1,n&-n),u.tag=2;var l=a.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Am(a.return,n,t),s.lanes|=n;break}u=u.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Q(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Am(o,n,t),o=a.sibling}else o=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}dn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,$o(t,n),i=Zn(i),r=r(i),t.flags|=1,dn(e,t,r,n),t.child;case 14:return r=t.type,i=vr(r,t.pendingProps),i=vr(r.type,i),Eb(e,t,r,i,n);case 15:return Tb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),md(e,t),t.tag=1,xn(r)?(e=!0,Qc(t)):e=!1,$o(t,n),hb(t,r,i),Vm(t,r,i,n),qm(null,t,r,!0,e,n);case 19:return Pb(e,t,n);case 22:return _b(e,t,n)}throw Error(Q(156,t.tag))};function tE(e,t){return Dx(e,t)}function g6(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tr(e,t,n,r){return new g6(e,t,n,r)}function pg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function y6(e){if(typeof e=="function")return pg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xh)return 11;if(e===Eh)return 14}return 2}function Xi(e,t){var n=e.alternate;return n===null?(n=tr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Cd(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")pg(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case So:return qa(n.children,i,a,t);case yh:o=8,i|=8;break;case vh:return e=tr(12,n,t,i|2),e.elementType=vh,e.lanes=a,e;case wh:return e=tr(13,n,t,i),e.elementType=wh,e.lanes=a,e;case bh:return e=tr(19,n,t,i),e.elementType=bh,e.lanes=a,e;case cx:return Ad(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ux:o=10;break e;case lx:o=9;break e;case xh:o=11;break e;case Eh:o=14;break e;case Pi:o=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=tr(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function qa(e,t,n,r){return e=tr(7,e,r,t),e.lanes=n,e}function Ad(e,t,n,r){return e=tr(22,e,r,t),e.elementType=cx,e.lanes=n,e.stateNode={isHidden:!1},e}function hg(e,t,n){return e=tr(6,e,null,t),e.lanes=n,e}function mg(e,t,n){return t=tr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function v6(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zh(0),this.expirationTimes=zh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gg(e,t,n,r,i,a,o,s,u){return e=new v6(e,t,n,s,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=tr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rm(a),e}function x6(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_o,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function nE(e){if(!e)return Hi;e=e._reactInternals;e:{if(La(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(xn(n))return Nw(e,n,t)}return t}function rE(e,t,n,r,i,a,o,s,u){return e=gg(n,r,!0,e,i,a,o,s,u),e.context=nE(null),n=e.current,r=fn(),i=Gi(n),a=ui(r,i),a.callback=t??null,$i(n,a,i),e.current.lanes=i,lu(e,i,r),En(e,r),e}function kd(e,t,n,r){var i=t.current,a=fn(),o=Gi(i);return n=nE(n),t.context===null?t.context=n:t.pendingContext=n,t=ui(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=$i(i,t,o),e!==null&&(br(e,i,o,a),ad(e,i,o)),o}function Rd(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 iE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function yg(e,t){iE(e,t),(e=e.alternate)&&iE(e,t)}function w6(){return null}var aE=typeof reportError=="function"?reportError:function(e){console.error(e)};function vg(e){this._internalRoot=e}Nd.prototype.render=vg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));kd(e,t,null,null)},Nd.prototype.unmount=vg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$a(function(){kd(null,e,null,null)}),t[ri]=null}};function Nd(e){this._internalRoot=e}Nd.prototype.unstable_scheduleHydration=function(e){if(e){var t=zx();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mi.length&&t!==0&&t<Mi[n].priority;n++);Mi.splice(n,0,e),n===0&&Wx(e)}};function xg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Pd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function oE(){}function b6(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var l=Rd(o);a.call(l)}}var o=rE(t,r,e,0,null,!1,!1,"",oE);return e._reactRootContainer=o,e[ri]=o.current,Tu(e.nodeType===8?e.parentNode:e),$a(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=Rd(u);s.call(l)}}var u=gg(e,0,!1,null,null,!1,!1,"",oE);return e._reactRootContainer=u,e[ri]=u.current,Tu(e.nodeType===8?e.parentNode:e),$a(function(){kd(t,u,n,r)}),u}function Id(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var s=i;i=function(){var u=Rd(o);s.call(u)}}kd(t,o,e,i)}else o=b6(n,t,e,i,r);return Rd(o)}Ux=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=uu(t.pendingLanes);n!==0&&(Vh(t,n|1),En(t,Et()),!(Ue&6)&&(Ko=Et()+500,zi()))}break;case 13:$a(function(){var r=si(e,1);if(r!==null){var i=fn();br(r,e,1,i)}}),yg(e,1)}},$h=function(e){if(e.tag===13){var t=si(e,134217728);if(t!==null){var n=fn();br(t,e,134217728,n)}yg(e,134217728)}},Hx=function(e){if(e.tag===13){var t=Gi(e),n=si(e,t);if(n!==null){var r=fn();br(n,e,t,r)}yg(e,t)}},zx=function(){return qe},Vx=function(e,t){var n=qe;try{return qe=e,t()}finally{qe=n}},Mh=function(e,t,n){switch(t){case"input":if(kh(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Kc(r);if(!i)throw Error(Q(90));px(r),kh(r,i)}}}break;case"textarea":vx(e,n);break;case"select":t=n.value,t!=null&&Co(e,!!n.multiple,t,!1)}},Ax=cg,kx=$a;var E6={usingClientEntryPoint:!1,Events:[Cu,Mo,Kc,Sx,Cx,cg]},Uu={findFiberByHostInstance:Ma,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},T6={bundleType:Uu.bundleType,version:Uu.version,rendererPackageName:Uu.rendererPackageName,rendererConfig:Uu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ni.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ix(e),e===null?null:e.stateNode},findFiberByHostInstance:Uu.findFiberByHostInstance||w6,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Od=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Od.isDisabled&&Od.supportsFiber)try{Nc=Od.inject(T6),Dr=Od}catch{}}On.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=E6,On.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xg(t))throw Error(Q(200));return x6(e,t,null,n)},On.createRoot=function(e,t){if(!xg(e))throw Error(Q(299));var n=!1,r="",i=aE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=gg(e,1,!1,null,null,n,!1,r,i),e[ri]=t.current,Tu(e.nodeType===8?e.parentNode:e),new vg(t)},On.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=Ix(t),e=e===null?null:e.stateNode,e},On.flushSync=function(e){return $a(e)},On.hydrate=function(e,t,n){if(!Pd(t))throw Error(Q(200));return Id(null,e,t,!0,n)},On.hydrateRoot=function(e,t,n){if(!xg(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",o=aE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=rE(t,null,e,1,n??null,i,!1,a,o),e[ri]=t.current,Tu(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Nd(t)},On.render=function(e,t,n){if(!Pd(t))throw Error(Q(200));return Id(null,e,t,!1,n)},On.unmountComponentAtNode=function(e){if(!Pd(e))throw Error(Q(40));return e._reactRootContainer?($a(function(){Id(null,null,e,!1,function(){e._reactRootContainer=null,e[ri]=null})}),!0):!1},On.unstable_batchedUpdates=cg,On.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Pd(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Id(e,t,n,!1,r)},On.version="18.3.1-next-f1338f8080-20240426";function sE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sE)}catch(e){console.error(e)}}sE(),nx.exports=On;var Qo=nx.exports,uE,lE=Qo;uE=lE.createRoot,lE.hydrateRoot;const cE="3.0.26";function Dd(e){"@babel/helpers - typeof";return Dd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dd(e)}var _6=/^\s+/,S6=/\s+$/;function fe(e,t){if(e=e||"",t=t||{},e instanceof fe)return e;if(!(this instanceof fe))return new fe(e,t);var n=C6(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}fe.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,a,o,s;return n=t.r/255,r=t.g/255,i=t.b/255,n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*a+.7152*o+.0722*s},setAlpha:function(t){return this._a=gE(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=fE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=fE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=dE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=dE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return pE(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return N6(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(st(this._r,255)*100)+"%",g:Math.round(st(this._g,255)*100)+"%",b:Math.round(st(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(st(this._r,255)*100)+"%, "+Math.round(st(this._g,255)*100)+"%, "+Math.round(st(this._b,255)*100)+"%)":"rgba("+Math.round(st(this._r,255)*100)+"%, "+Math.round(st(this._g,255)*100)+"%, "+Math.round(st(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:z6[pE(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+hE(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=fe(t);r="#"+hE(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,a=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return a?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return fe(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(D6,arguments)},brighten:function(){return this._applyModification(L6,arguments)},darken:function(){return this._applyModification(M6,arguments)},desaturate:function(){return this._applyModification(P6,arguments)},saturate:function(){return this._applyModification(I6,arguments)},greyscale:function(){return this._applyModification(O6,arguments)},spin:function(){return this._applyModification(F6,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(U6,arguments)},complement:function(){return this._applyCombination(B6,arguments)},monochromatic:function(){return this._applyCombination(H6,arguments)},splitcomplement:function(){return this._applyCombination(j6,arguments)},triad:function(){return this._applyCombination(mE,[3])},tetrad:function(){return this._applyCombination(mE,[4])}},fe.fromRatio=function(e,t){if(Dd(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Hu(e[r]));e=n}return fe(e,t)};function C6(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,s=!1;return typeof e=="string"&&(e=Y6(e)),Dd(e)=="object"&&(di(e.r)&&di(e.g)&&di(e.b)?(t=A6(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):di(e.h)&&di(e.s)&&di(e.v)?(r=Hu(e.s),i=Hu(e.v),t=R6(e.h,r,i),o=!0,s="hsv"):di(e.h)&&di(e.s)&&di(e.l)&&(r=Hu(e.s),a=Hu(e.l),t=k6(e.h,r,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=gE(n),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function A6(e,t,n){return{r:st(e,255)*255,g:st(t,255)*255,b:st(n,255)*255}}function dE(e,t,n){e=st(e,255),t=st(t,255),n=st(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=(r+i)/2;if(r==i)a=o=0;else{var u=r-i;switch(o=s>.5?u/(2-r-i):u/(r+i),r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:o,l:s}}function k6(e,t,n){var r,i,a;e=st(e,360),t=st(t,100),n=st(n,100);function o(l,c,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?l+(c-l)*6*d:d<1/2?c:d<2/3?l+(c-l)*(2/3-d)*6:l}if(t===0)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=o(u,s,e+1/3),i=o(u,s,e),a=o(u,s,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function fE(e,t,n){e=st(e,255),t=st(t,255),n=st(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=r,u=r-i;if(o=r===0?0:u/r,r==i)a=0;else{switch(r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:o,v:s}}function R6(e,t,n){e=st(e,360)*6,t=st(t,100),n=st(n,100);var r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),u=r%6,l=[n,o,a,a,s,n][u],c=[s,n,n,o,a,a][u],d=[a,a,s,n,n,o][u];return{r:l*255,g:c*255,b:d*255}}function pE(e,t,n,r){var i=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function N6(e,t,n,r,i){var a=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(n).toString(16)),Er(yE(r))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function hE(e,t,n,r){var i=[Er(yE(r)),Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(n).toString(16))];return i.join("")}fe.equals=function(e,t){return!e||!t?!1:fe(e).toRgbString()==fe(t).toRgbString()},fe.random=function(){return fe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function P6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s-=t/100,n.s=Ld(n.s),fe(n)}function I6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s+=t/100,n.s=Ld(n.s),fe(n)}function O6(e){return fe(e).desaturate(100)}function D6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l+=t/100,n.l=Ld(n.l),fe(n)}function L6(e,t){t=t===0?0:t||10;var n=fe(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),fe(n)}function M6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l-=t/100,n.l=Ld(n.l),fe(n)}function F6(e,t){var n=fe(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,fe(n)}function B6(e){var t=fe(e).toHsl();return t.h=(t.h+180)%360,fe(t)}function mE(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=fe(e).toHsl(),r=[fe(e)],i=360/t,a=1;a<t;a++)r.push(fe({h:(n.h+a*i)%360,s:n.s,l:n.l}));return r}function j6(e){var t=fe(e).toHsl(),n=t.h;return[fe(e),fe({h:(n+72)%360,s:t.s,l:t.l}),fe({h:(n+216)%360,s:t.s,l:t.l})]}function U6(e,t,n){t=t||6,n=n||30;var r=fe(e).toHsl(),i=360/n,a=[fe(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(fe(r));return a}function H6(e,t){t=t||6;for(var n=fe(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(fe({h:r,s:i,v:a})),a=(a+s)%1;return o}fe.mix=function(e,t,n){n=n===0?0:n||50;var r=fe(e).toRgb(),i=fe(t).toRgb(),a=n/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return fe(o)},fe.readability=function(e,t){var n=fe(e),r=fe(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},fe.isReadable=function(e,t,n){var r=fe.readability(e,t),i,a;switch(a=!1,i=q6(n),i.level+i.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a},fe.mostReadable=function(e,t,n){var r=null,i=0,a,o,s,u;n=n||{},o=n.includeFallbackColors,s=n.level,u=n.size;for(var l=0;l<t.length;l++)a=fe.readability(e,t[l]),a>i&&(i=a,r=fe(t[l]));return fe.isReadable(e,r,{level:s,size:u})||!o?r:(n.includeFallbackColors=!1,fe.mostReadable(e,["#fff","#000"],n))};var wg=fe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},z6=fe.hexNames=V6(wg);function V6(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function gE(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function st(e,t){$6(e)&&(e="100%");var n=W6(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Ld(e){return Math.min(1,Math.max(0,e))}function jn(e){return parseInt(e,16)}function $6(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function W6(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Er(e){return e.length==1?"0"+e:""+e}function Hu(e){return e<=1&&(e=e*100+"%"),e}function yE(e){return Math.round(parseFloat(e)*255).toString(16)}function vE(e){return jn(e)/255}var Tr=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function di(e){return!!Tr.CSS_UNIT.exec(e)}function Y6(e){e=e.replace(_6,"").replace(S6,"").toLowerCase();var t=!1;if(wg[e])e=wg[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Tr.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Tr.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Tr.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Tr.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Tr.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Tr.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Tr.hex8.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),a:vE(n[4]),format:t?"name":"hex8"}:(n=Tr.hex6.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),format:t?"name":"hex"}:(n=Tr.hex4.exec(e))?{r:jn(n[1]+""+n[1]),g:jn(n[2]+""+n[2]),b:jn(n[3]+""+n[3]),a:vE(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Tr.hex3.exec(e))?{r:jn(n[1]+""+n[1]),g:jn(n[2]+""+n[2]),b:jn(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function q6(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const G6=350,xE=400,wE=600,bg={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},bE=({primary:e="hsl(0, 0%, 0%)"})=>{const t=fe(e).toHsl(),n=fe(e).isLight()?"240 10% 3.9%":"0 0% 100%";return{"--opencx-primary":`${t.h} ${t.s*100}% ${t.l*100}%`,"--opencx-primary-foreground":n,"--opencx-background":"0 0% 100%","--opencx-foreground":"240 10% 3.9%","--opencx-accent":"240 4.8% 95.9%","--opencx-accent-foreground":"240 5.9% 10%","--opencx-destructive":"0 84.2% 60.2%","--opencx-destructive-foreground":"0 0% 98%","--opencx-secondary":"240 4.8% 95.9%","--opencx-secondary-foreground":"240 5.9% 10%","--opencx-muted":"240 4.8% 95.9%","--opencx-muted-foreground":"240 3.8% 46.1%","--opencx-input":"240 5.9% 90%","--opencx-border":"240 5.9% 90%","--opencx-ring":"240 5.9% 10%"}};function K6(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function zu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Eg=e=>Array.isArray(e);function EE(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Vu(e){return typeof e=="string"||Array.isArray(e)}function TE(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Tg(e,t,n,r){if(typeof t=="function"){const[i,a]=TE(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=TE(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function Md(e,t,n){const r=e.getProps();return Tg(r,t,n!==void 0?n:r.custom,e)}const _g=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sg=["initial",..._g],$u=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qi=new Set($u),fi=e=>e*1e3,pi=e=>e/1e3,X6={type:"spring",stiffness:500,damping:25,restSpeed:10},Q6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Z6={type:"keyframes",duration:.8},J6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},eL=(e,{keyframes:t})=>t.length>2?Z6:Qi.has(e)?e.startsWith("scale")?Q6(t[1]):X6:J6;function Cg(e,t){return e?e[t]||e.default||e:void 0}const tL={skipAnimations:!1,useManualTiming:!1},nL=e=>e!==null;function Fd(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(nL),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const Zt=e=>e;function rL(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(l){a.has(l)&&(u.schedule(l),e()),l(o)}const u={schedule:(l,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&a.add(l),p.has(l)||p.add(l),l},cancel:l=>{n.delete(l),a.delete(l)},process:l=>{if(o=l,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,u.process(l))}};return u}const Bd=["read","resolveKeyframes","update","preRender","render","postRender"],iL=40;function _E(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Bd.reduce((g,x)=>(g[x]=rL(a),g),{}),{read:s,resolveKeyframes:u,update:l,preRender:c,render:d,postRender:f}=o,p=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,iL),1),i.timestamp=g,i.isProcessing=!0,s.process(i),u.process(i),l.process(i),c.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Bd.reduce((g,x)=>{const b=o[x];return g[x]=(T,S=!1,_=!1)=>(n||m(),b.schedule(T,S,_)),g},{}),cancel:g=>{for(let x=0;x<Bd.length;x++)o[Bd[x]].cancel(g)},state:i,steps:o}}const{schedule:Xe,cancel:Zi,state:$t,steps:Ag}=_E(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zt,!0),SE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,aL=1e-7,oL=12;function sL(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=SE(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>aL&&++s<oL);return o}function Wu(e,t,n,r){if(e===t&&n===r)return Zt;const i=a=>sL(a,0,1,e,n);return a=>a===0||a===1?a:SE(i(a),t,r)}const CE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,AE=e=>t=>1-e(1-t),kE=Wu(.33,1.53,.69,.99),kg=AE(kE),RE=CE(kg),NE=e=>(e*=2)<1?.5*kg(e):.5*(2-Math.pow(2,-10*(e-1))),Rg=e=>1-Math.sin(Math.acos(e)),PE=AE(Rg),IE=CE(Rg),OE=e=>/^0[^.\s]+$/u.test(e);function uL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||OE(e):!0}let Ng=Zt;const DE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),LE=e=>t=>typeof t=="string"&&t.startsWith(e),ME=LE("--"),lL=LE("var(--"),Pg=e=>lL(e)?cL.test(e.split("/*")[0].trim()):!1,cL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,dL=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function fL(e){const t=dL.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function FE(e,t,n=1){const[r,i]=fL(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return DE(o)?parseFloat(o):o}return Pg(i)?FE(i,t,n+1):i}const Ji=(e,t,n)=>n>t?t:n<e?e:n,Zo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Yu={...Zo,transform:e=>Ji(0,1,e)},jd={...Zo,default:1},qu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ea=qu("deg"),jr=qu("%"),ye=qu("px"),pL=qu("vh"),hL=qu("vw"),BE={...jr,parse:e=>jr.parse(e)/100,transform:e=>jr.transform(e*100)},mL=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),jE=e=>e===Zo||e===ye,UE=(e,t)=>parseFloat(e.split(", ")[t]),HE=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return UE(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?UE(a[1],e):0}},gL=new Set(["x","y","z"]),yL=$u.filter(e=>!gL.has(e));function vL(e){const t=[];return yL.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Jo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:HE(4,13),y:HE(5,14)};Jo.translateX=Jo.x,Jo.translateY=Jo.y;const zE=e=>t=>t.test(e),VE=[Zo,ye,jr,ea,hL,pL,{test:e=>e==="auto",parse:e=>e}],$E=e=>VE.find(zE(e)),Ga=new Set;let Ig=!1,Og=!1;function WE(){if(Og){const e=Array.from(Ga).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=vL(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,o])=>{var s;(s=r.getValue(a))===null||s===void 0||s.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Og=!1,Ig=!1,Ga.forEach(e=>e.complete()),Ga.clear()}function YE(){Ga.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Og=!0)})}function xL(){YE(),WE()}class Dg{constructor(t,n,r,i,a,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ga.add(this),Ig||(Ig=!0,Xe.read(YE),Xe.resolveKeyframes(WE))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){const o=i==null?void 0:i.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,s);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=s),i&&o===void 0&&i.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ga.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ga.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Gu=e=>Math.round(e*1e5)/1e5,Lg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wL(e){return e==null}const bL=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Mg=(e,t)=>n=>!!(typeof n=="string"&&bL.test(n)&&n.startsWith(e)||t&&!wL(n)&&Object.prototype.hasOwnProperty.call(n,t)),qE=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,s]=r.match(Lg);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},EL=e=>Ji(0,255,e),Fg={...Zo,transform:e=>Math.round(EL(e))},Ka={test:Mg("rgb","red"),parse:qE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Fg.transform(e)+", "+Fg.transform(t)+", "+Fg.transform(n)+", "+Gu(Yu.transform(r))+")"};function TL(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Bg={test:Mg("#"),parse:TL,transform:Ka.transform},es={test:Mg("hsl","hue"),parse:qE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jr.transform(Gu(t))+", "+jr.transform(Gu(n))+", "+Gu(Yu.transform(r))+")"},Jt={test:e=>Ka.test(e)||Bg.test(e)||es.test(e),parse:e=>Ka.test(e)?Ka.parse(e):es.test(e)?es.parse(e):Bg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ka.transform(e):es.transform(e)},_L=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function SL(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Lg))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(_L))===null||n===void 0?void 0:n.length)||0)>0}const GE="number",KE="color",CL="var",AL="var(",XE="${}",kL=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ku(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(kL,u=>(Jt.test(u)?(r.color.push(a),i.push(KE),n.push(Jt.parse(u))):u.startsWith(AL)?(r.var.push(a),i.push(CL),n.push(u)):(r.number.push(a),i.push(GE),n.push(parseFloat(u))),++a,XE)).split(XE);return{values:n,split:s,indexes:r,types:i}}function QE(e){return Ku(e).values}function ZE(e){const{split:t,types:n}=Ku(e),r=t.length;return i=>{let a="";for(let o=0;o<r;o++)if(a+=t[o],i[o]!==void 0){const s=n[o];s===GE?a+=Gu(i[o]):s===KE?a+=Jt.transform(i[o]):a+=i[o]}return a}}const RL=e=>typeof e=="number"?0:e;function NL(e){const t=QE(e);return ZE(e)(t.map(RL))}const ta={test:SL,parse:QE,createTransformer:ZE,getAnimatableNone:NL},PL=new Set(["brightness","contrast","saturate","opacity"]);function IL(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Lg)||[];if(!r)return e;const i=n.replace(r,"");let a=PL.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const OL=/\b([a-z-]*)\(.*?\)/gu,jg={...ta,getAnimatableNone:e=>{const t=e.match(OL);return t?t.map(IL).join(" "):e}},DL={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},LL={rotate:ea,rotateX:ea,rotateY:ea,rotateZ:ea,scale:jd,scaleX:jd,scaleY:jd,scaleZ:jd,skew:ea,skewX:ea,skewY:ea,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Yu,originX:BE,originY:BE,originZ:ye},JE={...Zo,transform:Math.round},Ug={...DL,...LL,zIndex:JE,size:ye,fillOpacity:Yu,strokeOpacity:Yu,numOctaves:JE},ML={...Ug,color:Jt,backgroundColor:Jt,outlineColor:Jt,fill:Jt,stroke:Jt,borderColor:Jt,borderTopColor:Jt,borderRightColor:Jt,borderBottomColor:Jt,borderLeftColor:Jt,filter:jg,WebkitFilter:jg},Hg=e=>ML[e];function eT(e,t){let n=Hg(e);return n!==jg&&(n=ta),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const FL=new Set(["auto","none","0"]);function BL(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!FL.has(a)&&Ku(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=eT(n,i)}class tT extends Dg{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let l=t[u];if(typeof l=="string"&&(l=l.trim(),Pg(l))){const c=FE(l,n.current);c!==void 0&&(t[u]=c),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!mL.has(r)||t.length!==2)return;const[i,a]=t,o=$E(i),s=$E(a);if(o!==s)if(jE(o)&&jE(s))for(let u=0;u<t.length;u++){const l=t[u];typeof l=="string"&&(t[u]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)uL(t[i])&&r.push(i);r.length&&BL(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Jo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const a=n.getValue(r);a&&a.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Jo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([u,l])=>{n.getValue(u).set(l)}),this.resolveNoneKeyframes()}}function zg(e){return typeof e=="function"}let Ud;function jL(){Ud=void 0}const Ur={now:()=>(Ud===void 0&&Ur.set($t.isProcessing||tL.useManualTiming?$t.timestamp:performance.now()),Ud),set:e=>{Ud=e,queueMicrotask(jL)}},nT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ta.test(e)||e==="0")&&!e.startsWith("url("));function UL(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function HL(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=nT(i,t),s=nT(a,t);return!o||!s?!1:UL(e)||(n==="spring"||zg(n))&&r}const zL=40;class rT{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ur.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>zL?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&xL(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ur.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:o,onComplete:s,onUpdate:u,isGenerator:l}=this.options;if(!l&&!HL(t,r,i,a))if(o)this.options.duration=0;else{u==null||u(Fd(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function iT(e,t){return t?e*(1e3/t):0}const VL=5;function aT(e,t,n){const r=Math.max(t-VL,0);return iT(n-e(r),t-r)}const Vg=.001,$L=.01,WL=10,YL=.05,qL=1;function GL({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a,o=1-t;o=Ji(YL,qL,o),e=Ji($L,WL,pi(e)),o<1?(i=l=>{const c=l*o,d=c*e,f=c-n,p=$g(l,o),m=Math.exp(-d);return Vg-f/p*m},a=l=>{const d=l*o*e,f=d*n+n,p=Math.pow(o,2)*Math.pow(l,2)*e,m=Math.exp(-d),y=$g(Math.pow(l,2),o);return(-i(l)+Vg>0?-1:1)*((f-p)*m)/y}):(i=l=>{const c=Math.exp(-l*e),d=(l-n)*e+1;return-Vg+c*d},a=l=>{const c=Math.exp(-l*e),d=(n-l)*(e*e);return c*d});const s=5/e,u=XL(i,a,s);if(e=fi(e),isNaN(u))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:o*2*Math.sqrt(r*l),duration:e}}}const KL=12;function XL(e,t,n){let r=n;for(let i=1;i<KL;i++)r=r-e(r)/t(r);return r}function $g(e,t){return e*Math.sqrt(1-t*t)}const QL=["duration","bounce"],ZL=["stiffness","damping","mass"];function oT(e,t){return t.some(n=>e[n]!==void 0)}function JL(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!oT(e,ZL)&&oT(e,QL)){const n=GL(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function sT({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],o={done:!1,value:i},{stiffness:s,damping:u,mass:l,duration:c,velocity:d,isResolvedFromDuration:f}=JL({...r,velocity:-pi(r.velocity||0)}),p=d||0,m=u/(2*Math.sqrt(s*l)),y=a-i,w=pi(Math.sqrt(s/l)),g=Math.abs(y)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let x;if(m<1){const b=$g(w,m);x=T=>{const S=Math.exp(-m*w*T);return a-S*((p+m*w*y)/b*Math.sin(b*T)+y*Math.cos(b*T))}}else if(m===1)x=b=>a-Math.exp(-w*b)*(y+(p+w*y)*b);else{const b=w*Math.sqrt(m*m-1);x=T=>{const S=Math.exp(-m*w*T),_=Math.min(b*T,300);return a-S*((p+m*w*y)*Math.sinh(_)+b*y*Math.cosh(_))/b}}return{calculatedDuration:f&&c||null,next:b=>{const T=x(b);if(f)o.done=b>=c;else{let S=0;m<1&&(S=b===0?fi(p):aT(x,b,T));const _=Math.abs(S)<=n,N=Math.abs(a-T)<=t;o.done=_&&N}return o.value=o.done?a:T,o}}}function uT({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=D=>s!==void 0&&D<s||u!==void 0&&D>u,m=D=>s===void 0?u:u===void 0||Math.abs(s-D)<Math.abs(u-D)?s:u;let y=n*t;const w=d+y,g=o===void 0?w:o(w);g!==w&&(y=g-d);const x=D=>-y*Math.exp(-D/r),b=D=>g+x(D),T=D=>{const V=x(D),P=b(D);f.done=Math.abs(V)<=l,f.value=f.done?g:P};let S,_;const N=D=>{p(f.value)&&(S=D,_=sT({keyframes:[f.value,m(f.value)],velocity:aT(b,D,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:c}))};return N(0),{calculatedDuration:null,next:D=>{let V=!1;return!_&&S===void 0&&(V=!0,T(D),N(D)),S!==void 0&&D>=S?_.next(D-S):(!V&&T(D),f)}}}const e4=Wu(.42,0,1,1),t4=Wu(0,0,.58,1),lT=Wu(.42,0,.58,1),n4=e=>Array.isArray(e)&&typeof e[0]!="number",Wg=e=>Array.isArray(e)&&typeof e[0]=="number",cT={linear:Zt,easeIn:e4,easeInOut:lT,easeOut:t4,circIn:Rg,circInOut:IE,circOut:PE,backIn:kg,backInOut:RE,backOut:kE,anticipate:NE},dT=e=>{if(Wg(e)){Ng(e.length===4);const[t,n,r,i]=e;return Wu(t,n,r,i)}else if(typeof e=="string")return Ng(cT[e]!==void 0),cT[e];return e},r4=(e,t)=>n=>t(e(n)),hi=(...e)=>e.reduce(r4),ts=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},pt=(e,t,n)=>e+(t-e)*n;function Yg(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function i4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;i=Yg(u,s,e+1/3),a=Yg(u,s,e),o=Yg(u,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Hd(e,t){return n=>n>0?t:e}const qg=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},a4=[Bg,Ka,es],o4=e=>a4.find(t=>t.test(e));function fT(e){const t=o4(e);if(!t)return!1;let n=t.parse(e);return t===es&&(n=i4(n)),n}const pT=(e,t)=>{const n=fT(e),r=fT(t);if(!n||!r)return Hd(e,t);const i={...n};return a=>(i.red=qg(n.red,r.red,a),i.green=qg(n.green,r.green,a),i.blue=qg(n.blue,r.blue,a),i.alpha=pt(n.alpha,r.alpha,a),Ka.transform(i))},Gg=new Set(["none","hidden"]);function s4(e,t){return Gg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function u4(e,t){return n=>pt(e,t,n)}function Kg(e){return typeof e=="number"?u4:typeof e=="string"?Pg(e)?Hd:Jt.test(e)?pT:d4:Array.isArray(e)?hT:typeof e=="object"?Jt.test(e)?pT:l4:Hd}function hT(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>Kg(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function l4(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Kg(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function c4(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],s=e.indexes[o][i[o]],u=(n=e.values[s])!==null&&n!==void 0?n:0;r[a]=u,i[o]++}return r}const d4=(e,t)=>{const n=ta.createTransformer(t),r=Ku(e),i=Ku(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Gg.has(e)&&!i.values.length||Gg.has(t)&&!r.values.length?s4(e,t):hi(hT(c4(r,i),i.values),n):Hd(e,t)};function mT(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?pt(e,t,n):Kg(e)(e,t)}function f4(e,t,n){const r=[],i=n||mT,a=e.length-1;for(let o=0;o<a;o++){let s=i(e[o],e[o+1]);if(t){const u=Array.isArray(t)?t[o]||Zt:t;s=hi(u,s)}r.push(s)}return r}function p4(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Ng(a===t.length),a===1)return()=>t[0];if(a===2&&e[0]===e[1])return()=>t[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=f4(t,r,i),s=o.length,u=l=>{let c=0;if(s>1)for(;c<e.length-2&&!(l<e[c+1]);c++);const d=ts(e[c],e[c+1],l);return o[c](d)};return n?l=>u(Ji(e[0],e[a-1],l)):u}function h4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ts(0,t,r);e.push(pt(n,1,i))}}function m4(e){const t=[0];return h4(t,e.length-1),t}function g4(e,t){return e.map(n=>n*t)}function y4(e,t){return e.map(()=>t||lT).splice(0,e.length-1)}function zd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=n4(r)?r.map(dT):dT(r),a={done:!1,value:t[0]},o=g4(n&&n.length===t.length?n:m4(t),e),s=p4(o,t,{ease:Array.isArray(i)?i:y4(t,i)});return{calculatedDuration:e,next:u=>(a.value=s(u),a.done=u>=e,a)}}const gT=2e4;function v4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<gT;)t+=n,r=e.next(t);return t>=gT?1/0:t}const x4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Xe.update(t,!0),stop:()=>Zi(t),now:()=>$t.isProcessing?$t.timestamp:Ur.now()}},w4={decay:uT,inertia:uT,tween:zd,keyframes:zd,spring:sT},b4=e=>e/100;class Xg extends rT{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:u}=this.options;u&&u()};const{name:n,motionValue:r,element:i,keyframes:a}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Dg,s=(u,l)=>this.onKeyframesResolved(u,l);this.resolver=new o(a,s,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=this.options,s=zg(n)?n:w4[n]||zd;let u,l;s!==zd&&typeof t[0]!="number"&&(u=hi(b4,mT(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});a==="mirror"&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=v4(c));const{calculatedDuration:d}=c,f=d+i,p=f*(r+1)-i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:u,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:D}=this.options;return{done:!0,value:D[D.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:u,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return a.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:y,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let b=this.currentTime,T=a;if(p){const D=Math.min(this.currentTime,c)/d;let V=Math.floor(D),P=D%1;!P&&D>=1&&(P=1),P===1&&V--,V=Math.min(V,p+1),!!(V%2)&&(m==="reverse"?(P=1-P,y&&(P-=y/d)):m==="mirror"&&(T=o)),b=Ji(0,1,P)*d}const S=x?{done:!1,value:u[0]}:T.next(b);s&&(S.value=s(S.value));let{done:_}=S;!x&&l!==null&&(_=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return N&&i!==void 0&&(S.value=Fd(u,this.options,i)),w&&w(S.value),N&&this.finish(),S}get duration(){const{resolved:t}=this;return t?pi(t.calculatedDuration):0}get time(){return pi(this.currentTime)}set time(t){t=fi(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=pi(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=x4,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const yT=new Set(["opacity","clipPath","filter","transform"]),E4=10,T4=(e,t)=>{let n="";const r=Math.max(Math.round(t/E4),2);for(let i=0;i<r;i++)n+=e(ts(0,r-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function Qg(e){let t;return()=>(t===void 0&&(t=e()),t)}const _4={linearEasing:void 0};function S4(e,t){const n=Qg(e);return()=>{var r;return(r=_4[t])!==null&&r!==void 0?r:n()}}const Vd=S4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function vT(e){return!!(typeof e=="function"&&Vd()||!e||typeof e=="string"&&(e in Zg||Vd())||Wg(e)||Array.isArray(e)&&e.every(vT))}const Xu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Zg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xu([0,.65,.55,1]),circOut:Xu([.55,0,1,.45]),backIn:Xu([.31,.01,.66,-.59]),backOut:Xu([.33,1.53,.69,.99])};function xT(e,t){if(e)return typeof e=="function"&&Vd()?T4(e,t):Wg(e)?Xu(e):Array.isArray(e)?e.map(n=>xT(n,t)||Zg.easeOut):Zg[e]}function C4(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s,times:u}={}){const l={[t]:n};u&&(l.offset=u);const c=xT(s,i);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}function wT(e,t){e.timeline=t,e.onfinish=null}const A4=Qg(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),$d=10,k4=2e4;function R4(e){return zg(e.type)||e.type==="spring"||!vT(e.ease)}function N4(e,t){const n=new Xg({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let a=0;for(;!r.done&&a<k4;)r=n.sample(a),i.push(r.value),a+=$d;return{times:void 0,keyframes:i,duration:a-$d,ease:"linear"}}const bT={anticipate:NE,backInOut:RE,circInOut:IE};function P4(e){return e in bT}class ET extends rT{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:a}=this.options;this.resolver=new tT(a,(o,s)=>this.onKeyframesResolved(o,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:a,ease:o,type:s,motionValue:u,name:l,startTime:c}=this.options;if(!(!((r=u.owner)===null||r===void 0)&&r.current))return!1;if(typeof o=="string"&&Vd()&&P4(o)&&(o=bT[o]),R4(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,element:y,...w}=this.options,g=N4(t,w);t=g.keyframes,t.length===1&&(t[1]=t[0]),i=g.duration,a=g.times,o=g.ease,s="keyframes"}const d=C4(u.owner.current,l,t,{...this.options,duration:i,times:a,ease:o});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(wT(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;u.set(Fd(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:a,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return pi(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return pi(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=fi(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Zt;const{animation:r}=n;wT(r,t)}return Zt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:a,ease:o,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:c,onComplete:d,element:f,...p}=this.options,m=new Xg({...p,keyframes:r,duration:i,type:a,ease:o,times:s,isGenerator:!0}),y=fi(this.time);l.setWithVelocity(m.sample(y-$d).value,m.sample(y).value,$d)}const{onStop:u}=this.options;u&&u(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:a,damping:o,type:s}=t;return A4()&&r&&yT.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&a!=="mirror"&&o!==0&&s!=="inertia"}}const I4=Qg(()=>window.ScrollTimeline!==void 0);class O4{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>I4()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,a)=>{i&&i(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function D4({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const Jg=(e,t,n,r={},i,a)=>o=>{const s=Cg(r,e)||{},u=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-fi(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};D4(s)||(c={...c,...eL(e,c)}),c.duration&&(c.duration=fi(c.duration)),c.repeatDelay&&(c.repeatDelay=fi(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!a&&t.get()!==void 0){const f=Fd(c.keyframes,s);if(f!==void 0)return Xe.update(()=>{c.onUpdate(f),c.onComplete()}),new O4([])}return!a&&ET.supports(c)?new ET(c):new Xg(c)},L4=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),M4=e=>Eg(e)?e[e.length-1]||0:e;function e0(e,t){e.indexOf(t)===-1&&e.push(t)}function t0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class n0{constructor(){this.subscriptions=[]}add(t){return e0(this.subscriptions,t),()=>t0(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const TT=30,F4=e=>!isNaN(parseFloat(e));class B4{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=Ur.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ur.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=F4(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new n0);const r=this.events[t].add(n);return t==="change"?()=>{r(),Xe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ur.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>TT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,TT);return iT(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qu(e,t){return new B4(e,t)}function j4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qu(n))}function U4(e,t){const n=Md(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=M4(a[o]);j4(e,o,s)}}const Wd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_T="data-"+Wd("framerAppearId");function ST(e){return e.props[_T]}const en=e=>!!(e&&e.getVelocity);function H4(e){return!!(en(e)&&e.add)}function r0(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(H4(n))return n.add(t)}function z4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function CT(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:s,...u}=t;r&&(o=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in u){const f=e.getValue(d,(a=e.latestValues[d])!==null&&a!==void 0?a:null),p=u[d];if(p===void 0||c&&z4(c,d))continue;const m={delay:n,...Cg(o||{},d)};let y=!1;if(window.MotionHandoffAnimation){const g=ST(e);if(g){const x=window.MotionHandoffAnimation(g,d,Xe);x!==null&&(m.startTime=x,y=!0)}}r0(e,d),f.start(Jg(d,f,p,e.shouldReduceMotion&&Qi.has(d)?{type:!1}:m,e,y));const w=f.animation;w&&l.push(w)}return s&&Promise.all(l).then(()=>{Xe.update(()=>{s&&U4(e,s)})}),l}function i0(e,t,n={}){var r;const i=Md(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(CT(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=a;return V4(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:u}=a;if(u){const[l,c]=u==="beforeChildren"?[o,s]:[s,o];return l().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function V4(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,u=i===1?(l=0)=>l*r:(l=0)=>s-l*r;return Array.from(e.variantChildren).sort($4).forEach((l,c)=>{l.notify("AnimationStart",t),o.push(i0(l,t,{...a,delay:n+u(c)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(o)}function $4(e,t){return e.sortNodePosition(t)}function W4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>i0(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=i0(e,t,n);else{const i=typeof t=="function"?Md(e,t,n.custom):t;r=Promise.all(CT(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Y4=Sg.length;function AT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?AT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Y4;n++){const r=Sg[n],i=e.props[r];(Vu(i)||i===!1)&&(t[r]=i)}return t}const q4=[..._g].reverse(),G4=_g.length;function K4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>W4(e,n,r)))}function X4(e){let t=K4(e),n=kT(),r=!0;const i=u=>(l,c)=>{var d;const f=Md(e,c,u==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...y}=f;l={...l,...y,...m}}return l};function a(u){t=u(e)}function o(u){const{props:l}=e,c=AT(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let w=0;w<G4;w++){const g=q4[w],x=n[g],b=l[g]!==void 0?l[g]:c[g],T=Vu(b),S=g===u?x.isActive:null;S===!1&&(m=w);let _=b===c[g]&&b!==l[g]&&T;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),x.protectedKeys={...p},!x.isActive&&S===null||!b&&!x.prevProp||zu(b)||typeof b=="boolean")continue;const N=Q4(x.prevProp,b);let D=N||g===u&&x.isActive&&!_&&T||w>m&&T,V=!1;const P=Array.isArray(b)?b:[b];let $=P.reduce(i(g),{});S===!1&&($={});const{prevResolvedValues:H={}}=x,X={...H,...$},Y=ee=>{D=!0,f.has(ee)&&(V=!0,f.delete(ee)),x.needsAnimating[ee]=!0;const F=e.getValue(ee);F&&(F.liveStyle=!1)};for(const ee in X){const F=$[ee],B=H[ee];if(p.hasOwnProperty(ee))continue;let A=!1;Eg(F)&&Eg(B)?A=!EE(F,B):A=F!==B,A?F!=null?Y(ee):f.add(ee):F!==void 0&&f.has(ee)?Y(ee):x.protectedKeys[ee]=!0}x.prevProp=b,x.prevResolvedValues=$,x.isActive&&(p={...p,...$}),r&&e.blockInitialAnimation&&(D=!1),D&&(!(_&&N)||V)&&d.push(...P.map(ee=>({animation:ee,options:{type:g}})))}if(f.size){const w={};f.forEach(g=>{const x=e.getBaseTarget(g),b=e.getValue(g);b&&(b.liveStyle=!0),w[g]=x??null}),d.push({animation:w})}let y=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function s(u,l){var c;if(n[u].isActive===l)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(u,l)}),n[u].isActive=l;const d=o(u);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=kT(),r=!0}}}function Q4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!EE(t,e):!1}function Xa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function kT(){return{animate:Xa(!0),whileInView:Xa(),whileHover:Xa(),whileTap:Xa(),whileDrag:Xa(),whileFocus:Xa(),exit:Xa()}}class na{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Z4 extends na{constructor(t){super(t),t.animationState||(t.animationState=X4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();zu(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let J4=0;class eM extends na{constructor(){super(...arguments),this.id=J4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const tM={animation:{Feature:Z4},exit:{Feature:eM}},RT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Yd(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const nM=e=>t=>RT(t)&&e(t,Yd(t));function mi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function gi(e,t,n,r){return mi(e,t,nM(n),r)}const NT=(e,t)=>Math.abs(e-t);function rM(e,t){const n=NT(e.x,t.x),r=NT(e.y,t.y);return Math.sqrt(n**2+r**2)}class PT{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=o0(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=rM(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:y}=$t;this.history.push({...m,timestamp:y});const{onStart:w,onMove:g}=this.handlers;f||(w&&w(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=a0(f,this.transformPagePoint),Xe.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=o0(d.type==="pointercancel"?this.lastMoveEventInfo:a0(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,w),m&&m(d,w)},!RT(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Yd(t),s=a0(o,this.transformPagePoint),{point:u}=s,{timestamp:l}=$t;this.history=[{...u,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,o0(s,this.history)),this.removeListeners=hi(gi(this.contextWindow,"pointermove",this.handlePointerMove),gi(this.contextWindow,"pointerup",this.handlePointerUp),gi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zi(this.updatePoint)}}function a0(e,t){return t?{point:t(e.point)}:e}function IT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function o0({point:e},t){return{point:e,delta:IT(e,OT(t)),offset:IT(e,iM(t)),velocity:aM(t,.1)}}function iM(e){return e[0]}function OT(e){return e[e.length-1]}function aM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=OT(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>fi(t)));)n--;if(!r)return{x:0,y:0};const a=pi(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function DT(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const LT=DT("dragHorizontal"),MT=DT("dragVertical");function FT(e){let t=!1;if(e==="y")t=MT();else if(e==="x")t=LT();else{const n=LT(),r=MT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function BT(){const e=FT(!0);return e?(e(),!1):!0}function ns(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const jT=1e-4,oM=1-jT,sM=1+jT,UT=.01,uM=0-UT,lM=0+UT;function Un(e){return e.max-e.min}function cM(e,t,n){return Math.abs(e-t)<=n}function HT(e,t,n,r=.5){e.origin=r,e.originPoint=pt(t.min,t.max,e.origin),e.scale=Un(n)/Un(t),e.translate=pt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=oM&&e.scale<=sM||isNaN(e.scale))&&(e.scale=1),(e.translate>=uM&&e.translate<=lM||isNaN(e.translate))&&(e.translate=0)}function Zu(e,t,n,r){HT(e.x,t.x,n.x,r?r.originX:void 0),HT(e.y,t.y,n.y,r?r.originY:void 0)}function zT(e,t,n){e.min=n.min+t.min,e.max=e.min+Un(t)}function dM(e,t,n){zT(e.x,t.x,n.x),zT(e.y,t.y,n.y)}function VT(e,t,n){e.min=t.min-n.min,e.max=e.min+Un(t)}function Ju(e,t,n){VT(e.x,t.x,n.x),VT(e.y,t.y,n.y)}function fM(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?pt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?pt(n,e,r.max):Math.min(e,n)),e}function $T(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function pM(e,{top:t,left:n,bottom:r,right:i}){return{x:$T(e.x,n,i),y:$T(e.y,t,r)}}function WT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function hM(e,t){return{x:WT(e.x,t.x),y:WT(e.y,t.y)}}function mM(e,t){let n=.5;const r=Un(e),i=Un(t);return i>r?n=ts(t.min,t.max-r,e.min):r>i&&(n=ts(e.min,e.max-i,t.min)),Ji(0,1,n)}function gM(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const s0=.35;function yM(e=s0){return e===!1?e=0:e===!0&&(e=s0),{x:YT(e,"left","right"),y:YT(e,"top","bottom")}}function YT(e,t,n){return{min:qT(e,t),max:qT(e,n)}}function qT(e,t){return typeof e=="number"?e:e[t]||0}const GT=()=>({translate:0,scale:1,origin:0,originPoint:0}),rs=()=>({x:GT(),y:GT()}),KT=()=>({min:0,max:0}),Tt=()=>({x:KT(),y:KT()});function nr(e){return[e("x"),e("y")]}function XT({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function vM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function xM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function u0(e){return e===void 0||e===1}function l0({scale:e,scaleX:t,scaleY:n}){return!u0(e)||!u0(t)||!u0(n)}function Qa(e){return l0(e)||QT(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function QT(e){return ZT(e.x)||ZT(e.y)}function ZT(e){return e&&e!=="0%"}function qd(e,t,n){const r=e-n,i=t*r;return n+i}function JT(e,t,n,r,i){return i!==void 0&&(e=qd(e,i,r)),qd(e,n,r)+t}function c0(e,t=0,n=1,r,i){e.min=JT(e.min,t,n,r,i),e.max=JT(e.max,t,n,r,i)}function e_(e,{x:t,y:n}){c0(e.x,t.translate,t.scale,t.originPoint),c0(e.y,n.translate,n.scale,n.originPoint)}const t_=.999999999999,n_=1.0000000000001;function wM(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&as(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,e_(e,o)),r&&Qa(a.latestValues)&&as(e,a.latestValues))}t.x<n_&&t.x>t_&&(t.x=1),t.y<n_&&t.y>t_&&(t.y=1)}function is(e,t){e.min=e.min+t,e.max=e.max+t}function r_(e,t,n,r,i=.5){const a=pt(e.min,e.max,i);c0(e,t,n,a,r)}function as(e,t){r_(e.x,t.x,t.scaleX,t.scale,t.originX),r_(e.y,t.y,t.scaleY,t.scale,t.originY)}function i_(e,t){return XT(xM(e.getBoundingClientRect(),t))}function bM(e,t,n){const r=i_(e,n),{scroll:i}=t;return i&&(is(r.x,i.offset.x),is(r.y,i.offset.y)),r}const a_=({current:e})=>e?e.ownerDocument.defaultView:null,EM=new WeakMap;class TM{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Tt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Yd(c,"page").point)},a=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=FT(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nr(w=>{let g=this.getAxisMotionValue(w).get()||0;if(jr.test(g)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[w];b&&(g=Un(b)*(parseFloat(g)/100))}}this.originPoint[w]=g}),m&&Xe.postRender(()=>m(c,d)),r0(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:w}=d;if(p&&this.currentDirection===null){this.currentDirection=_M(w),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,w),this.updateAxis("y",d.point,w),this.visualElement.render(),y&&y(c,d)},s=(c,d)=>this.stop(c,d),u=()=>nr(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new PT(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:a_(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Xe.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Gd(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=fM(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&ns(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=pM(i.layoutBox,n):this.constraints=!1,this.elastic=yM(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&nr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=gM(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ns(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=bM(r,i.root,this.visualElement.getTransformPagePoint());let o=hM(i.layout.layoutBox,a);if(n){const s=n(vM(o));this.hasMutatedConstraints=!!s,s&&(o=XT(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),u=this.constraints||{},l=nr(c=>{if(!Gd(c,n,this.currentDirection))return;let d=u&&u[c]||{};o&&(d={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r0(this.visualElement,t),r.start(Jg(t,r,0,n,this.visualElement,!1))}stopAnimation(){nr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){nr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){nr(n=>{const{drag:r}=this.getProps();if(!Gd(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-pt(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ns(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};nr(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const u=s.get();i[o]=mM({min:u,max:u},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),nr(o=>{if(!Gd(o,t,null))return;const s=this.getAxisMotionValue(o),{min:u,max:l}=this.constraints[o];s.set(pt(u,l,i[o]))})}addListeners(){if(!this.visualElement.current)return;EM.set(this.visualElement,this);const t=this.visualElement.current,n=gi(t,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();ns(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Xe.read(r);const o=mi(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(nr(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=u[c].translate,d.set(d.get()+u[c].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=s0,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function Gd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function _M(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class SM extends na{constructor(t){super(t),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new TM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zt}unmount(){this.removeGroupControls(),this.removeListeners()}}const o_=e=>(t,n)=>{e&&Xe.postRender(()=>e(t,n))};class CM extends na{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(t){this.session=new PT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:a_(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:o_(t),onStart:o_(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&Xe.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=gi(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Kd=v.createContext(null);function AM(){const e=v.useContext(Kd);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=v.useId();v.useEffect(()=>r(i),[]);const a=v.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,a]:[!0]}const d0=v.createContext({}),s_=v.createContext({}),Xd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function u_(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const el={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=u_(e,t.target.x),r=u_(e,t.target.y);return`${n}% ${r}%`}},kM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ta.parse(e);if(i.length>5)return r;const a=ta.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,u=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=u;const l=pt(s,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=l),typeof i[3+o]=="number"&&(i[3+o]/=l),a(i)}},Qd={};function RM(e){Object.assign(Qd,e)}const{schedule:f0,cancel:_re}=_E(queueMicrotask,!1);class NM extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;RM(PM),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Xd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Xe.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),f0.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function l_(e){const[t,n]=AM(),r=v.useContext(d0);return E.jsx(NM,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(s_),isPresent:t,safeToRemove:n})}const PM={borderRadius:{...el,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:el,borderTopRightRadius:el,borderBottomLeftRadius:el,borderBottomRightRadius:el,boxShadow:kM},c_=["TopLeft","TopRight","BottomLeft","BottomRight"],IM=c_.length,d_=e=>typeof e=="string"?parseFloat(e):e,f_=e=>typeof e=="number"||ye.test(e);function OM(e,t,n,r,i,a){i?(e.opacity=pt(0,n.opacity!==void 0?n.opacity:1,DM(r)),e.opacityExit=pt(t.opacity!==void 0?t.opacity:1,0,LM(r))):a&&(e.opacity=pt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<IM;o++){const s=`border${c_[o]}Radius`;let u=p_(t,s),l=p_(n,s);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||f_(u)===f_(l)?(e[s]=Math.max(pt(d_(u),d_(l),r),0),(jr.test(l)||jr.test(u))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=pt(t.rotate||0,n.rotate||0,r))}function p_(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const DM=h_(0,.5,PE),LM=h_(.5,.95,Zt);function h_(e,t,n){return r=>r<e?0:r>t?1:n(ts(e,t,r))}function m_(e,t){e.min=t.min,e.max=t.max}function rr(e,t){m_(e.x,t.x),m_(e.y,t.y)}function g_(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function y_(e,t,n,r,i){return e-=t,e=qd(e,1/n,r),i!==void 0&&(e=qd(e,1/i,r)),e}function MM(e,t=0,n=1,r=.5,i,a=e,o=e){if(jr.test(t)&&(t=parseFloat(t),t=pt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=pt(a.min,a.max,r);e===a&&(s-=t),e.min=y_(e.min,t,n,s,i),e.max=y_(e.max,t,n,s,i)}function v_(e,t,[n,r,i],a,o){MM(e,t[n],t[r],t[i],t.scale,a,o)}const FM=["x","scaleX","originX"],BM=["y","scaleY","originY"];function x_(e,t,n,r){v_(e.x,t,FM,n?n.x:void 0,r?r.x:void 0),v_(e.y,t,BM,n?n.y:void 0,r?r.y:void 0)}function w_(e){return e.translate===0&&e.scale===1}function b_(e){return w_(e.x)&&w_(e.y)}function E_(e,t){return e.min===t.min&&e.max===t.max}function jM(e,t){return E_(e.x,t.x)&&E_(e.y,t.y)}function T_(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function __(e,t){return T_(e.x,t.x)&&T_(e.y,t.y)}function S_(e){return Un(e.x)/Un(e.y)}function C_(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class UM{constructor(){this.members=[]}add(t){e0(this.members,t),t.scheduleRender()}remove(t){if(t0(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function HM(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;l&&(r=`perspective(${l}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,u=e.y.scale*t.y;return(s!==1||u!==1)&&(r+=`scale(${s}, ${u})`),r||"none"}const zM=(e,t)=>e.depth-t.depth;class VM{constructor(){this.children=[],this.isDirty=!1}add(t){e0(this.children,t),this.isDirty=!0}remove(t){t0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(zM),this.isDirty=!1,this.children.forEach(t)}}function Zd(e){const t=en(e)?e.get():e;return L4(t)?t.toValue():t}function $M(e,t){const n=Ur.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Zi(r),e(a-t))};return Xe.read(r,!0),()=>Zi(r)}function WM(e){return e instanceof SVGElement&&e.tagName!=="svg"}function YM(e,t,n){const r=en(e)?e:Qu(e);return r.start(Jg("",r,t,n)),r.animation}const Za={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},tl=typeof window<"u"&&window.MotionDebug!==void 0,p0=["","X","Y","Z"],qM={visibility:"hidden"},A_=1e3;let GM=0;function h0(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function k_(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ST(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xe,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&k_(r)}function R_({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=GM++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,tl&&(Za.totalNodes=Za.resolvedTargetDeltas=Za.recalculatedProjection=0),this.nodes.forEach(QM),this.nodes.forEach(n5),this.nodes.forEach(r5),this.nodes.forEach(ZM),tl&&window.MotionDebug.record(Za)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new VM)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new n0),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const u=this.eventHandlers.get(o);u&&u.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=WM(o),this.instance=o;const{layoutId:u,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(l||u)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=$M(f,250),Xd.hasAnimatedSinceResize&&(Xd.hasAnimatedSinceResize=!1,this.nodes.forEach(P_))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&c&&(u||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||u5,{onLayoutAnimationStart:w,onLayoutAnimationComplete:g}=c.getProps(),x=!this.targetLayout||!__(this.targetLayout,m)||p,b=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const T={...Cg(y,"layout"),onPlay:w,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||P_(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Zi(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(i5),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&k_(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:u}=this.options;if(s===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(N_);return}this.isUpdating||this.nodes.forEach(e5),this.isUpdating=!1,this.nodes.forEach(t5),this.nodes.forEach(KM),this.nodes.forEach(XM),this.clearAllSnapshots();const s=Ur.now();$t.delta=Ji(0,1e3/60,s-$t.timestamp),$t.timestamp=s,$t.isProcessing=!0,Ag.update.process($t),Ag.preRender.process($t),Ag.render.process($t),$t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,f0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(JM),this.sharedNodes.forEach(a5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Tt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!b_(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;o&&(s||Qa(this.latestValues)||c)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let u=this.removeElementScroll(s);return o&&(u=this.removeTransform(u)),l5(u),{animationId:this.root.animationId,measuredBox:s,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:s}=this.options;if(!s)return Tt();const u=s.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(c5))){const{scroll:c}=this.root;c&&(is(u.x,c.offset.x),is(u.y,c.offset.y))}return u}removeElementScroll(o){var s;const u=Tt();if(rr(u,o),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return u;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&rr(u,o),is(u.x,d.offset.x),is(u.y,d.offset.y))}return u}applyTransform(o,s=!1){const u=Tt();rr(u,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&as(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Qa(c.latestValues)&&as(u,c.latestValues)}return Qa(this.latestValues)&&as(u,this.latestValues),u}removeTransform(o){const s=Tt();rr(s,o);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!Qa(l.latestValues))continue;l0(l.latestValues)&&l.updateSnapshot();const c=Tt(),d=l.measurePageBox();rr(c,d),x_(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,c)}return Qa(this.latestValues)&&x_(s,this.latestValues),s}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$t.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var s;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==u;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=$t.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Tt(),this.relativeTargetOrigin=Tt(),Ju(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Tt(),this.targetWithTransforms=Tt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rr(this.target,this.layout.layoutBox),e_(this.target,this.targetDelta)):rr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Tt(),this.relativeTargetOrigin=Tt(),Ju(this.relativeTargetOrigin,this.target,p.target),rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}tl&&Za.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||l0(this.parent.latestValues)||QT(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const s=this.getLead(),u=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===$t.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;rr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;wM(this.layoutCorrected,this.treeScale,this.path,u),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Tt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(g_(this.prevProjectionDelta.x,this.projectionDelta.x),g_(this.prevProjectionDelta.y,this.projectionDelta.y)),Zu(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!C_(this.projectionDelta.x,this.prevProjectionDelta.x)||!C_(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),tl&&Za.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),o){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=rs(),this.projectionDelta=rs(),this.projectionDeltaWithTransform=rs()}setAnimationOrigin(o,s=!1){const u=this.snapshot,l=u?u.latestValues:{},c={...this.latestValues},d=rs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=Tt(),p=u?u.source:void 0,m=this.layout?this.layout.source:void 0,y=p!==m,w=this.getStack(),g=!w||w.members.length<=1,x=!!(y&&!g&&this.options.crossfade===!0&&!this.path.some(s5));this.animationProgress=0;let b;this.mixTargetDelta=T=>{const S=T/1e3;I_(d.x,o.x,S),I_(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ju(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),o5(this.relativeTarget,this.relativeTargetOrigin,f,S),b&&jM(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Tt()),rr(b,this.relativeTarget)),y&&(this.animationValues=c,OM(c,l,this.latestValues,S,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Zi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{Xd.hasAnimatedSinceResize=!0,this.currentAnimation=YM(0,A_,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(A_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:u,layout:l,latestValues:c}=o;if(!(!s||!u||!l)){if(this!==o&&this.layout&&l&&F_(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||Tt();const d=Un(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+d;const f=Un(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+f}rr(s,u),as(s,c),Zu(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new UM),this.sharedNodes.get(o).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(s=!0),!s)return;const l={};u.z&&h0("z",o,l,this.animationValues);for(let c=0;c<p0.length;c++)h0(`rotate${p0[c]}`,o,l,this.animationValues),h0(`skew${p0[c]}`,o,l,this.animationValues);o.render();for(const c in l)o.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);o.scheduleRender()}getProjectionStyles(o){var s,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return qM;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Zd(o==null?void 0:o.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=Zd(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Qa(this.latestValues)&&(y.transform=c?c({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=HM(this.projectionDeltaWithTransform,this.treeScale,f),c&&(l.transform=c(f,l.transform));const{x:p,y:m}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?l.opacity=d===this?(u=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:l.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const y in Qd){if(f[y]===void 0)continue;const{correct:w,applyTo:g}=Qd[y],x=l.transform==="none"?f[y]:w(f[y],d);if(g){const b=g.length;for(let T=0;T<b;T++)l[g[T]]=x}else l[y]=x}return this.options.layoutId&&(l.pointerEvents=d===this?Zd(o==null?void 0:o.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(N_),this.root.sharedNodes.clear()}}}function KM(e){e.updateLayout()}function XM(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?nr(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=Un(f);f.min=r[d].min,f.max=f.min+p}):F_(a,n.layoutBox,r)&&nr(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=Un(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const s=rs();Zu(s,r,n.layoutBox);const u=rs();o?Zu(u,e.applyTransform(i,!0),n.measuredBox):Zu(u,r,n.layoutBox);const l=!b_(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=Tt();Ju(m,n.layoutBox,f.layoutBox);const y=Tt();Ju(y,r,p.layoutBox),__(m,y)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function QM(e){tl&&Za.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ZM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function JM(e){e.clearSnapshot()}function N_(e){e.clearMeasurements()}function e5(e){e.isLayoutDirty=!1}function t5(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function P_(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function n5(e){e.resolveTargetDelta()}function r5(e){e.calcProjection()}function i5(e){e.resetSkewAndRotation()}function a5(e){e.removeLeadSnapshot()}function I_(e,t,n){e.translate=pt(t.translate,0,n),e.scale=pt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function O_(e,t,n,r){e.min=pt(t.min,n.min,r),e.max=pt(t.max,n.max,r)}function o5(e,t,n,r){O_(e.x,t.x,n.x,r),O_(e.y,t.y,n.y,r)}function s5(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const u5={duration:.45,ease:[.4,0,.1,1]},D_=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),L_=D_("applewebkit/")&&!D_("chrome/")?Math.round:Zt;function M_(e){e.min=L_(e.min),e.max=L_(e.max)}function l5(e){M_(e.x),M_(e.y)}function F_(e,t,n){return e==="position"||e==="preserve-aspect"&&!cM(S_(t),S_(n),.2)}function c5(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const d5=R_({attachResizeListener:(e,t)=>mi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),m0={current:void 0},B_=R_({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!m0.current){const e=new d5({});e.mount(window),e.setOptions({layoutScroll:!0}),m0.current=e}return m0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),f5={pan:{Feature:CM},drag:{Feature:SM,ProjectionNode:B_,MeasureLayout:l_}};function j_(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(a,o)=>{if(a.pointerType==="touch"||BT())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const u=s[r];u&&Xe.postRender(()=>u(a,o))};return gi(e.current,n,i,{passive:!e.getProps()[r]})}class p5 extends na{mount(){this.unmount=hi(j_(this.node,!0),j_(this.node,!1))}unmount(){}}class h5 extends na{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=hi(mi(this.node.current,"focus",()=>this.onFocus()),mi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const U_=(e,t)=>t?e===t?!0:U_(e,t.parentElement):!1;function g0(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Yd(n))}class m5 extends na{constructor(){super(...arguments),this.removeStartListeners=Zt,this.removeEndListeners=Zt,this.removeAccessibleListeners=Zt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),a=gi(window,"pointerup",(s,u)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!U_(this.node.current,s.target)?c:l;f&&Xe.update(()=>f(s,u))},{passive:!(r.onTap||r.onPointerUp)}),o=gi(window,"pointercancel",(s,u)=>this.cancelPress(s,u),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=hi(a,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const o=s=>{s.key!=="Enter"||!this.checkPressEnd()||g0("up",(u,l)=>{const{onTap:c}=this.node.getProps();c&&Xe.postRender(()=>c(u,l))})};this.removeEndListeners(),this.removeEndListeners=mi(this.node.current,"keyup",o),g0("down",(s,u)=>{this.startPress(s,u)})},n=mi(this.node.current,"keydown",t),r=()=>{this.isPressing&&g0("cancel",(a,o)=>this.cancelPress(a,o))},i=mi(this.node.current,"blur",r);this.removeAccessibleListeners=hi(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Xe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!BT()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Xe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=gi(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=mi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=hi(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const y0=new WeakMap,v0=new WeakMap,g5=e=>{const t=y0.get(e.target);t&&t(e)},y5=e=>{e.forEach(g5)};function v5({root:e,...t}){const n=e||document;v0.has(n)||v0.set(n,{});const r=v0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(y5,{root:e,...t})),r[i]}function x5(e,t,n){const r=v5(t);return y0.set(e,n),r.observe(e),()=>{y0.delete(e),r.unobserve(e)}}const w5={some:0,all:1};class b5 extends na{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:w5[i]},s=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,a&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=l?c:d;f&&f(u)};return x5(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(E5(t,n))&&this.startObserver()}unmount(){}}function E5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const T5={inView:{Feature:b5},tap:{Feature:m5},focus:{Feature:h5},hover:{Feature:p5}},_5={layout:{ProjectionNode:B_,MeasureLayout:l_}},x0=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Jd=v.createContext({}),w0=typeof window<"u",H_=w0?v.useLayoutEffect:v.useEffect,z_=v.createContext({strict:!1});function S5(e,t,n,r,i){var a,o;const{visualElement:s}=v.useContext(Jd),u=v.useContext(z_),l=v.useContext(Kd),c=v.useContext(x0).reducedMotion,d=v.useRef();r=r||u.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=v.useContext(s_);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&C5(d.current,n,i,p),v.useInsertionEffect(()=>{f&&f.update(n,l)});const m=n[_T],y=v.useRef(!!m&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return H_(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),f0.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),v.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)===null||w===void 0||w.call(window,m)}),y.current=!1))}),f}function C5(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:u,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:V_(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&ns(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:l})}function V_(e){if(e)return e.options.allowProjection!==!1?e.projection:V_(e.parent)}function A5(e,t,n){return v.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ns(n)&&(n.current=r))},[t])}function ef(e){return zu(e.animate)||Sg.some(t=>Vu(e[t]))}function $_(e){return!!(ef(e)||e.variants)}function k5(e,t){if(ef(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Vu(n)?n:void 0,animate:Vu(r)?r:void 0}}return e.inherit!==!1?t:{}}function R5(e){const{initial:t,animate:n}=k5(e,v.useContext(Jd));return v.useMemo(()=>({initial:t,animate:n}),[W_(t),W_(n)])}function W_(e){return Array.isArray(e)?e.join(" "):e}const Y_={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},os={};for(const e in Y_)os[e]={isEnabled:t=>Y_[e].some(n=>!!t[n])};function N5(e){for(const t in e)os[t]={...os[t],...e[t]}}const P5=Symbol.for("motionComponentSymbol");function I5({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&N5(e);function a(s,u){let l;const c={...v.useContext(x0),...s,layoutId:O5(s)},{isStatic:d}=c,f=R5(s),p=r(s,d);if(!d&&w0){D5();const m=L5(c);l=m.MeasureLayout,f.visualElement=S5(i,p,c,t,m.ProjectionNode)}return E.jsxs(Jd.Provider,{value:f,children:[l&&f.visualElement?E.jsx(l,{visualElement:f.visualElement,...c}):null,n(i,s,A5(p,f.visualElement,u),p,d,f.visualElement)]})}const o=v.forwardRef(a);return o[P5]=i,o}function O5({layoutId:e}){const t=v.useContext(d0).id;return t&&e!==void 0?t+"-"+e:e}function D5(e,t){v.useContext(z_).strict}function L5(e){const{drag:t,layout:n}=os;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const M5=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function b0(e){return typeof e!="string"||e.includes("-")?!1:!!(M5.indexOf(e)>-1||/[A-Z]/u.test(e))}function q_(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const G_=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function K_(e,t,n,r){q_(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(G_.has(i)?i:Wd(i),t.attrs[i])}function X_(e,{layout:t,layoutId:n}){return Qi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Qd[e]||e==="opacity")}function E0(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(en(i[o])||t.style&&en(t.style[o])||X_(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(a[o]=i[o]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),a}function Q_(e,t,n){const r=E0(e,t,n);for(const i in e)if(en(e[i])||en(t[i])){const a=$u.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}function T0(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}function F5(e){if(Qi.has(e))return"transform";if(yT.has(e))return Wd(e)}function B5({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,a,o,s){const u={latestValues:j5(i,a,o,s?!1:e,t),renderState:n()};return r&&(u.mount=l=>r(i,l,u)),u}const Z_=e=>(t,n)=>{const r=v.useContext(Jd),i=v.useContext(Kd),a=()=>B5(e,t,r,i,n);return n?a():T0(a)};function J_(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const a=Tg(e,r[i]);if(a){const{transitionEnd:o,transition:s,...u}=a;n(u,o)}}}function j5(e,t,n,r,i){var a;const o={},s=new Set,u=r&&((a=e.style)===null||a===void 0?void 0:a.willChange)===void 0,l=i(e,{});for(const w in l)o[w]=Zd(l[w]);let{initial:c,animate:d}=e;const f=ef(e),p=$_(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const y=m?d:c;return y&&typeof y!="boolean"&&!zu(y)&&J_(e,y,(w,g)=>{for(const x in w){let b=w[x];if(Array.isArray(b)){const T=m?b.length-1:0;b=b[T]}b!==null&&(o[x]=b)}for(const x in g)o[x]=g[x]}),u&&(d&&c!==!1&&!zu(d)&&J_(e,d,w=>{for(const g in w){const x=F5(g);x&&s.add(x)}}),s.size&&(o.willChange=Array.from(s).join(","))),o}const _0=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),e2=()=>({..._0(),attrs:{}}),t2=(e,t)=>t&&typeof e=="number"?t.transform(e):e,U5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},H5=$u.length;function z5(e,t,n){let r="",i=!0;for(let a=0;a<H5;a++){const o=$u[a],s=e[o];if(s===void 0)continue;let u=!0;if(typeof s=="number"?u=s===(o.startsWith("scale")?1:0):u=parseFloat(s)===0,!u||n){const l=t2(s,Ug[o]);if(!u){i=!1;const c=U5[o]||o;r+=`${c}(${l}) `}n&&(t[o]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function S0(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const u in t){const l=t[u];if(Qi.has(u)){o=!0;continue}else if(ME(u)){i[u]=l;continue}else{const c=t2(l,Ug[u]);u.startsWith("origin")?(s=!0,a[u]=c):r[u]=c}}if(t.transform||(o||n?r.transform=z5(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:u="50%",originY:l="50%",originZ:c=0}=a;r.transformOrigin=`${u} ${l} ${c}`}}function n2(e,t,n){return typeof e=="string"?e:ye.transform(t+n*e)}function V5(e,t,n){const r=n2(t,e.x,e.width),i=n2(n,e.y,e.height);return`${r} ${i}`}const $5={offset:"stroke-dashoffset",array:"stroke-dasharray"},W5={offset:"strokeDashoffset",array:"strokeDasharray"};function Y5(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?$5:W5;e[a.offset]=ye.transform(-r);const o=ye.transform(t),s=ye.transform(n);e[a.array]=`${o} ${s}`}function C0(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:u=0,...l},c,d){if(S0(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=V5(m,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&Y5(f,o,s,u,!1)}const A0=e=>typeof e=="string"&&e.toLowerCase()==="svg",q5={useVisualState:Z_({scrapeMotionValuesFromProps:Q_,createRenderState:e2,onMount:(e,t,{renderState:n,latestValues:r})=>{Xe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Xe.render(()=>{C0(n,r,A0(t.tagName),e.transformTemplate),K_(t,n)})}})},G5={useVisualState:Z_({applyWillChange:!0,scrapeMotionValuesFromProps:E0,createRenderState:_0})};function r2(e,t,n){for(const r in t)!en(t[r])&&!X_(r,n)&&(e[r]=t[r])}function K5({transformTemplate:e},t){return v.useMemo(()=>{const n=_0();return S0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function X5(e,t){const n=e.style||{},r={};return r2(r,n,e),Object.assign(r,K5(e,t)),r}function Q5(e,t){const n={},r=X5(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Z5=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function tf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Z5.has(e)}let i2=e=>!tf(e);function J5(e){e&&(i2=t=>t.startsWith("on")?!tf(t):e(t))}try{J5(require("@emotion/is-prop-valid").default)}catch{}function e8(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(i2(i)||n===!0&&tf(i)||!t&&!tf(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function t8(e,t,n,r){const i=v.useMemo(()=>{const a=e2();return C0(a,t,A0(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};r2(a,e.style,e),i.style={...a,...i.style}}return i}function n8(e=!1){return(n,r,i,{latestValues:a},o)=>{const u=(b0(n)?t8:Q5)(r,a,o,n),l=e8(r,typeof n=="string",e),c=n!==v.Fragment?{...l,...u,ref:i}:{},{children:d}=r,f=v.useMemo(()=>en(d)?d.get():d,[d]);return v.createElement(n,{...c,children:f})}}function r8(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...b0(r)?q5:G5,preloadedFeatures:e,useRender:n8(i),createVisualElement:t,Component:r};return I5(o)}}const k0={current:null},a2={current:!1};function i8(){if(a2.current=!0,!!w0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>k0.current=e.matches;e.addListener(t),t()}else k0.current=!1}function a8(e,t,n){for(const r in t){const i=t[r],a=n[r];if(en(i))e.addValue(r,i);else if(en(a))e.addValue(r,Qu(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Qu(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const o2=new WeakMap,o8=[...VE,Jt,ta],s8=e=>o8.find(zE(e)),s2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class u8{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Dg,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Ur.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Xe.render(this.render,!1,!0))};const{latestValues:u,renderState:l}=o;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=ef(n),this.isVariantNode=$_(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];u[f]!==void 0&&en(p)&&p.set(u[f],!1)}}mount(t){this.current=t,o2.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),a2.current||i8(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:k0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){o2.delete(this.current),this.projection&&this.projection.unmount(),Zi(this.notifyUpdate),Zi(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Qi.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Xe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in os){const n=os[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Tt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<s2.length;r++){const i=s2[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=a8(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Qu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(DE(i)||OE(i))?i=parseFloat(i):!s8(i)&&ta.test(n)&&(i=eT(t,n)),this.setBaseTarget(t,en(i)?i.get():i)),en(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=Tg(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!en(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new n0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class u2 extends u8{constructor(){super(...arguments),this.KeyframeResolver=tT}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function l8(e){return window.getComputedStyle(e)}class c8 extends u2{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=q_}readValueFromInstance(t,n){if(Qi.has(n)){const r=Hg(n);return r&&r.default||0}else{const r=l8(t),i=(ME(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return i_(t,n)}build(t,n,r){S0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return E0(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;en(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class d8 extends u2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Tt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qi.has(n)){const r=Hg(n);return r&&r.default||0}return n=G_.has(n)?n:Wd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Q_(t,n,r)}build(t,n,r){C0(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){K_(t,n,r,i)}mount(t){this.isSVGTag=A0(t.tagName),super.mount(t)}}const f8=(e,t)=>b0(e)?new d8(t):new c8(t,{allowProjection:e!==v.Fragment}),p8=r8({...tM,...T5,...f5,..._5},f8),ss=K6(p8);class h8 extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function m8({children:e,isPresent:t}){const n=v.useId(),r=v.useRef(null),i=v.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=v.useContext(x0);return v.useInsertionEffect(()=>{const{width:o,height:s,top:u,left:l}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return a&&(c.nonce=a),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
41
41
  [data-motion-pop-id="${n}"] {
42
42
  position: absolute !important;
43
43
  width: ${o}px !important;
@@ -45,12 +45,12 @@ Error generating stack: `+a.message+`
45
45
  top: ${u}px !important;
46
46
  left: ${l}px !important;
47
47
  }
48
- `),()=>{document.head.removeChild(c)}},[t]),E.jsx(h8,{isPresent:t,childRef:r,sizeRef:i,children:v.cloneElement(e,{ref:r})})}const g8=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o})=>{const s=T0(y8),u=v.useId(),l=v.useCallback(d=>{s.set(d,!0);for(const f of s.values())if(!f)return;r&&r()},[s,r]),c=v.useMemo(()=>({id:u,initial:t,isPresent:n,custom:i,onExitComplete:l,register:d=>(s.set(d,!1),()=>s.delete(d))}),a?[Math.random(),l]:[n,l]);return v.useMemo(()=>{s.forEach((d,f)=>s.set(f,!1))},[n]),v.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),o==="popLayout"&&(e=E.jsx(m8,{isPresent:n,children:e})),E.jsx(Kd.Provider,{value:c,children:e})};function y8(){return new Map}const nf=e=>e.key||"";function l_(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const ir=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:o="sync"})=>{const s=v.useMemo(()=>l_(e),[e]),u=s.map(nf),l=v.useRef(!0),c=v.useRef(s),d=T0(()=>new Map),[f,p]=v.useState(s),[m,y]=v.useState(s);H2(()=>{l.current=!1,c.current=s;for(let x=0;x<m.length;x++){const b=nf(m[x]);u.includes(b)?d.delete(b):d.get(b)!==!0&&d.set(b,!1)}},[m,u.length,u.join("-")]);const w=[];if(s!==f){let x=[...s];for(let b=0;b<m.length;b++){const T=m[b],S=nf(T);u.includes(S)||(x.splice(b,0,T),w.push(T))}o==="wait"&&w.length&&(x=w),y(l_(x)),p(s);return}const{forceRender:g}=v.useContext(d0);return E.jsx(E.Fragment,{children:m.map(x=>{const b=nf(x),T=s===m||u.includes(b),S=()=>{if(d.has(b))d.set(b,!0);else return;let _=!0;d.forEach(N=>{N||(_=!1)}),_&&(g==null||g(),y(c.current),i&&i())};return E.jsx(g8,{isPresent:T,initial:!l.current||r?void 0:!1,custom:T?void 0:n,presenceAffectsLayout:a,mode:o,onExitComplete:T?void 0:S,children:x},b)})})};function c_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=c_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function v8(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=c_(e))&&(r&&(r+=" "),r+=t);return r}const R0="-",x8=e=>{const t=b8(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(R0);return s[0]===""&&s.length!==1&&s.shift(),d_(s,t)||w8(o)},getConflictingClassGroupIds:(o,s)=>{const u=n[o]||[];return s&&r[o]?[...u,...r[o]]:u}}},d_=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?d_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(R0);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},f_=/^\[(.+)\]$/,w8=e=>{if(f_.test(e)){const t=f_.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},b8=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return T8(Object.entries(e.classGroups),n).forEach(([a,o])=>{N0(o,r,a,t)}),r},N0=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:p_(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(E8(i)){N0(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{N0(o,p_(t,a),n,r)})})},p_=(e,t)=>{let n=e;return t.split(R0).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},E8=e=>e.isThemeGetter,T8=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[t+o,s])):a);return[n,i]}):e,_8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},h_="!",S8=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=s=>{const u=[];let l=0,c=0,d;for(let w=0;w<s.length;w++){let g=s[w];if(l===0){if(g===i&&(r||s.slice(w,w+a)===t)){u.push(s.slice(c,w)),c=w+a;continue}if(g==="/"){d=w;continue}}g==="["?l++:g==="]"&&l--}const f=u.length===0?s:s.substring(c),p=f.startsWith(h_),m=p?f.substring(1):f,y=d&&d>c?d-c:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:y}};return n?s=>n({className:s,parseClassName:o}):o},C8=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},A8=e=>({cache:_8(e.cacheSize),parseClassName:S8(e),...x8(e)}),k8=/\s+/,R8=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(k8);let s="";for(let u=o.length-1;u>=0;u-=1){const l=o[u],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(l);let m=!!p,y=r(m?f.substring(0,p):f);if(!y){if(!m){s=l+(s.length>0?" "+s:s);continue}if(y=r(f),!y){s=l+(s.length>0?" "+s:s);continue}m=!1}const w=C8(c).join(":"),g=d?w+h_:w,x=g+y;if(a.includes(x))continue;a.push(x);const b=i(y,m);for(let T=0;T<b.length;++T){const S=b[T];a.push(g+S)}s=l+(s.length>0?" "+s:s)}return s};function N8(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=m_(t))&&(r&&(r+=" "),r+=n);return r}const m_=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=m_(e[r]))&&(n&&(n+=" "),n+=t);return n};function P8(e,...t){let n,r,i,a=o;function o(u){const l=t.reduce((c,d)=>d(c),e());return n=A8(l),r=n.cache.get,i=n.cache.set,a=s,s(u)}function s(u){const l=r(u);if(l)return l;const c=R8(u,n);return i(u,c),c}return function(){return a(N8.apply(null,arguments))}}const it=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},g_=/^\[(?:([a-z-]+):)?(.+)\]$/i,I8=/^\d+\/\d+$/,O8=new Set(["px","full","screen"]),D8=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,L8=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,M8=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,F8=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,B8=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yi=e=>us(e)||O8.has(e)||I8.test(e),ra=e=>ls(e,"length",Y8),us=e=>!!e&&!Number.isNaN(Number(e)),P0=e=>ls(e,"number",us),nl=e=>!!e&&Number.isInteger(Number(e)),j8=e=>e.endsWith("%")&&us(e.slice(0,-1)),ke=e=>g_.test(e),ia=e=>D8.test(e),U8=new Set(["length","size","percentage"]),H8=e=>ls(e,U8,y_),z8=e=>ls(e,"position",y_),V8=new Set(["image","url"]),$8=e=>ls(e,V8,G8),W8=e=>ls(e,"",q8),rl=()=>!0,ls=(e,t,n)=>{const r=g_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Y8=e=>L8.test(e)&&!M8.test(e),y_=()=>!1,q8=e=>F8.test(e),G8=e=>B8.test(e),K8=P8(()=>{const e=it("colors"),t=it("spacing"),n=it("blur"),r=it("brightness"),i=it("borderColor"),a=it("borderRadius"),o=it("borderSpacing"),s=it("borderWidth"),u=it("contrast"),l=it("grayscale"),c=it("hueRotate"),d=it("invert"),f=it("gap"),p=it("gradientColorStops"),m=it("gradientColorStopPositions"),y=it("inset"),w=it("margin"),g=it("opacity"),x=it("padding"),b=it("saturate"),T=it("scale"),S=it("sepia"),_=it("skew"),N=it("space"),D=it("translate"),V=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",ke,t],H=()=>[ke,t],X=()=>["",yi,ra],Y=()=>["auto",us,ke],re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",ke],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ae=()=>[us,ke];return{cacheSize:500,separator:":",theme:{colors:[rl],spacing:[yi,ra],blur:["none","",ia,ke],brightness:ae(),borderColor:[e],borderRadius:["none","","full",ia,ke],borderSpacing:H(),borderWidth:X(),contrast:ae(),grayscale:B(),hueRotate:ae(),invert:B(),gap:H(),gradientColorStops:[e],gradientColorStopPositions:[j8,ra],inset:$(),margin:$(),opacity:ae(),padding:H(),saturate:ae(),scale:ae(),sepia:B(),skew:ae(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",ke]}],container:["container"],columns:[{columns:[ia]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...re(),ke]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nl,ke]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ke]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",nl,ke]}],"grid-cols":[{"grid-cols":[rl]}],"col-start-end":[{col:["auto",{span:["full",nl,ke]},ke]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[rl]}],"row-start-end":[{row:["auto",{span:[nl,ke]},ke]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ke]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ke]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ke,t]}],"min-w":[{"min-w":[ke,t,"min","max","fit"]}],"max-w":[{"max-w":[ke,t,"none","full","min","max","fit","prose",{screen:[ia]},ia]}],h:[{h:[ke,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ke,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ia,ra]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",P0]}],"font-family":[{font:[rl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ke]}],"line-clamp":[{"line-clamp":["none",us,P0]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yi,ke]}],"list-image":[{"list-image":["none",ke]}],"list-style-type":[{list:["none","disc","decimal",ke]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yi,ra]}],"underline-offset":[{"underline-offset":["auto",yi,ke]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...re(),z8]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",H8]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},$8]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:ie()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[yi,ke]}],"outline-w":[{outline:[yi,ra]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[yi,ra]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ia,W8]}],"shadow-color":[{shadow:[rl]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",ia,ke]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ke]}],duration:[{duration:ae()}],ease:[{ease:["linear","in","out","in-out",ke]}],delay:[{delay:ae()}],animate:[{animate:["none","spin","ping","pulse","bounce",ke]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[nl,ke]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ke]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[yi,ra,P0]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function Le(...e){return K8(v8(e))}const X8="[data-chat-widget-content-root]";function I0({fallbackHeight:e}){const t=v.useRef(null);return v.useEffect(()=>{const n=document.querySelector(X8);if(n&&t.current){const r=t.current;let i;const a=new ResizeObserver(()=>{i=requestAnimationFrame(()=>{const o=Math.max(r.offsetHeight,e);n.style.setProperty("--opencx-widget-height",o.toFixed(1)+"px")})});return a.observe(r),()=>{cancelAnimationFrame(i),a.unobserve(r)}}},[]),{observedElementRef:t}}/**
48
+ `),()=>{document.head.removeChild(c)}},[t]),E.jsx(h8,{isPresent:t,childRef:r,sizeRef:i,children:v.cloneElement(e,{ref:r})})}const g8=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o})=>{const s=T0(y8),u=v.useId(),l=v.useCallback(d=>{s.set(d,!0);for(const f of s.values())if(!f)return;r&&r()},[s,r]),c=v.useMemo(()=>({id:u,initial:t,isPresent:n,custom:i,onExitComplete:l,register:d=>(s.set(d,!1),()=>s.delete(d))}),a?[Math.random(),l]:[n,l]);return v.useMemo(()=>{s.forEach((d,f)=>s.set(f,!1))},[n]),v.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),o==="popLayout"&&(e=E.jsx(m8,{isPresent:n,children:e})),E.jsx(Kd.Provider,{value:c,children:e})};function y8(){return new Map}const nf=e=>e.key||"";function l2(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const ir=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:o="sync"})=>{const s=v.useMemo(()=>l2(e),[e]),u=s.map(nf),l=v.useRef(!0),c=v.useRef(s),d=T0(()=>new Map),[f,p]=v.useState(s),[m,y]=v.useState(s);H_(()=>{l.current=!1,c.current=s;for(let x=0;x<m.length;x++){const b=nf(m[x]);u.includes(b)?d.delete(b):d.get(b)!==!0&&d.set(b,!1)}},[m,u.length,u.join("-")]);const w=[];if(s!==f){let x=[...s];for(let b=0;b<m.length;b++){const T=m[b],S=nf(T);u.includes(S)||(x.splice(b,0,T),w.push(T))}o==="wait"&&w.length&&(x=w),y(l2(x)),p(s);return}const{forceRender:g}=v.useContext(d0);return E.jsx(E.Fragment,{children:m.map(x=>{const b=nf(x),T=s===m||u.includes(b),S=()=>{if(d.has(b))d.set(b,!0);else return;let _=!0;d.forEach(N=>{N||(_=!1)}),_&&(g==null||g(),y(c.current),i&&i())};return E.jsx(g8,{isPresent:T,initial:!l.current||r?void 0:!1,custom:T?void 0:n,presenceAffectsLayout:a,mode:o,onExitComplete:T?void 0:S,children:x},b)})})};function c2(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=c2(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function v8(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=c2(e))&&(r&&(r+=" "),r+=t);return r}const R0="-",x8=e=>{const t=b8(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(R0);return s[0]===""&&s.length!==1&&s.shift(),d2(s,t)||w8(o)},getConflictingClassGroupIds:(o,s)=>{const u=n[o]||[];return s&&r[o]?[...u,...r[o]]:u}}},d2=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?d2(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(R0);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},f2=/^\[(.+)\]$/,w8=e=>{if(f2.test(e)){const t=f2.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},b8=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return T8(Object.entries(e.classGroups),n).forEach(([a,o])=>{N0(o,r,a,t)}),r},N0=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:p2(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(E8(i)){N0(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{N0(o,p2(t,a),n,r)})})},p2=(e,t)=>{let n=e;return t.split(R0).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},E8=e=>e.isThemeGetter,T8=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[t+o,s])):a);return[n,i]}):e,_8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},h2="!",S8=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=s=>{const u=[];let l=0,c=0,d;for(let w=0;w<s.length;w++){let g=s[w];if(l===0){if(g===i&&(r||s.slice(w,w+a)===t)){u.push(s.slice(c,w)),c=w+a;continue}if(g==="/"){d=w;continue}}g==="["?l++:g==="]"&&l--}const f=u.length===0?s:s.substring(c),p=f.startsWith(h2),m=p?f.substring(1):f,y=d&&d>c?d-c:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:y}};return n?s=>n({className:s,parseClassName:o}):o},C8=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},A8=e=>({cache:_8(e.cacheSize),parseClassName:S8(e),...x8(e)}),k8=/\s+/,R8=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(k8);let s="";for(let u=o.length-1;u>=0;u-=1){const l=o[u],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(l);let m=!!p,y=r(m?f.substring(0,p):f);if(!y){if(!m){s=l+(s.length>0?" "+s:s);continue}if(y=r(f),!y){s=l+(s.length>0?" "+s:s);continue}m=!1}const w=C8(c).join(":"),g=d?w+h2:w,x=g+y;if(a.includes(x))continue;a.push(x);const b=i(y,m);for(let T=0;T<b.length;++T){const S=b[T];a.push(g+S)}s=l+(s.length>0?" "+s:s)}return s};function N8(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=m2(t))&&(r&&(r+=" "),r+=n);return r}const m2=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=m2(e[r]))&&(n&&(n+=" "),n+=t);return n};function P8(e,...t){let n,r,i,a=o;function o(u){const l=t.reduce((c,d)=>d(c),e());return n=A8(l),r=n.cache.get,i=n.cache.set,a=s,s(u)}function s(u){const l=r(u);if(l)return l;const c=R8(u,n);return i(u,c),c}return function(){return a(N8.apply(null,arguments))}}const it=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},g2=/^\[(?:([a-z-]+):)?(.+)\]$/i,I8=/^\d+\/\d+$/,O8=new Set(["px","full","screen"]),D8=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,L8=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,M8=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,F8=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,B8=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yi=e=>us(e)||O8.has(e)||I8.test(e),ra=e=>ls(e,"length",Y8),us=e=>!!e&&!Number.isNaN(Number(e)),P0=e=>ls(e,"number",us),nl=e=>!!e&&Number.isInteger(Number(e)),j8=e=>e.endsWith("%")&&us(e.slice(0,-1)),ke=e=>g2.test(e),ia=e=>D8.test(e),U8=new Set(["length","size","percentage"]),H8=e=>ls(e,U8,y2),z8=e=>ls(e,"position",y2),V8=new Set(["image","url"]),$8=e=>ls(e,V8,G8),W8=e=>ls(e,"",q8),rl=()=>!0,ls=(e,t,n)=>{const r=g2.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Y8=e=>L8.test(e)&&!M8.test(e),y2=()=>!1,q8=e=>F8.test(e),G8=e=>B8.test(e),K8=P8(()=>{const e=it("colors"),t=it("spacing"),n=it("blur"),r=it("brightness"),i=it("borderColor"),a=it("borderRadius"),o=it("borderSpacing"),s=it("borderWidth"),u=it("contrast"),l=it("grayscale"),c=it("hueRotate"),d=it("invert"),f=it("gap"),p=it("gradientColorStops"),m=it("gradientColorStopPositions"),y=it("inset"),w=it("margin"),g=it("opacity"),x=it("padding"),b=it("saturate"),T=it("scale"),S=it("sepia"),_=it("skew"),N=it("space"),D=it("translate"),V=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",ke,t],H=()=>[ke,t],X=()=>["",yi,ra],Y=()=>["auto",us,ke],re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",ke],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ae=()=>[us,ke];return{cacheSize:500,separator:":",theme:{colors:[rl],spacing:[yi,ra],blur:["none","",ia,ke],brightness:ae(),borderColor:[e],borderRadius:["none","","full",ia,ke],borderSpacing:H(),borderWidth:X(),contrast:ae(),grayscale:B(),hueRotate:ae(),invert:B(),gap:H(),gradientColorStops:[e],gradientColorStopPositions:[j8,ra],inset:$(),margin:$(),opacity:ae(),padding:H(),saturate:ae(),scale:ae(),sepia:B(),skew:ae(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",ke]}],container:["container"],columns:[{columns:[ia]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...re(),ke]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nl,ke]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ke]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",nl,ke]}],"grid-cols":[{"grid-cols":[rl]}],"col-start-end":[{col:["auto",{span:["full",nl,ke]},ke]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[rl]}],"row-start-end":[{row:["auto",{span:[nl,ke]},ke]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ke]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ke]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ke,t]}],"min-w":[{"min-w":[ke,t,"min","max","fit"]}],"max-w":[{"max-w":[ke,t,"none","full","min","max","fit","prose",{screen:[ia]},ia]}],h:[{h:[ke,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ke,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ia,ra]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",P0]}],"font-family":[{font:[rl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ke]}],"line-clamp":[{"line-clamp":["none",us,P0]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yi,ke]}],"list-image":[{"list-image":["none",ke]}],"list-style-type":[{list:["none","disc","decimal",ke]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yi,ra]}],"underline-offset":[{"underline-offset":["auto",yi,ke]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...re(),z8]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",H8]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},$8]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:ie()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[yi,ke]}],"outline-w":[{outline:[yi,ra]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[yi,ra]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ia,W8]}],"shadow-color":[{shadow:[rl]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",ia,ke]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ke]}],duration:[{duration:ae()}],ease:[{ease:["linear","in","out","in-out",ke]}],delay:[{delay:ae()}],animate:[{animate:["none","spin","ping","pulse","bounce",ke]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[nl,ke]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ke]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[yi,ra,P0]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function Le(...e){return K8(v8(e))}const X8="[data-chat-widget-content-root]";function I0({fallbackHeight:e}){const t=v.useRef(null);return v.useEffect(()=>{const n=document.querySelector(X8);if(n&&t.current){const r=t.current;let i;const a=new ResizeObserver(()=>{i=requestAnimationFrame(()=>{const o=Math.max(r.offsetHeight,e);n.style.setProperty("--opencx-widget-height",o.toFixed(1)+"px")})});return a.observe(r),()=>{cancelAnimationFrame(i),a.unobserve(r)}}},[]),{observedElementRef:t}}/**
49
49
  * @license lucide-react v0.436.0 - ISC
50
50
  *
51
51
  * This source code is licensed under the ISC license.
52
52
  * See the LICENSE file in the root directory of this source tree.
53
- */const Q8=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),v_=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
53
+ */const Q8=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),v2=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
54
54
  * @license lucide-react v0.436.0 - ISC
55
55
  *
56
56
  * This source code is licensed under the ISC license.
@@ -60,12 +60,12 @@ Error generating stack: `+a.message+`
60
60
  *
61
61
  * This source code is licensed under the ISC license.
62
62
  * See the LICENSE file in the root directory of this source tree.
63
- */const J8=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},u)=>v.createElement("svg",{ref:u,...Z8,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:v_("lucide",i),...s},[...o.map(([l,c])=>v.createElement(l,c)),...Array.isArray(a)?a:[a]]));/**
63
+ */const J8=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},u)=>v.createElement("svg",{ref:u,...Z8,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:v2("lucide",i),...s},[...o.map(([l,c])=>v.createElement(l,c)),...Array.isArray(a)?a:[a]]));/**
64
64
  * @license lucide-react v0.436.0 - ISC
65
65
  *
66
66
  * This source code is licensed under the ISC license.
67
67
  * See the LICENSE file in the root directory of this source tree.
68
- */const tn=(e,t)=>{const n=v.forwardRef(({className:r,...i},a)=>v.createElement(J8,{ref:a,iconNode:t,className:v_(`lucide-${Q8(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
68
+ */const tn=(e,t)=>{const n=v.forwardRef(({className:r,...i},a)=>v.createElement(J8,{ref:a,iconNode:t,className:v2(`lucide-${Q8(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
69
69
  * @license lucide-react v0.436.0 - ISC
70
70
  *
71
71
  * This source code is licensed under the ISC license.
@@ -85,7 +85,7 @@ Error generating stack: `+a.message+`
85
85
  *
86
86
  * This source code is licensed under the ISC license.
87
87
  * See the LICENSE file in the root directory of this source tree.
88
- */const x_=tn("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
88
+ */const x2=tn("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
89
89
  * @license lucide-react v0.436.0 - ISC
90
90
  *
91
91
  * This source code is licensed under the ISC license.
@@ -140,12 +140,12 @@ Error generating stack: `+a.message+`
140
140
  *
141
141
  * This source code is licensed under the ISC license.
142
142
  * See the LICENSE file in the root directory of this source tree.
143
- */const w_=tn("SendHorizontal",[["path",{d:"m3 3 3 9-3 9 19-9Z",key:"1aobqy"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/**
143
+ */const w2=tn("SendHorizontal",[["path",{d:"m3 3 3 9-3 9 19-9Z",key:"1aobqy"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/**
144
144
  * @license lucide-react v0.436.0 - ISC
145
145
  *
146
146
  * This source code is licensed under the ISC license.
147
147
  * See the LICENSE file in the root directory of this source tree.
148
- */const b_=tn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var E_={exports:{}},pF="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",hF=pF,mF=hF;function T_(){}function __(){}__.resetWarningCache=T_;var gF=function(){function e(r,i,a,o,s,u){if(u!==mF){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:__,resetWarningCache:T_};return n.PropTypes=n,n};E_.exports=gF();var yF=E_.exports;const Ze=Ct(yF);var O0=function(e,t){return O0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},O0(e,t)};function S_(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");O0(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Mt=function(){return Mt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Mt.apply(this,arguments)};function il(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function C_(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function A_(e,t){return function(n,r){t(n,r,e)}}function k_(e,t,n,r,i,a){function o(g){if(g!==void 0&&typeof g!="function")throw new TypeError("Function expected");return g}for(var s=r.kind,u=s==="getter"?"get":s==="setter"?"set":"value",l=!t&&e?r.static?e:e.prototype:null,c=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),d,f=!1,p=n.length-1;p>=0;p--){var m={};for(var y in r)m[y]=y==="access"?{}:r[y];for(var y in r.access)m.access[y]=r.access[y];m.addInitializer=function(g){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(g||null))};var w=(0,n[p])(s==="accessor"?{get:c.get,set:c.set}:c[u],m);if(s==="accessor"){if(w===void 0)continue;if(w===null||typeof w!="object")throw new TypeError("Object expected");(d=o(w.get))&&(c.get=d),(d=o(w.set))&&(c.set=d),(d=o(w.init))&&i.unshift(d)}else(d=o(w))&&(s==="field"?i.unshift(d):c[u]=d)}l&&Object.defineProperty(l,r.name,c),f=!0}function R_(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function N_(e){return typeof e=="symbol"?e:"".concat(e)}function P_(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function I_(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function vi(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(d){o(d)}}function u(c){try{l(r.throw(c))}catch(d){o(d)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})}function O_(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var rf=Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};function D_(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&rf(t,e,n)}function af(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function D0(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function L_(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(D0(arguments[t]));return e}function M_(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}function of(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function cs(e){return this instanceof cs?(this.v=e,this):new cs(e)}function F_(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(p){return function(m){return Promise.resolve(m).then(p,d)}}function s(p,m){r[p]&&(i[p]=function(y){return new Promise(function(w,g){a.push([p,y,w,g])>1||u(p,y)})},m&&(i[p]=m(i[p])))}function u(p,m){try{l(r[p](m))}catch(y){f(a[0][3],y)}}function l(p){p.value instanceof cs?Promise.resolve(p.value.v).then(c,d):f(a[0][2],p)}function c(p){u("next",p)}function d(p){u("throw",p)}function f(p,m){p(m),a.shift(),a.length&&u(a[0][0],a[0][1])}}function B_(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:cs(e[i](o)),done:!1}:a?a(o):o}:a}}function j_(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof af=="function"?af(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(s,u){o=e[a](o),i(s,u,o.done,o.value)})}}function i(a,o,s,u){Promise.resolve(u).then(function(l){a({value:l,done:s})},o)}}function U_(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var vF=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function H_(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&rf(t,e,n);return vF(t,e),t}function z_(e){return e&&e.__esModule?e:{default:e}}function V_(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function $_(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function W_(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Y_(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var xF=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function q_(e){function t(a){e.error=e.hasError?new xF(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}var n,r=0;function i(){for(;n=e.stack.pop();)try{if(!n.async&&r===1)return r=0,e.stack.push(n),Promise.resolve().then(i);if(n.dispose){var a=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(a).then(i,function(o){return t(o),i()})}else r|=1}catch(o){t(o)}if(r===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i()}function G_(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,i,a,o){return r?t?".jsx":".js":i&&(!a||!o)?n:i+a+"."+o.toLowerCase()+"js"}):e}const wF=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Y_,get __assign(){return Mt},__asyncDelegator:B_,__asyncGenerator:F_,__asyncValues:j_,__await:cs,__awaiter:vi,__classPrivateFieldGet:V_,__classPrivateFieldIn:W_,__classPrivateFieldSet:$_,__createBinding:rf,__decorate:C_,__disposeResources:q_,__esDecorate:k_,__exportStar:D_,__extends:S_,__generator:O_,__importDefault:z_,__importStar:H_,__makeTemplateObject:U_,__metadata:I_,__param:A_,__propKey:N_,__read:D0,__rest:il,__rewriteRelativeImportExtension:G_,__runInitializers:R_,__setFunctionName:P_,__spread:L_,__spreadArray:of,__spreadArrays:M_,__values:af,default:{__extends:S_,__assign:Mt,__rest:il,__decorate:C_,__param:A_,__esDecorate:k_,__runInitializers:R_,__propKey:N_,__setFunctionName:P_,__metadata:I_,__awaiter:vi,__generator:O_,__createBinding:rf,__exportStar:D_,__values:af,__read:D0,__spread:L_,__spreadArrays:M_,__spreadArray:of,__await:cs,__asyncGenerator:F_,__asyncDelegator:B_,__asyncValues:j_,__makeTemplateObject:U_,__importStar:H_,__importDefault:z_,__classPrivateFieldGet:V_,__classPrivateFieldSet:$_,__classPrivateFieldIn:W_,__addDisposableResource:Y_,__disposeResources:q_,__rewriteRelativeImportExtension:G_}},Symbol.toStringTag,{value:"Module"})),bF=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function ds(e,t,n){const r=EF(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&K_(r,"path",a),K_(r,"relativePath",a),r}function EF(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=bF.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function K_(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const TF=[".DS_Store","Thumbs.db"];function _F(e){return vi(this,void 0,void 0,function*(){return sf(e)&&SF(e.dataTransfer)?RF(e.dataTransfer,e.type):CF(e)?AF(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?kF(e):[]})}function SF(e){return sf(e)}function CF(e){return sf(e)&&sf(e.target)}function sf(e){return typeof e=="object"&&e!==null}function AF(e){return L0(e.target.files).map(t=>ds(t))}function kF(e){return vi(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ds(n))})}function RF(e,t){return vi(this,void 0,void 0,function*(){if(e.items){const n=L0(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(NF));return X_(Q_(r))}return X_(L0(e.files).map(n=>ds(n)))})}function X_(e){return e.filter(t=>TF.indexOf(t.name)===-1)}function L0(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function NF(e){if(typeof e.webkitGetAsEntry!="function")return Z_(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?J_(t):Z_(e,t)}function Q_(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Q_(n):[n]],[])}function Z_(e,t){var n;if(typeof e.getAsFileSystemHandle=="function")return e.getAsFileSystemHandle().then(a=>vi(this,void 0,void 0,function*(){const o=yield a.getFile();return o.handle=a,ds(o)}));const r=e.getAsFile();if(!r)return Promise.reject(`${e} is not a File`);const i=ds(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0);return Promise.resolve(i)}function PF(e){return vi(this,void 0,void 0,function*(){return e.isDirectory?J_(e):IF(e)})}function J_(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function a(){t.readEntries(o=>vi(this,void 0,void 0,function*(){if(o.length){const s=Promise.all(o.map(PF));i.push(s),a()}else try{const s=yield Promise.all(i);n(s)}catch(s){r(s)}}),o=>{r(o)})}a()})}function IF(e){return vi(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=ds(r,e.fullPath);t(i)},r=>{n(r)})})})}var M0=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0};function eS(e){return LF(e)||DF(e)||iS(e)||OF()}function OF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
148
+ */const b2=tn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var E2={exports:{}},pF="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",hF=pF,mF=hF;function T2(){}function _2(){}_2.resetWarningCache=T2;var gF=function(){function e(r,i,a,o,s,u){if(u!==mF){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:_2,resetWarningCache:T2};return n.PropTypes=n,n};E2.exports=gF();var yF=E2.exports;const Ze=Ct(yF);var O0=function(e,t){return O0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},O0(e,t)};function S2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");O0(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Mt=function(){return Mt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Mt.apply(this,arguments)};function il(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function C2(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function A2(e,t){return function(n,r){t(n,r,e)}}function k2(e,t,n,r,i,a){function o(g){if(g!==void 0&&typeof g!="function")throw new TypeError("Function expected");return g}for(var s=r.kind,u=s==="getter"?"get":s==="setter"?"set":"value",l=!t&&e?r.static?e:e.prototype:null,c=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),d,f=!1,p=n.length-1;p>=0;p--){var m={};for(var y in r)m[y]=y==="access"?{}:r[y];for(var y in r.access)m.access[y]=r.access[y];m.addInitializer=function(g){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(g||null))};var w=(0,n[p])(s==="accessor"?{get:c.get,set:c.set}:c[u],m);if(s==="accessor"){if(w===void 0)continue;if(w===null||typeof w!="object")throw new TypeError("Object expected");(d=o(w.get))&&(c.get=d),(d=o(w.set))&&(c.set=d),(d=o(w.init))&&i.unshift(d)}else(d=o(w))&&(s==="field"?i.unshift(d):c[u]=d)}l&&Object.defineProperty(l,r.name,c),f=!0}function R2(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function N2(e){return typeof e=="symbol"?e:"".concat(e)}function P2(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function I2(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function vi(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(d){o(d)}}function u(c){try{l(r.throw(c))}catch(d){o(d)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})}function O2(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var rf=Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};function D2(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&rf(t,e,n)}function af(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function D0(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function L2(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(D0(arguments[t]));return e}function M2(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}function of(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function cs(e){return this instanceof cs?(this.v=e,this):new cs(e)}function F2(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(p){return function(m){return Promise.resolve(m).then(p,d)}}function s(p,m){r[p]&&(i[p]=function(y){return new Promise(function(w,g){a.push([p,y,w,g])>1||u(p,y)})},m&&(i[p]=m(i[p])))}function u(p,m){try{l(r[p](m))}catch(y){f(a[0][3],y)}}function l(p){p.value instanceof cs?Promise.resolve(p.value.v).then(c,d):f(a[0][2],p)}function c(p){u("next",p)}function d(p){u("throw",p)}function f(p,m){p(m),a.shift(),a.length&&u(a[0][0],a[0][1])}}function B2(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:cs(e[i](o)),done:!1}:a?a(o):o}:a}}function j2(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof af=="function"?af(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(s,u){o=e[a](o),i(s,u,o.done,o.value)})}}function i(a,o,s,u){Promise.resolve(u).then(function(l){a({value:l,done:s})},o)}}function U2(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var vF=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function H2(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&rf(t,e,n);return vF(t,e),t}function z2(e){return e&&e.__esModule?e:{default:e}}function V2(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function $2(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function W2(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Y2(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var xF=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function q2(e){function t(a){e.error=e.hasError?new xF(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}var n,r=0;function i(){for(;n=e.stack.pop();)try{if(!n.async&&r===1)return r=0,e.stack.push(n),Promise.resolve().then(i);if(n.dispose){var a=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(a).then(i,function(o){return t(o),i()})}else r|=1}catch(o){t(o)}if(r===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i()}function G2(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,i,a,o){return r?t?".jsx":".js":i&&(!a||!o)?n:i+a+"."+o.toLowerCase()+"js"}):e}const wF=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Y2,get __assign(){return Mt},__asyncDelegator:B2,__asyncGenerator:F2,__asyncValues:j2,__await:cs,__awaiter:vi,__classPrivateFieldGet:V2,__classPrivateFieldIn:W2,__classPrivateFieldSet:$2,__createBinding:rf,__decorate:C2,__disposeResources:q2,__esDecorate:k2,__exportStar:D2,__extends:S2,__generator:O2,__importDefault:z2,__importStar:H2,__makeTemplateObject:U2,__metadata:I2,__param:A2,__propKey:N2,__read:D0,__rest:il,__rewriteRelativeImportExtension:G2,__runInitializers:R2,__setFunctionName:P2,__spread:L2,__spreadArray:of,__spreadArrays:M2,__values:af,default:{__extends:S2,__assign:Mt,__rest:il,__decorate:C2,__param:A2,__esDecorate:k2,__runInitializers:R2,__propKey:N2,__setFunctionName:P2,__metadata:I2,__awaiter:vi,__generator:O2,__createBinding:rf,__exportStar:D2,__values:af,__read:D0,__spread:L2,__spreadArrays:M2,__spreadArray:of,__await:cs,__asyncGenerator:F2,__asyncDelegator:B2,__asyncValues:j2,__makeTemplateObject:U2,__importStar:H2,__importDefault:z2,__classPrivateFieldGet:V2,__classPrivateFieldSet:$2,__classPrivateFieldIn:W2,__addDisposableResource:Y2,__disposeResources:q2,__rewriteRelativeImportExtension:G2}},Symbol.toStringTag,{value:"Module"})),bF=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function ds(e,t,n){const r=EF(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&K2(r,"path",a),K2(r,"relativePath",a),r}function EF(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=bF.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function K2(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const TF=[".DS_Store","Thumbs.db"];function _F(e){return vi(this,void 0,void 0,function*(){return sf(e)&&SF(e.dataTransfer)?RF(e.dataTransfer,e.type):CF(e)?AF(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?kF(e):[]})}function SF(e){return sf(e)}function CF(e){return sf(e)&&sf(e.target)}function sf(e){return typeof e=="object"&&e!==null}function AF(e){return L0(e.target.files).map(t=>ds(t))}function kF(e){return vi(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ds(n))})}function RF(e,t){return vi(this,void 0,void 0,function*(){if(e.items){const n=L0(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(NF));return X2(Q2(r))}return X2(L0(e.files).map(n=>ds(n)))})}function X2(e){return e.filter(t=>TF.indexOf(t.name)===-1)}function L0(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function NF(e){if(typeof e.webkitGetAsEntry!="function")return Z2(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?J2(t):Z2(e,t)}function Q2(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Q2(n):[n]],[])}function Z2(e,t){var n;if(typeof e.getAsFileSystemHandle=="function")return e.getAsFileSystemHandle().then(a=>vi(this,void 0,void 0,function*(){const o=yield a.getFile();return o.handle=a,ds(o)}));const r=e.getAsFile();if(!r)return Promise.reject(`${e} is not a File`);const i=ds(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0);return Promise.resolve(i)}function PF(e){return vi(this,void 0,void 0,function*(){return e.isDirectory?J2(e):IF(e)})}function J2(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function a(){t.readEntries(o=>vi(this,void 0,void 0,function*(){if(o.length){const s=Promise.all(o.map(PF));i.push(s),a()}else try{const s=yield Promise.all(i);n(s)}catch(s){r(s)}}),o=>{r(o)})}a()})}function IF(e){return vi(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=ds(r,e.fullPath);t(i)},r=>{n(r)})})})}var M0=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0};function eS(e){return LF(e)||DF(e)||iS(e)||OF()}function OF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
149
149
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LF(e){if(Array.isArray(e))return F0(e)}function tS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tS(Object(n),!0).forEach(function(r){rS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function al(e,t){return BF(e)||FF(e,t)||iS(e,t)||MF()}function MF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
150
150
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iS(e,t){if(e){if(typeof e=="string")return F0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F0(e,t)}}function F0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(u){a=!0,s=u}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function BF(e){if(Array.isArray(e))return e}var jF=typeof M0=="function"?M0:M0.default,UF="file-invalid-type",HF="file-too-large",zF="file-too-small",VF="too-many-files",$F=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:UF,message:"File type must be ".concat(r)}},aS=function(t){return{code:HF,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},oS=function(t){return{code:zF,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},WF={code:VF,message:"Too many files"};function sS(e,t){var n=e.type==="application/x-moz-file"||jF(e,t);return[n,n?null:$F(t)]}function uS(e,t,n){if(Ja(e.size))if(Ja(t)&&Ja(n)){if(e.size>n)return[!1,aS(n)];if(e.size<t)return[!1,oS(t)]}else{if(Ja(t)&&e.size<t)return[!1,oS(t)];if(Ja(n)&&e.size>n)return[!1,aS(n)]}return[!0,null]}function Ja(e){return e!=null}function YF(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(u){var l=sS(u,n),c=al(l,1),d=c[0],f=uS(u,r,i),p=al(f,1),m=p[0],y=s?s(u):null;return d&&m&&!y})}function uf(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function lf(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function lS(e){e.preventDefault()}function qF(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function GF(e){return e.indexOf("Edge/")!==-1}function KF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return qF(e)||GF(e)}function Hr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return t.some(function(s){return!uf(r)&&s&&s.apply(void 0,[r].concat(a)),uf(r)})}}function XF(){return"showOpenFilePicker"in window}function QF(e){if(Ja(e)){var t=Object.entries(e).filter(function(n){var r=al(n,2),i=r[0],a=r[1],o=!0;return cS(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every(dS))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=al(r,2),a=i[0],o=i[1];return nS(nS({},n),{},rS({},a,o))},{});return[{description:"Files",accept:t}]}return e}function ZF(e){if(Ja(e))return Object.entries(e).reduce(function(t,n){var r=al(n,2),i=r[0],a=r[1];return[].concat(eS(t),[i],eS(a))},[]).filter(function(t){return cS(t)||dS(t)}).join(",")}function JF(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function e9(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function cS(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function dS(e){return/^.*\.[\w]+$/.test(e)}var t9=["children"],n9=["open"],r9=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],i9=["refKey","onChange","onClick"];function a9(e){return u9(e)||s9(e)||fS(e)||o9()}function o9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
151
151
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function u9(e){if(Array.isArray(e))return j0(e)}function B0(e,t){return d9(e)||c9(e,t)||fS(e,t)||l9()}function l9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -330,7 +330,7 @@ to {
330
330
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[zS]=this[zS]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=cl(o);r[s]||(e7(i,o),r[s]=!0)}return z.isArray(t)?t.forEach(a):a(t),this}}Tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(Tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),z.freezeMethods(Tn);function ny(e,t){const n=this||ll,r=t||n,i=Tn.from(r.headers);let a=r.data;return z.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function VS(e){return!!(e&&e.__CANCEL__)}function ps(e,t,n){Se.call(this,e??"canceled",Se.ERR_CANCELED,t,n),this.name="CanceledError"}z.inherits(ps,Se,{__CANCEL__:!0});function $S(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Se("Request failed with status code "+n.status,[Se.ERR_BAD_REQUEST,Se.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function t7(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function n7(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[a];o||(o=l),n[i]=u,r[i]=l;let d=a,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const p=c&&l-c;return p?Math.round(f*1e3/p):void 0}}function r7(e,t){let n=0,r=1e3/t,i,a;const o=(l,c=Date.now())=>{n=c,i=null,a&&(clearTimeout(a),a=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),d=c-n;d>=r?o(l,c):(i=l,a||(a=setTimeout(()=>{a=null,o(i)},r-d)))},()=>i&&o(i)]}const wf=(e,t,n=3)=>{let r=0;const i=n7(50,250);return r7(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,u=o-r,l=i(u),c=o<=s;r=o;const d={loaded:o,total:s,progress:s?o/s:void 0,bytes:u,rate:l||void 0,estimated:l&&s&&c?(s-o)/l:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},WS=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},YS=e=>(...t)=>z.asap(()=>e(...t)),i7=nn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,nn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(nn.origin),nn.navigator&&/(msie|trident)/i.test(nn.navigator.userAgent)):()=>!0,a7=nn.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const o=[e+"="+encodeURIComponent(t)];z.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),z.isString(r)&&o.push("path="+r),z.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function o7(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function s7(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function qS(e,t){return e&&!o7(t)?s7(e,t):t}const GS=e=>e instanceof Tn?{...e}:e;function to(e,t){t=t||{};const n={};function r(l,c,d,f){return z.isPlainObject(l)&&z.isPlainObject(c)?z.merge.call({caseless:f},l,c):z.isPlainObject(c)?z.merge({},c):z.isArray(c)?c.slice():c}function i(l,c,d,f){if(z.isUndefined(c)){if(!z.isUndefined(l))return r(void 0,l,d,f)}else return r(l,c,d,f)}function a(l,c){if(!z.isUndefined(c))return r(void 0,c)}function o(l,c){if(z.isUndefined(c)){if(!z.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,d){if(d in t)return r(l,c);if(d in e)return r(void 0,l)}const u={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(l,c,d)=>i(GS(l),GS(c),d,!0)};return z.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=u[c]||i,f=d(e[c],t[c],c);z.isUndefined(f)&&d!==s||(n[c]=f)}),n}const KS=e=>{const t=to({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;t.headers=o=Tn.from(o),t.url=BS(qS(t.baseURL,t.url),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(z.isFormData(n)){if(nn.hasStandardBrowserEnv||nn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){const[l,...c]=u?u.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...c].join("; "))}}if(nn.hasStandardBrowserEnv&&(r&&z.isFunction(r)&&(r=r(t)),r||r!==!1&&i7(t.url))){const l=i&&a&&a7.read(a);l&&o.set(i,l)}return t},u7=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=KS(e);let a=i.data;const o=Tn.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:l}=i,c,d,f,p,m;function y(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;w.open(i.method.toUpperCase(),i.url,!0),w.timeout=i.timeout;function g(){if(!w)return;const b=Tn.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),S={data:!s||s==="text"||s==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:b,config:e,request:w};$S(function(N){n(N),y()},function(N){r(N),y()},S),w=null}"onloadend"in w?w.onloadend=g:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(g)},w.onabort=function(){w&&(r(new Se("Request aborted",Se.ECONNABORTED,e,w)),w=null)},w.onerror=function(){r(new Se("Network Error",Se.ERR_NETWORK,e,w)),w=null},w.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const S=i.transitional||US;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new Se(T,S.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,w)),w=null},a===void 0&&o.setContentType(null),"setRequestHeader"in w&&z.forEach(o.toJSON(),function(T,S){w.setRequestHeader(S,T)}),z.isUndefined(i.withCredentials)||(w.withCredentials=!!i.withCredentials),s&&s!=="json"&&(w.responseType=i.responseType),l&&([f,m]=wf(l,!0),w.addEventListener("progress",f)),u&&w.upload&&([d,p]=wf(u),w.upload.addEventListener("progress",d),w.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=b=>{w&&(r(!b||b.type?new ps(null,e,w):b),w.abort(),w=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const x=t7(i.url);if(x&&nn.protocols.indexOf(x)===-1){r(new Se("Unsupported protocol "+x+":",Se.ERR_BAD_REQUEST,e));return}w.send(a||null)})},l7=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const a=function(l){if(!i){i=!0,s();const c=l instanceof Error?l:this.reason;r.abort(c instanceof Se?c:new ps(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,a(new Se(`timeout ${t} of ms exceeded`,Se.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),e=null)};e.forEach(l=>l.addEventListener("abort",a));const{signal:u}=r;return u.unsubscribe=()=>z.asap(s),u}},c7=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},d7=async function*(e,t){for await(const n of f7(e))yield*c7(n,t)},f7=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},XS=(e,t,n,r)=>{const i=d7(e,t);let a=0,o,s=u=>{o||(o=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:c}=await i.next();if(l){s(),u.close();return}let d=c.byteLength;if(n){let f=a+=d;n(f)}u.enqueue(new Uint8Array(c))}catch(l){throw s(l),l}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},bf=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",QS=bf&&typeof ReadableStream=="function",p7=bf&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ZS=(e,...t)=>{try{return!!e(...t)}catch{return!1}},h7=QS&&ZS(()=>{let e=!1;const t=new Request(nn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),JS=64*1024,ry=QS&&ZS(()=>z.isReadableStream(new Response("").body)),Ef={stream:ry&&(e=>e.body)};bf&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ef[t]&&(Ef[t]=z.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Se(`Response type '${t}' is not supported`,Se.ERR_NOT_SUPPORT,r)})})})(new Response);const m7=async e=>{if(e==null)return 0;if(z.isBlob(e))return e.size;if(z.isSpecCompliantForm(e))return(await new Request(nn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(z.isArrayBufferView(e)||z.isArrayBuffer(e))return e.byteLength;if(z.isURLSearchParams(e)&&(e=e+""),z.isString(e))return(await p7(e)).byteLength},g7=async(e,t)=>{const n=z.toFiniteNumber(e.getContentLength());return n??m7(t)},iy={http:FB,xhr:u7,fetch:bf&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:o,onDownloadProgress:s,onUploadProgress:u,responseType:l,headers:c,withCredentials:d="same-origin",fetchOptions:f}=KS(e);l=l?(l+"").toLowerCase():"text";let p=l7([i,a&&a.toAbortSignal()],o),m;const y=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let w;try{if(u&&h7&&n!=="get"&&n!=="head"&&(w=await g7(c,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(z.isFormData(r)&&(_=S.headers.get("content-type"))&&c.setContentType(_),S.body){const[N,D]=WS(w,wf(YS(u)));r=XS(S.body,JS,N,D)}}z.isString(d)||(d=d?"include":"omit");const g="credentials"in Request.prototype;m=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:g?d:void 0});let x=await fetch(m);const b=ry&&(l==="stream"||l==="response");if(ry&&(s||b&&y)){const S={};["status","statusText","headers"].forEach(V=>{S[V]=x[V]});const _=z.toFiniteNumber(x.headers.get("content-length")),[N,D]=s&&WS(_,wf(YS(s),!0))||[];x=new Response(XS(x.body,JS,N,()=>{D&&D(),y&&y()}),S)}l=l||"text";let T=await Ef[z.findKey(Ef,l)||"text"](x,e);return!b&&y&&y(),await new Promise((S,_)=>{$S(S,_,{data:T,headers:Tn.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(g){throw y&&y(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new Se("Network Error",Se.ERR_NETWORK,e,m),{cause:g.cause||g}):Se.from(g,g&&g.code,e,m)}})};z.forEach(iy,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const eC=e=>`- ${e}`,y7=e=>z.isFunction(e)||e===null||e===!1,tC={getAdapter:e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a<t;a++){n=e[a];let o;if(r=n,!y7(n)&&(r=iy[(o=String(n)).toLowerCase()],r===void 0))throw new Se(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+a]=r}if(!r){const a=Object.entries(i).map(([s,u])=>`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=t?a.length>1?`since :
331
331
  `+a.map(eC).join(`
332
332
  `):" "+eC(a[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:iy};function ay(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ps(null,e)}function nC(e){return ay(e),e.headers=Tn.from(e.headers),e.data=ny.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tC.getAdapter(e.adapter||ll.adapter)(e).then(function(r){return ay(e),r.data=ny.call(e,e.transformResponse,r),r.headers=Tn.from(r.headers),r},function(r){return VS(r)||(ay(e),r&&r.response&&(r.response.data=ny.call(e,e.transformResponse,r.response),r.response.headers=Tn.from(r.response.headers))),Promise.reject(r)})}const rC="1.7.9",Tf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Tf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const iC={};Tf.transitional=function(t,n,r){function i(a,o){return"[Axios v"+rC+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new Se(i(o," has been removed"+(n?" in "+n:"")),Se.ERR_DEPRECATED);return n&&!iC[o]&&(iC[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}},Tf.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function v7(e,t,n){if(typeof e!="object")throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],u=s===void 0||o(s,a,e);if(u!==!0)throw new Se("option "+a+" must be "+u,Se.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Se("Unknown option "+a,Se.ERR_BAD_OPTION)}}const _f={assertOptions:v7,validators:Tf},zr=_f.validators;class no{constructor(t){this.defaults=t,this.interceptors={request:new jS,response:new jS}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
333
- `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=to(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&_f.assertOptions(r,{silentJSONParsing:zr.transitional(zr.boolean),forcedJSONParsing:zr.transitional(zr.boolean),clarifyTimeoutError:zr.transitional(zr.boolean)},!1),i!=null&&(z.isFunction(i)?n.paramsSerializer={serialize:i}:_f.assertOptions(i,{encode:zr.function,serialize:zr.function},!0)),_f.assertOptions(n,{baseUrl:zr.spelling("baseURL"),withXsrfToken:zr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&z.merge(a.common,a[n.method]);a&&z.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=Tn.concat(o,a);const s=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let c,d=0,f;if(!u){const m=[nC.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),f=m.length,c=Promise.resolve(n);d<f;)c=c.then(m[d++],m[d++]);return c}f=s.length;let p=n;for(d=0;d<f;){const m=s[d++],y=s[d++];try{p=m(p)}catch(w){y.call(this,w);break}}try{c=nC.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,f=l.length;d<f;)c=c.then(l[d++],l[d++]);return c}getUri(t){t=to(this.defaults,t);const n=qS(t.baseURL,t.url);return BS(n,t.params,t.paramsSerializer)}}z.forEach(["delete","get","head","options"],function(t){no.prototype[t]=function(n,r){return this.request(to(r||{},{method:t,url:n,data:(r||{}).data}))}}),z.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(to(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}no.prototype[t]=n(),no.prototype[t+"Form"]=n(!0)});class oy{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new ps(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new oy(function(i){t=i}),cancel:t}}}function x7(e){return function(n){return e.apply(null,n)}}function w7(e){return z.isObject(e)&&e.isAxiosError===!0}const sy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(sy).forEach(([e,t])=>{sy[t]=e});function aC(e){const t=new no(e),n=ES(no.prototype.request,t);return z.extend(n,no.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return aC(to(e,i))},n}const kt=aC(ll);kt.Axios=no,kt.CanceledError=ps,kt.CancelToken=oy,kt.isCancel=VS,kt.VERSION=rC,kt.toFormData=vf,kt.AxiosError=Se,kt.Cancel=kt.CanceledError,kt.all=function(t){return Promise.all(t)},kt.spread=x7,kt.isAxiosError=w7,kt.mergeConfig=to,kt.AxiosHeaders=Tn,kt.formToJSON=e=>HS(z.isHTMLForm(e)?new FormData(e):e),kt.getAdapter=tC.getAdapter,kt.HttpStatusCode=sy,kt.default=kt;const b7=/\{[^{}]+\}/g,E7=()=>{var e,t;return typeof process=="object"&&Number.parseInt((t=(e=process==null?void 0:process.versions)==null?void 0:e.node)==null?void 0:t.substring(0,2))>=18&&process.versions.undici};function T7(){return Math.random().toString(36).slice(2,11)}function _7(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:i,bodySerializer:a,headers:o,requestInitExt:s=void 0,...u}={...e};s=E7()?s:void 0,t=lC(t);const l=[];async function c(d,f){const{baseUrl:p,fetch:m=r,Request:y=n,headers:w,params:g={},parseAs:x="json",querySerializer:b,bodySerializer:T=a??C7,body:S,..._}=f||{};p&&(t=lC(p));let N=typeof i=="function"?i:uC(i);b&&(N=typeof b=="function"?b:uC({...typeof i=="object"?i:{},...b}));const D=S===void 0?void 0:T(S),V=D===void 0||D instanceof FormData?{}:{"Content-Type":"application/json"},P={redirect:"follow",...u,..._,body:D,headers:k7(V,o,w,g.header)};let $,H,X=new n(A7(d,{baseUrl:t,params:g,querySerializer:N}),P);for(const ie in _)ie in X||(X[ie]=_[ie]);if(l.length){$=T7(),H=Object.freeze({baseUrl:t,fetch:m,parseAs:x,querySerializer:N,bodySerializer:T});for(const ie of l)if(ie&&typeof ie=="object"&&typeof ie.onRequest=="function"){const ee=await ie.onRequest({request:X,schemaPath:d,params:g,options:H,id:$});if(ee){if(!(ee instanceof n))throw new Error("onRequest: must return new Request() when modifying the request");X=ee}}}let Y;try{Y=await m(X,s)}catch(ie){let ee=ie;if(l.length)for(let F=l.length-1;F>=0;F--){const B=l[F];if(B&&typeof B=="object"&&typeof B.onError=="function"){const A=await B.onError({request:X,error:ee,schemaPath:d,params:g,options:H,id:$});if(A){if(A instanceof Response){ee=void 0,Y=A;break}if(A instanceof Error){ee=A;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(ee)throw ee}if(l.length)for(let ie=l.length-1;ie>=0;ie--){const ee=l[ie];if(ee&&typeof ee=="object"&&typeof ee.onResponse=="function"){const F=await ee.onResponse({request:X,response:Y,schemaPath:d,params:g,options:H,id:$});if(F){if(!(F instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");Y=F}}}if(Y.status===204||Y.headers.get("Content-Length")==="0")return Y.ok?{data:void 0,response:Y}:{error:void 0,response:Y};if(Y.ok)return x==="stream"?{data:Y.body,response:Y}:{data:await Y[x](),response:Y};let re=await Y.text();try{re=JSON.parse(re)}catch{}return{error:re,response:Y}}return{request(d,f,p){return c(f,{...p,method:d.toUpperCase()})},GET(d,f){return c(d,{...f,method:"GET"})},PUT(d,f){return c(d,{...f,method:"PUT"})},POST(d,f){return c(d,{...f,method:"POST"})},DELETE(d,f){return c(d,{...f,method:"DELETE"})},OPTIONS(d,f){return c(d,{...f,method:"OPTIONS"})},HEAD(d,f){return c(d,{...f,method:"HEAD"})},PATCH(d,f){return c(d,{...f,method:"PATCH"})},TRACE(d,f){return c(d,{...f,method:"TRACE"})},use(...d){for(const f of d)if(f){if(typeof f!="object"||!("onRequest"in f||"onResponse"in f||"onError"in f))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");l.push(f)}},eject(...d){for(const f of d){const p=l.indexOf(f);p!==-1&&l.splice(p,1)}}}}function Sf(e,t,n){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${(n==null?void 0:n.allowReserved)===!0?t:encodeURIComponent(t)}`}function oC(e,t,n){if(!t||typeof t!="object")return"";const r=[],i={simple:",",label:".",matrix:";"}[n.style]||"&";if(n.style!=="deepObject"&&n.explode===!1){for(const s in t)r.push(s,n.allowReserved===!0?t[s]:encodeURIComponent(t[s]));const o=r.join(",");switch(n.style){case"form":return`${e}=${o}`;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return o}}for(const o in t){const s=n.style==="deepObject"?`${e}[${o}]`:o;r.push(Sf(s,t[o],n))}const a=r.join(i);return n.style==="label"||n.style==="matrix"?`${i}${a}`:a}function sC(e,t,n){if(!Array.isArray(t))return"";if(n.explode===!1){const a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",o=(n.allowReserved===!0?t:t.map(s=>encodeURIComponent(s))).join(a);switch(n.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return`${e}=${o}`}}const r={simple:",",label:".",matrix:";"}[n.style]||"&",i=[];for(const a of t)n.style==="simple"||n.style==="label"?i.push(n.allowReserved===!0?a:encodeURIComponent(a)):i.push(Sf(e,a,n));return n.style==="label"||n.style==="matrix"?`${r}${i.join(r)}`:i.join(r)}function uC(e){return function(n){const r=[];if(n&&typeof n=="object")for(const i in n){const a=n[i];if(a!=null){if(Array.isArray(a)){if(a.length===0)continue;r.push(sC(i,a,{style:"form",explode:!0,...e==null?void 0:e.array,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}if(typeof a=="object"){r.push(oC(i,a,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(Sf(i,a,e))}}return r.join("&")}}function S7(e,t){let n=e;for(const r of e.match(b7)??[]){let i=r.substring(1,r.length-1),a=!1,o="simple";if(i.endsWith("*")&&(a=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(o="label",i=i.substring(1)):i.startsWith(";")&&(o="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const s=t[i];if(Array.isArray(s)){n=n.replace(r,sC(i,s,{style:o,explode:a}));continue}if(typeof s=="object"){n=n.replace(r,oC(i,s,{style:o,explode:a}));continue}if(o==="matrix"){n=n.replace(r,`;${Sf(i,s)}`);continue}n=n.replace(r,o==="label"?`.${encodeURIComponent(s)}`:encodeURIComponent(s))}return n}function C7(e){return e instanceof FormData?e:JSON.stringify(e)}function A7(e,t){var i;let n=`${t.baseUrl}${e}`;(i=t.params)!=null&&i.path&&(n=S7(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function k7(...e){const t=new Headers;for(const n of e){if(!n||typeof n!="object")continue;const r=n instanceof Headers?n.entries():Object.entries(n);for(const[i,a]of r)if(a===null)t.delete(i);else if(Array.isArray(a))for(const o of a)t.append(i,o);else a!==void 0&&t.set(i,a)}return t}function lC(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const R7=e=>{console.log(e.error)},N7=e=>{const t=_7({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||R7};return t.use(n),t};class P7{constructor({config:t}){ne(this,"client");ne(this,"uploadFileClient");ne(this,"config");ne(this,"constructClientOptions",t=>{const n=this.config.apiUrl||"https://api.open.cx",r={"X-Bot-Token":this.config.token,"Content-Type":"application/json",Accept:"application/json",Authorization:t?`Bearer ${t}`:void 0};return{baseUrl:n,headers:r}});ne(this,"createOpenAPIClient",({baseUrl:t,headers:n})=>N7({baseUrl:t,onRequest:({request:r})=>{Object.entries(n).forEach(([i,a])=>{a&&r.headers.set(i,a)})}}));ne(this,"createAxiosUploadClient",({baseUrl:t,headers:n})=>kt.create({baseURL:`${t}/backend/widget/v2/upload`,headers:n}));ne(this,"setAuthToken",t=>{const{baseUrl:n,headers:r}=this.constructClientOptions(t);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})});ne(this,"widgetPrelude",async()=>await this.client.GET("/backend/widget/v2/prelude",{params:{header:{"X-Bot-Token":this.config.token}}}));ne(this,"sendMessage",async(t,n)=>await this.client.POST("/backend/widget/v2/chat/send",{body:t,signal:n}));ne(this,"getSessionHistory",async({sessionId:t,lastMessageTimestamp:n,abortSignal:r})=>{const i=n?{lastMessageTimestamp:n}:void 0;return await this.client.GET("/backend/widget/v2/session/history/{sessionId}",{params:{path:{sessionId:t},query:i},signal:r})});ne(this,"createUnverifiedContact",async t=>await this.client.POST("/backend/widget/v2/contact/create-unverified",{params:{header:{"x-bot-token":this.config.token}},body:t}));ne(this,"createSession",async t=>await this.client.POST("/backend/widget/v2/create-session",{body:t}));ne(this,"getSession",async({sessionId:t,abortSignal:n})=>await this.client.GET("/backend/widget/v2/session/{sessionId}",{params:{path:{sessionId:t}},signal:n}));ne(this,"getSessions",async({cursor:t,filters:n,abortSignal:r})=>await this.client.GET("/backend/widget/v2/sessions",{params:{query:{cursor:t,filters:JSON.stringify(n)}},signal:r}));ne(this,"uploadFile",async(t,n={})=>{const r=new FormData;r.append("file",t.file);const{data:i}=await this.uploadFileClient.post("",r,{headers:{"Content-Type":"multipart/form-data"},...n});return i});ne(this,"vote",async t=>await this.client.POST("/backend/widget/v2/chat/vote",{body:t}));var i;this.config=t;const{baseUrl:n,headers:r}=this.constructClientOptions((i=t.user)==null?void 0:i.token);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})}}var Cf={exports:{}};Cf.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",u="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",y="[object Map]",w="[object Number]",g="[object Null]",x="[object Object]",b="[object Promise]",T="[object Proxy]",S="[object RegExp]",_="[object Set]",N="[object String]",D="[object Symbol]",V="[object Undefined]",P="[object WeakMap]",$="[object ArrayBuffer]",H="[object DataView]",X="[object Float32Array]",Y="[object Float64Array]",re="[object Int8Array]",ie="[object Int16Array]",ee="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",A="[object Uint16Array]",ae="[object Uint32Array]",he=/[\\^$.*+?()[\]{}|]/g,O=/^\[object .+?Constructor\]$/,Pe=/^(?:0|[1-9]\d*)$/,ge={};ge[X]=ge[Y]=ge[re]=ge[ie]=ge[ee]=ge[F]=ge[B]=ge[A]=ge[ae]=!0,ge[s]=ge[u]=ge[$]=ge[c]=ge[H]=ge[d]=ge[f]=ge[p]=ge[y]=ge[w]=ge[x]=ge[S]=ge[_]=ge[N]=ge[P]=!1;var xe=typeof Qe=="object"&&Qe&&Qe.Object===Object&&Qe,$e=typeof self=="object"&&self&&self.Object===Object&&self,Ve=xe||$e||Function("return this")(),We=t&&!t.nodeType&&t,Ge=We&&!0&&e&&!e.nodeType&&e,St=Ge&&Ge.exports===We,Te=St&&xe.process,be=function(){try{return Te&&Te.binding&&Te.binding("util")}catch{}}(),Ye=be&&be.isTypedArray;function He(k,L){for(var W=-1,le=k==null?0:k.length,at=0,Re=[];++W<le;){var bt=k[W];L(bt,W,k)&&(Re[at++]=bt)}return Re}function xt(k,L){for(var W=-1,le=L.length,at=k.length;++W<le;)k[at+W]=L[W];return k}function wt(k,L){for(var W=-1,le=k==null?0:k.length;++W<le;)if(L(k[W],W,k))return!0;return!1}function Ke(k,L){for(var W=-1,le=Array(k);++W<k;)le[W]=L(W);return le}function Me(k){return function(L){return k(L)}}function Ot(k,L){return k.has(L)}function ka(k,L){return k==null?void 0:k[L]}function Ra(k){var L=-1,W=Array(k.size);return k.forEach(function(le,at){W[++L]=[at,le]}),W}function Na(k,L){return function(W){return k(L(W))}}function te(k){var L=-1,W=Array(k.size);return k.forEach(function(le){W[++L]=le}),W}var de=Array.prototype,j=Function.prototype,q=Object.prototype,ce=Ve["__core-js_shared__"],_e=j.toString,Ee=q.hasOwnProperty,jt=function(){var k=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""}(),Pn=q.toString,mn=RegExp("^"+_e.call(Ee).replace(he,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qn=St?Ve.Buffer:void 0,In=Ve.Symbol,Nt=Ve.Uint8Array,Gn=q.propertyIsEnumerable,gn=de.splice,ki=In?In.toStringTag:void 0,BI=Object.getOwnPropertySymbols,_ne=qn?qn.isBuffer:void 0,Sne=Na(Object.keys,Object),Lv=Qs(Ve,"DataView"),pc=Qs(Ve,"Map"),Mv=Qs(Ve,"Promise"),Fv=Qs(Ve,"Set"),Bv=Qs(Ve,"WeakMap"),hc=Qs(Object,"create"),Cne=xo(Lv),Ane=xo(pc),kne=xo(Mv),Rne=xo(Fv),Nne=xo(Bv),jI=In?In.prototype:void 0,jv=jI?jI.valueOf:void 0;function yo(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Pne(){this.__data__=hc?hc(null):{},this.size=0}function Ine(k){var L=this.has(k)&&delete this.__data__[k];return this.size-=L?1:0,L}function One(k){var L=this.__data__;if(hc){var W=L[k];return W===r?void 0:W}return Ee.call(L,k)?L[k]:void 0}function Dne(k){var L=this.__data__;return hc?L[k]!==void 0:Ee.call(L,k)}function Lne(k,L){var W=this.__data__;return this.size+=this.has(k)?0:1,W[k]=hc&&L===void 0?r:L,this}yo.prototype.clear=Pne,yo.prototype.delete=Ine,yo.prototype.get=One,yo.prototype.has=Dne,yo.prototype.set=Lne;function Ri(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Mne(){this.__data__=[],this.size=0}function Fne(k){var L=this.__data__,W=rh(L,k);if(W<0)return!1;var le=L.length-1;return W==le?L.pop():gn.call(L,W,1),--this.size,!0}function Bne(k){var L=this.__data__,W=rh(L,k);return W<0?void 0:L[W][1]}function jne(k){return rh(this.__data__,k)>-1}function Une(k,L){var W=this.__data__,le=rh(W,k);return le<0?(++this.size,W.push([k,L])):W[le][1]=L,this}Ri.prototype.clear=Mne,Ri.prototype.delete=Fne,Ri.prototype.get=Bne,Ri.prototype.has=jne,Ri.prototype.set=Une;function vo(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Hne(){this.size=0,this.__data__={hash:new yo,map:new(pc||Ri),string:new yo}}function zne(k){var L=ih(this,k).delete(k);return this.size-=L?1:0,L}function Vne(k){return ih(this,k).get(k)}function $ne(k){return ih(this,k).has(k)}function Wne(k,L){var W=ih(this,k),le=W.size;return W.set(k,L),this.size+=W.size==le?0:1,this}vo.prototype.clear=Hne,vo.prototype.delete=zne,vo.prototype.get=Vne,vo.prototype.has=$ne,vo.prototype.set=Wne;function nh(k){var L=-1,W=k==null?0:k.length;for(this.__data__=new vo;++L<W;)this.add(k[L])}function Yne(k){return this.__data__.set(k,r),this}function qne(k){return this.__data__.has(k)}nh.prototype.add=nh.prototype.push=Yne,nh.prototype.has=qne;function Pa(k){var L=this.__data__=new Ri(k);this.size=L.size}function Gne(){this.__data__=new Ri,this.size=0}function Kne(k){var L=this.__data__,W=L.delete(k);return this.size=L.size,W}function Xne(k){return this.__data__.get(k)}function Qne(k){return this.__data__.has(k)}function Zne(k,L){var W=this.__data__;if(W instanceof Ri){var le=W.__data__;if(!pc||le.length<n-1)return le.push([k,L]),this.size=++W.size,this;W=this.__data__=new vo(le)}return W.set(k,L),this.size=W.size,this}Pa.prototype.clear=Gne,Pa.prototype.delete=Kne,Pa.prototype.get=Xne,Pa.prototype.has=Qne,Pa.prototype.set=Zne;function Jne(k,L){var W=ah(k),le=!W&&hre(k),at=!W&&!le&&Uv(k),Re=!W&&!le&&!at&&GI(k),bt=W||le||at||Re,Ut=bt?Ke(k.length,String):[],qt=Ut.length;for(var gt in k)Ee.call(k,gt)&&!(bt&&(gt=="length"||at&&(gt=="offset"||gt=="parent")||Re&&(gt=="buffer"||gt=="byteLength"||gt=="byteOffset")||lre(gt,qt)))&&Ut.push(gt);return Ut}function rh(k,L){for(var W=k.length;W--;)if($I(k[W][0],L))return W;return-1}function ere(k,L,W){var le=L(k);return ah(k)?le:xt(le,W(k))}function mc(k){return k==null?k===void 0?V:g:ki&&ki in Object(k)?sre(k):pre(k)}function UI(k){return gc(k)&&mc(k)==s}function HI(k,L,W,le,at){return k===L?!0:k==null||L==null||!gc(k)&&!gc(L)?k!==k&&L!==L:tre(k,L,W,le,HI,at)}function tre(k,L,W,le,at,Re){var bt=ah(k),Ut=ah(L),qt=bt?u:Ia(k),gt=Ut?u:Ia(L);qt=qt==s?x:qt,gt=gt==s?x:gt;var Kn=qt==x,Or=gt==x,un=qt==gt;if(un&&Uv(k)){if(!Uv(L))return!1;bt=!0,Kn=!1}if(un&&!Kn)return Re||(Re=new Pa),bt||GI(k)?zI(k,L,W,le,at,Re):are(k,L,qt,W,le,at,Re);if(!(W&i)){var pr=Kn&&Ee.call(k,"__wrapped__"),hr=Or&&Ee.call(L,"__wrapped__");if(pr||hr){var Oa=pr?k.value():k,Ni=hr?L.value():L;return Re||(Re=new Pa),at(Oa,Ni,W,le,Re)}}return un?(Re||(Re=new Pa),ore(k,L,W,le,at,Re)):!1}function nre(k){if(!qI(k)||dre(k))return!1;var L=WI(k)?mn:O;return L.test(xo(k))}function rre(k){return gc(k)&&YI(k.length)&&!!ge[mc(k)]}function ire(k){if(!fre(k))return Sne(k);var L=[];for(var W in Object(k))Ee.call(k,W)&&W!="constructor"&&L.push(W);return L}function zI(k,L,W,le,at,Re){var bt=W&i,Ut=k.length,qt=L.length;if(Ut!=qt&&!(bt&&qt>Ut))return!1;var gt=Re.get(k);if(gt&&Re.get(L))return gt==L;var Kn=-1,Or=!0,un=W&a?new nh:void 0;for(Re.set(k,L),Re.set(L,k);++Kn<Ut;){var pr=k[Kn],hr=L[Kn];if(le)var Oa=bt?le(hr,pr,Kn,L,k,Re):le(pr,hr,Kn,k,L,Re);if(Oa!==void 0){if(Oa)continue;Or=!1;break}if(un){if(!wt(L,function(Ni,wo){if(!Ot(un,wo)&&(pr===Ni||at(pr,Ni,W,le,Re)))return un.push(wo)})){Or=!1;break}}else if(!(pr===hr||at(pr,hr,W,le,Re))){Or=!1;break}}return Re.delete(k),Re.delete(L),Or}function are(k,L,W,le,at,Re,bt){switch(W){case H:if(k.byteLength!=L.byteLength||k.byteOffset!=L.byteOffset)return!1;k=k.buffer,L=L.buffer;case $:return!(k.byteLength!=L.byteLength||!Re(new Nt(k),new Nt(L)));case c:case d:case w:return $I(+k,+L);case f:return k.name==L.name&&k.message==L.message;case S:case N:return k==L+"";case y:var Ut=Ra;case _:var qt=le&i;if(Ut||(Ut=te),k.size!=L.size&&!qt)return!1;var gt=bt.get(k);if(gt)return gt==L;le|=a,bt.set(k,L);var Kn=zI(Ut(k),Ut(L),le,at,Re,bt);return bt.delete(k),Kn;case D:if(jv)return jv.call(k)==jv.call(L)}return!1}function ore(k,L,W,le,at,Re){var bt=W&i,Ut=VI(k),qt=Ut.length,gt=VI(L),Kn=gt.length;if(qt!=Kn&&!bt)return!1;for(var Or=qt;Or--;){var un=Ut[Or];if(!(bt?un in L:Ee.call(L,un)))return!1}var pr=Re.get(k);if(pr&&Re.get(L))return pr==L;var hr=!0;Re.set(k,L),Re.set(L,k);for(var Oa=bt;++Or<qt;){un=Ut[Or];var Ni=k[un],wo=L[un];if(le)var KI=bt?le(wo,Ni,un,L,k,Re):le(Ni,wo,un,k,L,Re);if(!(KI===void 0?Ni===wo||at(Ni,wo,W,le,Re):KI)){hr=!1;break}Oa||(Oa=un=="constructor")}if(hr&&!Oa){var oh=k.constructor,sh=L.constructor;oh!=sh&&"constructor"in k&&"constructor"in L&&!(typeof oh=="function"&&oh instanceof oh&&typeof sh=="function"&&sh instanceof sh)&&(hr=!1)}return Re.delete(k),Re.delete(L),hr}function VI(k){return ere(k,yre,ure)}function ih(k,L){var W=k.__data__;return cre(L)?W[typeof L=="string"?"string":"hash"]:W.map}function Qs(k,L){var W=ka(k,L);return nre(W)?W:void 0}function sre(k){var L=Ee.call(k,ki),W=k[ki];try{k[ki]=void 0;var le=!0}catch{}var at=Pn.call(k);return le&&(L?k[ki]=W:delete k[ki]),at}var ure=BI?function(k){return k==null?[]:(k=Object(k),He(BI(k),function(L){return Gn.call(k,L)}))}:vre,Ia=mc;(Lv&&Ia(new Lv(new ArrayBuffer(1)))!=H||pc&&Ia(new pc)!=y||Mv&&Ia(Mv.resolve())!=b||Fv&&Ia(new Fv)!=_||Bv&&Ia(new Bv)!=P)&&(Ia=function(k){var L=mc(k),W=L==x?k.constructor:void 0,le=W?xo(W):"";if(le)switch(le){case Cne:return H;case Ane:return y;case kne:return b;case Rne:return _;case Nne:return P}return L});function lre(k,L){return L=L??o,!!L&&(typeof k=="number"||Pe.test(k))&&k>-1&&k%1==0&&k<L}function cre(k){var L=typeof k;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?k!=="__proto__":k===null}function dre(k){return!!jt&&jt in k}function fre(k){var L=k&&k.constructor,W=typeof L=="function"&&L.prototype||q;return k===W}function pre(k){return Pn.call(k)}function xo(k){if(k!=null){try{return _e.call(k)}catch{}try{return k+""}catch{}}return""}function $I(k,L){return k===L||k!==k&&L!==L}var hre=UI(function(){return arguments}())?UI:function(k){return gc(k)&&Ee.call(k,"callee")&&!Gn.call(k,"callee")},ah=Array.isArray;function mre(k){return k!=null&&YI(k.length)&&!WI(k)}var Uv=_ne||xre;function gre(k,L){return HI(k,L)}function WI(k){if(!qI(k))return!1;var L=mc(k);return L==p||L==m||L==l||L==T}function YI(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=o}function qI(k){var L=typeof k;return k!=null&&(L=="object"||L=="function")}function gc(k){return k!=null&&typeof k=="object"}var GI=Ye?Me(Ye):rre;function yre(k){return mre(k)?Jne(k):ire(k)}function vre(){return[]}function xre(){return!1}e.exports=gre}(Cf,Cf.exports);var I7=Cf.exports;const O7=Ct(I7);class hs{constructor(t){ne(this,"subscribers",new Set);Hv(this,ei);ne(this,"initialState");Hv(this,Xs);ne(this,"lifecycleListeners",new Map);ne(this,"emitLifecycle",(t,n)=>{const r=this.lifecycleListeners.get(t);if(r){const i={type:t,timestamp:Date.now(),data:n};r.forEach(a=>{try{a(i)}catch{}})}});ne(this,"notifySubscribers",t=>{Array.from(this.subscribers).forEach(r=>{try{r(t)}catch(i){this.emitLifecycle("error",{error:i})}})});ne(this,"subscribe",t=>(this.subscribers.add(t),()=>{this.subscribers.delete(t)}));ne(this,"onLifecycle",(t,n)=>{this.lifecycleListeners.has(t)||this.lifecycleListeners.set(t,new Set);const r=this.lifecycleListeners.get(t);return r.add(n),()=>{r.delete(n),r.size===0&&this.lifecycleListeners.delete(t)}});ne(this,"get",()=>bo(this,ei));ne(this,"set",t=>{this.emitLifecycle("beforeUpdate",{previousState:bo(this,ei),nextState:t}),O7(bo(this,ei),t)||(yc(this,ei,t),yc(this,Xs,Date.now()),this.emitLifecycle("stateChange",{state:t}),this.notifySubscribers(t)),this.emitLifecycle("afterUpdate",{state:t})});ne(this,"setPartial",t=>{if(t==null)return;const n={...bo(this,ei),...t};this.set(n)});ne(this,"clear",()=>{this.emitLifecycle("destroy"),this.subscribers=new Set,this.lifecycleListeners=new Map});ne(this,"reset",()=>{this.set(this.initialState)});ne(this,"lastUpdated",()=>bo(this,Xs));yc(this,ei,t),this.initialState=t,yc(this,Xs,Date.now()),this.emitLifecycle("init",{initialState:bo(this,ei)})}}ei=new WeakMap,Xs=new WeakMap;class D7{constructor({config:t,api:n}){ne(this,"config");ne(this,"api");ne(this,"state");ne(this,"shouldCollectData",()=>{var n;return!!(!((n=this.state.get().contact)!=null&&n.token)&&this.config.collectUserData)});ne(this,"autoCreateUnverifiedUser",async()=>{var t,n,r,i;await this.createUnverifiedContact({name:((n=(t=this.config.user)==null?void 0:t.data)==null?void 0:n.name)||"Anonymous",email:(i=(r=this.config.user)==null?void 0:r.data)==null?void 0:i.email})});ne(this,"createUnverifiedContact",async t=>{try{this.state.setPartial({isCreatingUnverifiedContact:!0,isErrorCreatingUnverifiedContact:!1});const{data:n}=await this.api.createUnverifiedContact(t);n!=null&&n.token?(this.api.setAuthToken(n.token),this.state.setPartial({contact:{token:n.token}})):this.state.setPartial({isErrorCreatingUnverifiedContact:!0})}finally{this.state.setPartial({isCreatingUnverifiedContact:!1})}});var r,i,a;this.config=t,this.api=n,this.state=new hs({contact:(r=t.user)!=null&&r.token?{token:(i=t.user)==null?void 0:i.token}:null,isCreatingUnverifiedContact:!1,isErrorCreatingUnverifiedContact:!1}),!((a=t.user)!=null&&a.token)&&!t.collectUserData&&this.autoCreateUnverifiedUser()}}class uy{constructor(){ne(this,"state",new hs({isPolling:!1,isError:!1}));ne(this,"abortController",new AbortController);ne(this,"reset",()=>{var t;this.abortController.abort("Resetting poller"),(t=this.stopPolling)==null||t.call(this),this.stopPolling=null});ne(this,"stopPolling",null);ne(this,"startPolling",(t,n)=>{if(this.stopPolling)return;const r=[],i=async()=>{this.abortController=new AbortController,this.state.setPartial({isPolling:!0});try{await t(this.abortController.signal)}catch(a){if(this.abortController.signal.aborted)return;console.error("Failed to poll:",a),this.state.setPartial({isError:!0})}finally{this.state.setPartial({isPolling:!1})}this.abortController.signal.aborted?console.log("Poller aborted, not scheduling anymore"):r.push(setTimeout(i,n))};i(),this.stopPolling=()=>{r.forEach(clearTimeout),this.state.reset()}})}}const Wt=[];for(let e=0;e<256;++e)Wt.push((e+256).toString(16).slice(1));function L7(e,t=0){return(Wt[e[t+0]]+Wt[e[t+1]]+Wt[e[t+2]]+Wt[e[t+3]]+"-"+Wt[e[t+4]]+Wt[e[t+5]]+"-"+Wt[e[t+6]]+Wt[e[t+7]]+"-"+Wt[e[t+8]]+Wt[e[t+9]]+"-"+Wt[e[t+10]]+Wt[e[t+11]]+Wt[e[t+12]]+Wt[e[t+13]]+Wt[e[t+14]]+Wt[e[t+15]]).toLowerCase()}let ly;const M7=new Uint8Array(16);function F7(){if(!ly){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ly=crypto.getRandomValues.bind(crypto)}return ly(M7)}const cC={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function dC(e,t,n){var i;if(cC.randomUUID&&!t&&!e)return cC.randomUUID();e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??F7();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,L7(r)}function cy(){return dC()}class B7{constructor({config:t,api:n,contactCtx:r}){ne(this,"config");ne(this,"api");ne(this,"contactCtx");ne(this,"activeSessionPoller",new uy);ne(this,"sessionsRefresher",new uy);ne(this,"sessionState",new hs({session:null,isCreatingSession:!1}));ne(this,"sessionsState",new hs({data:[],cursor:void 0,isLastPage:!1,didStartInitialFetch:!1,isInitialFetchLoading:!0}));ne(this,"reset",async()=>{this.sessionState.reset(),this.activeSessionPoller.reset()});ne(this,"registerActiveSessionPolling",()=>{this.sessionState.subscribe(({session:t})=>{t!=null&&t.id?this.activeSessionPoller.startPolling(async n=>{const{data:r}=await this.api.getSession({sessionId:t.id,abortSignal:n});r&&this.sessionState.setPartial({session:r})},1e3):this.activeSessionPoller.reset()})});ne(this,"registerInitialSessionsFetch",()=>{var n;const t=async()=>{this.sessionsState.setPartial({didStartInitialFetch:!0}),await this.loadMoreSessions(),this.sessionsState.setPartial({isInitialFetchLoading:!1})};(n=this.contactCtx.state.get().contact)!=null&&n.token&&!this.sessionsState.get().didStartInitialFetch&&(t(),this.registerSessionsRefresher()),this.contactCtx.state.subscribe(({contact:r})=>{r!=null&&r.token&&!this.sessionsState.get().didStartInitialFetch&&(t(),this.registerSessionsRefresher())})});ne(this,"registerSessionsRefresher",()=>{this.sessionsRefresher.startPolling(async()=>{const{data:t}=await this.getSessions({cursor:void 0});if(!t)return;const n=[...t.items,...this.sessionsState.get().data].filter((r,i,a)=>i===a.findIndex(o=>r.id===o.id));this.sessionsState.setPartial({data:n})},1e4)});ne(this,"createSession",async()=>{var r,i;this.sessionState.setPartial({session:null,isCreatingSession:!0});const{data:t,error:n}=await this.api.createSession({customData:(r=this.config.user)!=null&&r.externalId?{external_id:(i=this.config.user)==null?void 0:i.externalId}:void 0});return t?(this.sessionState.setPartial({session:t,isCreatingSession:!1}),t):(console.error("Failed to create session:",n),null)});ne(this,"loadMoreSessions",async()=>{if(this.sessionsState.get().isLastPage)return;const{data:t}=await this.getSessions({cursor:this.sessionsState.get().cursor});if(t){const r=[...this.sessionsState.get().data,...t.items].filter((i,a,o)=>a===o.findIndex(s=>i.id===s.id));this.sessionsState.setPartial({data:r,cursor:t.next||void 0,isLastPage:t.next===null})}});ne(this,"getSessions",async({cursor:t})=>{var n,r;return(n=this.contactCtx.state.get().contact)!=null&&n.token?await this.api.getSessions({cursor:t,filters:(r=this.config.user)!=null&&r.externalId?{external_id:this.config.user.externalId}:{}}):{data:null}});this.config=t,this.api=n,this.contactCtx=r,this.registerActiveSessionPolling(),this.registerInitialSessionsFetch()}}class j7{constructor({config:t,api:n,sessionCtx:r}){ne(this,"config");ne(this,"api");ne(this,"sessionCtx");ne(this,"poller",new uy);ne(this,"state",new hs({messages:[],isSendingMessage:!1,lastAIResMightSolveUserIssue:!1,isInitialFetchLoading:!1}));ne(this,"sendMessageAbortController",new AbortController);ne(this,"reset",()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset(),this.poller.reset()});ne(this,"registerPolling",()=>{this.sessionCtx.sessionState.subscribe(({session:t})=>{t!=null&&t.id?this.poller.startPolling(async n=>{await this.fetchAndSetHistory(t.id,n)},1e3):this.poller.reset()})});ne(this,"sendMessage",async t=>{var i,a,o,s,u,l,c,d,f;this.sendMessageAbortController=new AbortController;const n=this.state.get().isSendingMessage,r=((i=this.sessionCtx.sessionState.get().session)==null?void 0:i.assignee.kind)==="ai";if(n&&r){console.warn("Cannot send messages while awaiting AI response");return}this.state.setPartial({lastAIResMightSolveUserIssue:!1});try{this.state.setPartial({isSendingMessage:!0});const p=this.toUserMessage(t.content,t.attachments||void 0),m=this.state.get().messages;if(this.state.setPartial({messages:[...m,p]}),!((a=this.sessionCtx.sessionState.get().session)!=null&&a.id)&&!await this.sessionCtx.createSession()){console.error("Failed to create session");return}const y=(o=this.sessionCtx.sessionState.get().session)==null?void 0:o.id;if(!y)return;const{data:w}=await this.api.sendMessage({uuid:p.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,session_id:y,user:(s=this.config.user)==null?void 0:s.data,...t},this.sendMessageAbortController.signal);if(w!=null&&w.success){const g=this.toBotMessage(w);if(g){const x=this.state.get().messages;if(!!x.some(T=>T.id===g.id)){this.state.setPartial({lastAIResMightSolveUserIssue:((u=w.autopilotResponse)==null?void 0:u.mightSolveUserIssue)||((l=w.uiResponse)==null?void 0:l.mightSolveUserIssue)});return}this.state.setPartial({messages:[...x,g],lastAIResMightSolveUserIssue:((c=w.autopilotResponse)==null?void 0:c.mightSolveUserIssue)||((d=w.uiResponse)==null?void 0:d.mightSolveUserIssue)})}}else{const g=this.toBotErrorMessage(((f=w==null?void 0:w.error)==null?void 0:f.message)||"Unknown error occurred"),x=this.state.get().messages;this.state.setPartial({messages:[...x,g]})}}catch(p){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",p)}finally{this.state.setPartial({isSendingMessage:!1})}});ne(this,"fetchAndSetHistory",async(t,n)=>{var a;this.state.get().messages.length===0&&this.state.setPartial({isInitialFetchLoading:!0});const r=(a=this.state.get().messages.at(-1))==null?void 0:a.timestamp,{data:i}=await this.api.getSessionHistory({sessionId:t,lastMessageTimestamp:r,abortSignal:n});if(i&&i.length>0){const o=this.state.get().messages,s=i.map(this.mapHistoryToMessage).filter(u=>!o.some(l=>l.id===u.id));this.state.setPartial({messages:[...o,...s]})}this.state.get().isInitialFetchLoading&&this.state.setPartial({isInitialFetchLoading:!1})});ne(this,"mapHistoryToMessage",t=>{var i,a,o;const n={id:t.publicId,timestamp:t.sentAt||"",attachments:t.attachments||void 0};if(t.sender.kind==="user")return{...n,type:"FROM_USER",content:t.content.text||"",deliveredAt:t.sentAt||""};if(t.sender.kind==="agent")return{...n,type:"FROM_AGENT",component:"agent_message",data:{message:t.content.text||""},agent:{name:t.sender.name||"",avatar:t.sender.avatar||"",id:null,isAi:!1}};const r=(i=t.actionCalls)==null?void 0:i.at(-1);return{...n,type:"FROM_BOT",component:"bot_message",agent:{id:null,name:((a=this.config.bot)==null?void 0:a.name)||"",isAi:!0,avatar:((o=this.config.bot)==null?void 0:o.avatar)||""},data:{message:t.content.text||"",action:r?{name:r.actionName,data:r.result}:void 0}}});ne(this,"toUserMessage",(t,n)=>({id:cy(),type:"FROM_USER",content:t,deliveredAt:new Date().toISOString(),attachments:n,timestamp:new Date().toISOString()}));ne(this,"toBotMessage",t=>{var n;return t.success&&t.autopilotResponse?{type:"FROM_BOT",id:t.autopilotResponse.id||cy(),timestamp:new Date().toISOString(),component:"bot_message",agent:this.config.bot?{name:this.config.bot.name||"",isAi:!0,avatar:this.config.bot.avatar||"",id:null}:void 0,data:{message:t.autopilotResponse.value.content,action:(n=t.uiResponse)!=null&&n.value.name?{name:t.uiResponse.value.name,data:t.uiResponse.value.request_response}:void 0}}:null});ne(this,"toBotErrorMessage",t=>({type:"FROM_BOT",id:cy(),timestamp:new Date().toISOString(),component:"TEXT",data:{message:t,variant:"error",action:void 0}}));this.config=t,this.api=n,this.sessionCtx=r,this.registerPolling()}}class U7{constructor({contactCtx:t,sessionCtx:n,resetChat:r}){ne(this,"state");ne(this,"contactCtx");ne(this,"sessionCtx");ne(this,"resetChat");ne(this,"registerRoutingListener",()=>{this.contactCtx.state.subscribe(({contact:t})=>{t!=null&&t.token&&this.state.get().screen==="welcome"&&this.state.setPartial({screen:"sessions"})})});ne(this,"toSessionsScreen",()=>{this.resetChat(),this.state.setPartial({screen:"sessions"})});ne(this,"toChatScreen",t=>{if(this.resetChat(),t){const n=this.sessionCtx.sessionsState.get().data.find(r=>r.id===t);if(!n)return;this.sessionCtx.sessionState.setPartial({session:n})}this.state.setPartial({screen:"chat"})});this.state=new hs({screen:t.shouldCollectData()?"welcome":"sessions"}),this.contactCtx=t,this.sessionCtx=n,this.resetChat=r,this.registerRoutingListener()}}class H7{constructor({config:t}){ne(this,"config");ne(this,"api");ne(this,"contactCtx");ne(this,"sessionCtx");ne(this,"messageCtx");ne(this,"routerCtx");ne(this,"resetChat",()=>{this.sessionCtx.reset(),this.messageCtx.reset()});this.config=t,this.api=new P7({config:t}),this.contactCtx=new D7({api:this.api,config:this.config}),this.sessionCtx=new B7({config:this.config,api:this.api,contactCtx:this.contactCtx}),this.messageCtx=new j7({config:this.config,api:this.api,sessionCtx:this.sessionCtx}),this.routerCtx=new U7({contactCtx:this.contactCtx,sessionCtx:this.sessionCtx,resetChat:this.resetChat})}}const[ar,z7]=Q9();function V7({options:e,children:t,components:n}){const r=v.useRef(new H7({config:e})).current,i=v.useMemo(()=>new X9({components:n}),[n]);return E.jsx(z7,{value:{widgetCtx:r,components:n,componentStore:i,version:cE},children:t})}function ms(){const{widgetCtx:e}=ar();return e.config}function dl(e){return v.useSyncExternalStore(e.subscribe,e.get,e.get)}function $7(){const{widgetCtx:e}=ar();return{contactState:dl(e.contactCtx.state),createUnverifiedContact:e.contactCtx.createUnverifiedContact}}function gs(){const{widgetCtx:e}=ar();return{messagesState:dl(e.messageCtx.state),sendMessage:e.messageCtx.sendMessage}}function fl(){const{widgetCtx:e}=ar(),t=dl(e.sessionCtx.sessionState),n=dl(e.sessionCtx.sessionsState);return{sessionState:t,sessionsState:n}}function fC(){var r;const{sessionState:e}=fl(),{messagesState:t}=gs();return{isAwaitingBotReply:(((r=e.session)==null?void 0:r.assignee.kind)==="ai"||e.isCreatingSession)&&t.isSendingMessage}}var pC={exports:{}},hC={};/**
333
+ `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=to(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&_f.assertOptions(r,{silentJSONParsing:zr.transitional(zr.boolean),forcedJSONParsing:zr.transitional(zr.boolean),clarifyTimeoutError:zr.transitional(zr.boolean)},!1),i!=null&&(z.isFunction(i)?n.paramsSerializer={serialize:i}:_f.assertOptions(i,{encode:zr.function,serialize:zr.function},!0)),_f.assertOptions(n,{baseUrl:zr.spelling("baseURL"),withXsrfToken:zr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&z.merge(a.common,a[n.method]);a&&z.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=Tn.concat(o,a);const s=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let c,d=0,f;if(!u){const m=[nC.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),f=m.length,c=Promise.resolve(n);d<f;)c=c.then(m[d++],m[d++]);return c}f=s.length;let p=n;for(d=0;d<f;){const m=s[d++],y=s[d++];try{p=m(p)}catch(w){y.call(this,w);break}}try{c=nC.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,f=l.length;d<f;)c=c.then(l[d++],l[d++]);return c}getUri(t){t=to(this.defaults,t);const n=qS(t.baseURL,t.url);return BS(n,t.params,t.paramsSerializer)}}z.forEach(["delete","get","head","options"],function(t){no.prototype[t]=function(n,r){return this.request(to(r||{},{method:t,url:n,data:(r||{}).data}))}}),z.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(to(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}no.prototype[t]=n(),no.prototype[t+"Form"]=n(!0)});class oy{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new ps(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new oy(function(i){t=i}),cancel:t}}}function x7(e){return function(n){return e.apply(null,n)}}function w7(e){return z.isObject(e)&&e.isAxiosError===!0}const sy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(sy).forEach(([e,t])=>{sy[t]=e});function aC(e){const t=new no(e),n=ES(no.prototype.request,t);return z.extend(n,no.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return aC(to(e,i))},n}const kt=aC(ll);kt.Axios=no,kt.CanceledError=ps,kt.CancelToken=oy,kt.isCancel=VS,kt.VERSION=rC,kt.toFormData=vf,kt.AxiosError=Se,kt.Cancel=kt.CanceledError,kt.all=function(t){return Promise.all(t)},kt.spread=x7,kt.isAxiosError=w7,kt.mergeConfig=to,kt.AxiosHeaders=Tn,kt.formToJSON=e=>HS(z.isHTMLForm(e)?new FormData(e):e),kt.getAdapter=tC.getAdapter,kt.HttpStatusCode=sy,kt.default=kt;const b7=/\{[^{}]+\}/g,E7=()=>{var e,t;return typeof process=="object"&&Number.parseInt((t=(e=process==null?void 0:process.versions)==null?void 0:e.node)==null?void 0:t.substring(0,2))>=18&&process.versions.undici};function T7(){return Math.random().toString(36).slice(2,11)}function _7(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:i,bodySerializer:a,headers:o,requestInitExt:s=void 0,...u}={...e};s=E7()?s:void 0,t=lC(t);const l=[];async function c(d,f){const{baseUrl:p,fetch:m=r,Request:y=n,headers:w,params:g={},parseAs:x="json",querySerializer:b,bodySerializer:T=a??C7,body:S,..._}=f||{};p&&(t=lC(p));let N=typeof i=="function"?i:uC(i);b&&(N=typeof b=="function"?b:uC({...typeof i=="object"?i:{},...b}));const D=S===void 0?void 0:T(S),V=D===void 0||D instanceof FormData?{}:{"Content-Type":"application/json"},P={redirect:"follow",...u,..._,body:D,headers:k7(V,o,w,g.header)};let $,H,X=new n(A7(d,{baseUrl:t,params:g,querySerializer:N}),P);for(const ie in _)ie in X||(X[ie]=_[ie]);if(l.length){$=T7(),H=Object.freeze({baseUrl:t,fetch:m,parseAs:x,querySerializer:N,bodySerializer:T});for(const ie of l)if(ie&&typeof ie=="object"&&typeof ie.onRequest=="function"){const ee=await ie.onRequest({request:X,schemaPath:d,params:g,options:H,id:$});if(ee){if(!(ee instanceof n))throw new Error("onRequest: must return new Request() when modifying the request");X=ee}}}let Y;try{Y=await m(X,s)}catch(ie){let ee=ie;if(l.length)for(let F=l.length-1;F>=0;F--){const B=l[F];if(B&&typeof B=="object"&&typeof B.onError=="function"){const A=await B.onError({request:X,error:ee,schemaPath:d,params:g,options:H,id:$});if(A){if(A instanceof Response){ee=void 0,Y=A;break}if(A instanceof Error){ee=A;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(ee)throw ee}if(l.length)for(let ie=l.length-1;ie>=0;ie--){const ee=l[ie];if(ee&&typeof ee=="object"&&typeof ee.onResponse=="function"){const F=await ee.onResponse({request:X,response:Y,schemaPath:d,params:g,options:H,id:$});if(F){if(!(F instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");Y=F}}}if(Y.status===204||Y.headers.get("Content-Length")==="0")return Y.ok?{data:void 0,response:Y}:{error:void 0,response:Y};if(Y.ok)return x==="stream"?{data:Y.body,response:Y}:{data:await Y[x](),response:Y};let re=await Y.text();try{re=JSON.parse(re)}catch{}return{error:re,response:Y}}return{request(d,f,p){return c(f,{...p,method:d.toUpperCase()})},GET(d,f){return c(d,{...f,method:"GET"})},PUT(d,f){return c(d,{...f,method:"PUT"})},POST(d,f){return c(d,{...f,method:"POST"})},DELETE(d,f){return c(d,{...f,method:"DELETE"})},OPTIONS(d,f){return c(d,{...f,method:"OPTIONS"})},HEAD(d,f){return c(d,{...f,method:"HEAD"})},PATCH(d,f){return c(d,{...f,method:"PATCH"})},TRACE(d,f){return c(d,{...f,method:"TRACE"})},use(...d){for(const f of d)if(f){if(typeof f!="object"||!("onRequest"in f||"onResponse"in f||"onError"in f))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");l.push(f)}},eject(...d){for(const f of d){const p=l.indexOf(f);p!==-1&&l.splice(p,1)}}}}function Sf(e,t,n){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${(n==null?void 0:n.allowReserved)===!0?t:encodeURIComponent(t)}`}function oC(e,t,n){if(!t||typeof t!="object")return"";const r=[],i={simple:",",label:".",matrix:";"}[n.style]||"&";if(n.style!=="deepObject"&&n.explode===!1){for(const s in t)r.push(s,n.allowReserved===!0?t[s]:encodeURIComponent(t[s]));const o=r.join(",");switch(n.style){case"form":return`${e}=${o}`;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return o}}for(const o in t){const s=n.style==="deepObject"?`${e}[${o}]`:o;r.push(Sf(s,t[o],n))}const a=r.join(i);return n.style==="label"||n.style==="matrix"?`${i}${a}`:a}function sC(e,t,n){if(!Array.isArray(t))return"";if(n.explode===!1){const a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",o=(n.allowReserved===!0?t:t.map(s=>encodeURIComponent(s))).join(a);switch(n.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return`${e}=${o}`}}const r={simple:",",label:".",matrix:";"}[n.style]||"&",i=[];for(const a of t)n.style==="simple"||n.style==="label"?i.push(n.allowReserved===!0?a:encodeURIComponent(a)):i.push(Sf(e,a,n));return n.style==="label"||n.style==="matrix"?`${r}${i.join(r)}`:i.join(r)}function uC(e){return function(n){const r=[];if(n&&typeof n=="object")for(const i in n){const a=n[i];if(a!=null){if(Array.isArray(a)){if(a.length===0)continue;r.push(sC(i,a,{style:"form",explode:!0,...e==null?void 0:e.array,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}if(typeof a=="object"){r.push(oC(i,a,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(Sf(i,a,e))}}return r.join("&")}}function S7(e,t){let n=e;for(const r of e.match(b7)??[]){let i=r.substring(1,r.length-1),a=!1,o="simple";if(i.endsWith("*")&&(a=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(o="label",i=i.substring(1)):i.startsWith(";")&&(o="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const s=t[i];if(Array.isArray(s)){n=n.replace(r,sC(i,s,{style:o,explode:a}));continue}if(typeof s=="object"){n=n.replace(r,oC(i,s,{style:o,explode:a}));continue}if(o==="matrix"){n=n.replace(r,`;${Sf(i,s)}`);continue}n=n.replace(r,o==="label"?`.${encodeURIComponent(s)}`:encodeURIComponent(s))}return n}function C7(e){return e instanceof FormData?e:JSON.stringify(e)}function A7(e,t){var i;let n=`${t.baseUrl}${e}`;(i=t.params)!=null&&i.path&&(n=S7(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function k7(...e){const t=new Headers;for(const n of e){if(!n||typeof n!="object")continue;const r=n instanceof Headers?n.entries():Object.entries(n);for(const[i,a]of r)if(a===null)t.delete(i);else if(Array.isArray(a))for(const o of a)t.append(i,o);else a!==void 0&&t.set(i,a)}return t}function lC(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const R7=e=>{console.log(e.error)},N7=e=>{const t=_7({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||R7};return t.use(n),t};class P7{constructor({config:t}){ne(this,"client");ne(this,"uploadFileClient");ne(this,"config");ne(this,"constructClientOptions",t=>{const n=this.config.apiUrl||"https://api.open.cx",r={"X-Bot-Token":this.config.token,"Content-Type":"application/json",Accept:"application/json",Authorization:t?`Bearer ${t}`:void 0};return{baseUrl:n,headers:r}});ne(this,"createOpenAPIClient",({baseUrl:t,headers:n})=>N7({baseUrl:t,onRequest:({request:r})=>{Object.entries(n).forEach(([i,a])=>{a&&r.headers.set(i,a)})}}));ne(this,"createAxiosUploadClient",({baseUrl:t,headers:n})=>kt.create({baseURL:`${t}/backend/widget/v2/upload`,headers:n}));ne(this,"setAuthToken",t=>{const{baseUrl:n,headers:r}=this.constructClientOptions(t);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})});ne(this,"widgetPrelude",async()=>await this.client.GET("/backend/widget/v2/prelude",{params:{header:{"X-Bot-Token":this.config.token}}}));ne(this,"sendMessage",async(t,n)=>await this.client.POST("/backend/widget/v2/chat/send",{body:t,signal:n}));ne(this,"getSessionHistory",async({sessionId:t,lastMessageTimestamp:n,abortSignal:r})=>{const i=n?{lastMessageTimestamp:n}:void 0;return await this.client.GET("/backend/widget/v2/session/history/{sessionId}",{params:{path:{sessionId:t},query:i},signal:r})});ne(this,"createUnverifiedContact",async t=>await this.client.POST("/backend/widget/v2/contact/create-unverified",{params:{header:{"x-bot-token":this.config.token}},body:t}));ne(this,"createSession",async t=>await this.client.POST("/backend/widget/v2/create-session",{body:t}));ne(this,"getSession",async({sessionId:t,abortSignal:n})=>await this.client.GET("/backend/widget/v2/session/{sessionId}",{params:{path:{sessionId:t}},signal:n}));ne(this,"getSessions",async({cursor:t,filters:n,abortSignal:r})=>await this.client.GET("/backend/widget/v2/sessions",{params:{query:{cursor:t,filters:JSON.stringify(n)}},signal:r}));ne(this,"uploadFile",async(t,n={})=>{const r=new FormData;r.append("file",t.file);const{data:i}=await this.uploadFileClient.post("",r,{headers:{"Content-Type":"multipart/form-data"},...n});return i});ne(this,"vote",async t=>await this.client.POST("/backend/widget/v2/chat/vote",{body:t}));var i;this.config=t;const{baseUrl:n,headers:r}=this.constructClientOptions((i=t.user)==null?void 0:i.token);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})}}var Cf={exports:{}};Cf.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",u="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",y="[object Map]",w="[object Number]",g="[object Null]",x="[object Object]",b="[object Promise]",T="[object Proxy]",S="[object RegExp]",_="[object Set]",N="[object String]",D="[object Symbol]",V="[object Undefined]",P="[object WeakMap]",$="[object ArrayBuffer]",H="[object DataView]",X="[object Float32Array]",Y="[object Float64Array]",re="[object Int8Array]",ie="[object Int16Array]",ee="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",A="[object Uint16Array]",ae="[object Uint32Array]",he=/[\\^$.*+?()[\]{}|]/g,O=/^\[object .+?Constructor\]$/,Pe=/^(?:0|[1-9]\d*)$/,ge={};ge[X]=ge[Y]=ge[re]=ge[ie]=ge[ee]=ge[F]=ge[B]=ge[A]=ge[ae]=!0,ge[s]=ge[u]=ge[$]=ge[c]=ge[H]=ge[d]=ge[f]=ge[p]=ge[y]=ge[w]=ge[x]=ge[S]=ge[_]=ge[N]=ge[P]=!1;var xe=typeof Qe=="object"&&Qe&&Qe.Object===Object&&Qe,$e=typeof self=="object"&&self&&self.Object===Object&&self,Ve=xe||$e||Function("return this")(),We=t&&!t.nodeType&&t,Ge=We&&!0&&e&&!e.nodeType&&e,St=Ge&&Ge.exports===We,Te=St&&xe.process,be=function(){try{return Te&&Te.binding&&Te.binding("util")}catch{}}(),Ye=be&&be.isTypedArray;function He(k,L){for(var W=-1,le=k==null?0:k.length,at=0,Re=[];++W<le;){var bt=k[W];L(bt,W,k)&&(Re[at++]=bt)}return Re}function xt(k,L){for(var W=-1,le=L.length,at=k.length;++W<le;)k[at+W]=L[W];return k}function wt(k,L){for(var W=-1,le=k==null?0:k.length;++W<le;)if(L(k[W],W,k))return!0;return!1}function Ke(k,L){for(var W=-1,le=Array(k);++W<k;)le[W]=L(W);return le}function Me(k){return function(L){return k(L)}}function Ot(k,L){return k.has(L)}function ka(k,L){return k==null?void 0:k[L]}function Ra(k){var L=-1,W=Array(k.size);return k.forEach(function(le,at){W[++L]=[at,le]}),W}function Na(k,L){return function(W){return k(L(W))}}function te(k){var L=-1,W=Array(k.size);return k.forEach(function(le){W[++L]=le}),W}var de=Array.prototype,j=Function.prototype,q=Object.prototype,ce=Ve["__core-js_shared__"],_e=j.toString,Ee=q.hasOwnProperty,jt=function(){var k=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""}(),Pn=q.toString,mn=RegExp("^"+_e.call(Ee).replace(he,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qn=St?Ve.Buffer:void 0,In=Ve.Symbol,Nt=Ve.Uint8Array,Gn=q.propertyIsEnumerable,gn=de.splice,ki=In?In.toStringTag:void 0,BI=Object.getOwnPropertySymbols,_ne=qn?qn.isBuffer:void 0,Sne=Na(Object.keys,Object),Lv=Qs(Ve,"DataView"),pc=Qs(Ve,"Map"),Mv=Qs(Ve,"Promise"),Fv=Qs(Ve,"Set"),Bv=Qs(Ve,"WeakMap"),hc=Qs(Object,"create"),Cne=xo(Lv),Ane=xo(pc),kne=xo(Mv),Rne=xo(Fv),Nne=xo(Bv),jI=In?In.prototype:void 0,jv=jI?jI.valueOf:void 0;function yo(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Pne(){this.__data__=hc?hc(null):{},this.size=0}function Ine(k){var L=this.has(k)&&delete this.__data__[k];return this.size-=L?1:0,L}function One(k){var L=this.__data__;if(hc){var W=L[k];return W===r?void 0:W}return Ee.call(L,k)?L[k]:void 0}function Dne(k){var L=this.__data__;return hc?L[k]!==void 0:Ee.call(L,k)}function Lne(k,L){var W=this.__data__;return this.size+=this.has(k)?0:1,W[k]=hc&&L===void 0?r:L,this}yo.prototype.clear=Pne,yo.prototype.delete=Ine,yo.prototype.get=One,yo.prototype.has=Dne,yo.prototype.set=Lne;function Ri(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Mne(){this.__data__=[],this.size=0}function Fne(k){var L=this.__data__,W=rh(L,k);if(W<0)return!1;var le=L.length-1;return W==le?L.pop():gn.call(L,W,1),--this.size,!0}function Bne(k){var L=this.__data__,W=rh(L,k);return W<0?void 0:L[W][1]}function jne(k){return rh(this.__data__,k)>-1}function Une(k,L){var W=this.__data__,le=rh(W,k);return le<0?(++this.size,W.push([k,L])):W[le][1]=L,this}Ri.prototype.clear=Mne,Ri.prototype.delete=Fne,Ri.prototype.get=Bne,Ri.prototype.has=jne,Ri.prototype.set=Une;function vo(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Hne(){this.size=0,this.__data__={hash:new yo,map:new(pc||Ri),string:new yo}}function zne(k){var L=ih(this,k).delete(k);return this.size-=L?1:0,L}function Vne(k){return ih(this,k).get(k)}function $ne(k){return ih(this,k).has(k)}function Wne(k,L){var W=ih(this,k),le=W.size;return W.set(k,L),this.size+=W.size==le?0:1,this}vo.prototype.clear=Hne,vo.prototype.delete=zne,vo.prototype.get=Vne,vo.prototype.has=$ne,vo.prototype.set=Wne;function nh(k){var L=-1,W=k==null?0:k.length;for(this.__data__=new vo;++L<W;)this.add(k[L])}function Yne(k){return this.__data__.set(k,r),this}function qne(k){return this.__data__.has(k)}nh.prototype.add=nh.prototype.push=Yne,nh.prototype.has=qne;function Pa(k){var L=this.__data__=new Ri(k);this.size=L.size}function Gne(){this.__data__=new Ri,this.size=0}function Kne(k){var L=this.__data__,W=L.delete(k);return this.size=L.size,W}function Xne(k){return this.__data__.get(k)}function Qne(k){return this.__data__.has(k)}function Zne(k,L){var W=this.__data__;if(W instanceof Ri){var le=W.__data__;if(!pc||le.length<n-1)return le.push([k,L]),this.size=++W.size,this;W=this.__data__=new vo(le)}return W.set(k,L),this.size=W.size,this}Pa.prototype.clear=Gne,Pa.prototype.delete=Kne,Pa.prototype.get=Xne,Pa.prototype.has=Qne,Pa.prototype.set=Zne;function Jne(k,L){var W=ah(k),le=!W&&hre(k),at=!W&&!le&&Uv(k),Re=!W&&!le&&!at&&GI(k),bt=W||le||at||Re,Ut=bt?Ke(k.length,String):[],qt=Ut.length;for(var gt in k)Ee.call(k,gt)&&!(bt&&(gt=="length"||at&&(gt=="offset"||gt=="parent")||Re&&(gt=="buffer"||gt=="byteLength"||gt=="byteOffset")||lre(gt,qt)))&&Ut.push(gt);return Ut}function rh(k,L){for(var W=k.length;W--;)if($I(k[W][0],L))return W;return-1}function ere(k,L,W){var le=L(k);return ah(k)?le:xt(le,W(k))}function mc(k){return k==null?k===void 0?V:g:ki&&ki in Object(k)?sre(k):pre(k)}function UI(k){return gc(k)&&mc(k)==s}function HI(k,L,W,le,at){return k===L?!0:k==null||L==null||!gc(k)&&!gc(L)?k!==k&&L!==L:tre(k,L,W,le,HI,at)}function tre(k,L,W,le,at,Re){var bt=ah(k),Ut=ah(L),qt=bt?u:Ia(k),gt=Ut?u:Ia(L);qt=qt==s?x:qt,gt=gt==s?x:gt;var Kn=qt==x,Or=gt==x,un=qt==gt;if(un&&Uv(k)){if(!Uv(L))return!1;bt=!0,Kn=!1}if(un&&!Kn)return Re||(Re=new Pa),bt||GI(k)?zI(k,L,W,le,at,Re):are(k,L,qt,W,le,at,Re);if(!(W&i)){var pr=Kn&&Ee.call(k,"__wrapped__"),hr=Or&&Ee.call(L,"__wrapped__");if(pr||hr){var Oa=pr?k.value():k,Ni=hr?L.value():L;return Re||(Re=new Pa),at(Oa,Ni,W,le,Re)}}return un?(Re||(Re=new Pa),ore(k,L,W,le,at,Re)):!1}function nre(k){if(!qI(k)||dre(k))return!1;var L=WI(k)?mn:O;return L.test(xo(k))}function rre(k){return gc(k)&&YI(k.length)&&!!ge[mc(k)]}function ire(k){if(!fre(k))return Sne(k);var L=[];for(var W in Object(k))Ee.call(k,W)&&W!="constructor"&&L.push(W);return L}function zI(k,L,W,le,at,Re){var bt=W&i,Ut=k.length,qt=L.length;if(Ut!=qt&&!(bt&&qt>Ut))return!1;var gt=Re.get(k);if(gt&&Re.get(L))return gt==L;var Kn=-1,Or=!0,un=W&a?new nh:void 0;for(Re.set(k,L),Re.set(L,k);++Kn<Ut;){var pr=k[Kn],hr=L[Kn];if(le)var Oa=bt?le(hr,pr,Kn,L,k,Re):le(pr,hr,Kn,k,L,Re);if(Oa!==void 0){if(Oa)continue;Or=!1;break}if(un){if(!wt(L,function(Ni,wo){if(!Ot(un,wo)&&(pr===Ni||at(pr,Ni,W,le,Re)))return un.push(wo)})){Or=!1;break}}else if(!(pr===hr||at(pr,hr,W,le,Re))){Or=!1;break}}return Re.delete(k),Re.delete(L),Or}function are(k,L,W,le,at,Re,bt){switch(W){case H:if(k.byteLength!=L.byteLength||k.byteOffset!=L.byteOffset)return!1;k=k.buffer,L=L.buffer;case $:return!(k.byteLength!=L.byteLength||!Re(new Nt(k),new Nt(L)));case c:case d:case w:return $I(+k,+L);case f:return k.name==L.name&&k.message==L.message;case S:case N:return k==L+"";case y:var Ut=Ra;case _:var qt=le&i;if(Ut||(Ut=te),k.size!=L.size&&!qt)return!1;var gt=bt.get(k);if(gt)return gt==L;le|=a,bt.set(k,L);var Kn=zI(Ut(k),Ut(L),le,at,Re,bt);return bt.delete(k),Kn;case D:if(jv)return jv.call(k)==jv.call(L)}return!1}function ore(k,L,W,le,at,Re){var bt=W&i,Ut=VI(k),qt=Ut.length,gt=VI(L),Kn=gt.length;if(qt!=Kn&&!bt)return!1;for(var Or=qt;Or--;){var un=Ut[Or];if(!(bt?un in L:Ee.call(L,un)))return!1}var pr=Re.get(k);if(pr&&Re.get(L))return pr==L;var hr=!0;Re.set(k,L),Re.set(L,k);for(var Oa=bt;++Or<qt;){un=Ut[Or];var Ni=k[un],wo=L[un];if(le)var KI=bt?le(wo,Ni,un,L,k,Re):le(Ni,wo,un,k,L,Re);if(!(KI===void 0?Ni===wo||at(Ni,wo,W,le,Re):KI)){hr=!1;break}Oa||(Oa=un=="constructor")}if(hr&&!Oa){var oh=k.constructor,sh=L.constructor;oh!=sh&&"constructor"in k&&"constructor"in L&&!(typeof oh=="function"&&oh instanceof oh&&typeof sh=="function"&&sh instanceof sh)&&(hr=!1)}return Re.delete(k),Re.delete(L),hr}function VI(k){return ere(k,yre,ure)}function ih(k,L){var W=k.__data__;return cre(L)?W[typeof L=="string"?"string":"hash"]:W.map}function Qs(k,L){var W=ka(k,L);return nre(W)?W:void 0}function sre(k){var L=Ee.call(k,ki),W=k[ki];try{k[ki]=void 0;var le=!0}catch{}var at=Pn.call(k);return le&&(L?k[ki]=W:delete k[ki]),at}var ure=BI?function(k){return k==null?[]:(k=Object(k),He(BI(k),function(L){return Gn.call(k,L)}))}:vre,Ia=mc;(Lv&&Ia(new Lv(new ArrayBuffer(1)))!=H||pc&&Ia(new pc)!=y||Mv&&Ia(Mv.resolve())!=b||Fv&&Ia(new Fv)!=_||Bv&&Ia(new Bv)!=P)&&(Ia=function(k){var L=mc(k),W=L==x?k.constructor:void 0,le=W?xo(W):"";if(le)switch(le){case Cne:return H;case Ane:return y;case kne:return b;case Rne:return _;case Nne:return P}return L});function lre(k,L){return L=L??o,!!L&&(typeof k=="number"||Pe.test(k))&&k>-1&&k%1==0&&k<L}function cre(k){var L=typeof k;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?k!=="__proto__":k===null}function dre(k){return!!jt&&jt in k}function fre(k){var L=k&&k.constructor,W=typeof L=="function"&&L.prototype||q;return k===W}function pre(k){return Pn.call(k)}function xo(k){if(k!=null){try{return _e.call(k)}catch{}try{return k+""}catch{}}return""}function $I(k,L){return k===L||k!==k&&L!==L}var hre=UI(function(){return arguments}())?UI:function(k){return gc(k)&&Ee.call(k,"callee")&&!Gn.call(k,"callee")},ah=Array.isArray;function mre(k){return k!=null&&YI(k.length)&&!WI(k)}var Uv=_ne||xre;function gre(k,L){return HI(k,L)}function WI(k){if(!qI(k))return!1;var L=mc(k);return L==p||L==m||L==l||L==T}function YI(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=o}function qI(k){var L=typeof k;return k!=null&&(L=="object"||L=="function")}function gc(k){return k!=null&&typeof k=="object"}var GI=Ye?Me(Ye):rre;function yre(k){return mre(k)?Jne(k):ire(k)}function vre(){return[]}function xre(){return!1}e.exports=gre}(Cf,Cf.exports);var I7=Cf.exports;const O7=Ct(I7);class hs{constructor(t){ne(this,"subscribers",new Set);Hv(this,ei);ne(this,"initialState");Hv(this,Xs);ne(this,"lifecycleListeners",new Map);ne(this,"emitLifecycle",(t,n)=>{const r=this.lifecycleListeners.get(t);if(r){const i={type:t,timestamp:Date.now(),data:n};r.forEach(a=>{try{a(i)}catch{}})}});ne(this,"notifySubscribers",t=>{Array.from(this.subscribers).forEach(r=>{try{r(t)}catch(i){this.emitLifecycle("error",{error:i})}})});ne(this,"subscribe",t=>(this.subscribers.add(t),()=>{this.subscribers.delete(t)}));ne(this,"onLifecycle",(t,n)=>{this.lifecycleListeners.has(t)||this.lifecycleListeners.set(t,new Set);const r=this.lifecycleListeners.get(t);return r.add(n),()=>{r.delete(n),r.size===0&&this.lifecycleListeners.delete(t)}});ne(this,"get",()=>bo(this,ei));ne(this,"set",t=>{this.emitLifecycle("beforeUpdate",{previousState:bo(this,ei),nextState:t}),O7(bo(this,ei),t)||(yc(this,ei,t),yc(this,Xs,Date.now()),this.emitLifecycle("stateChange",{state:t}),this.notifySubscribers(t)),this.emitLifecycle("afterUpdate",{state:t})});ne(this,"setPartial",t=>{if(t==null)return;const n={...bo(this,ei),...t};this.set(n)});ne(this,"clear",()=>{this.emitLifecycle("destroy"),this.subscribers=new Set,this.lifecycleListeners=new Map});ne(this,"reset",()=>{this.set(this.initialState)});ne(this,"lastUpdated",()=>bo(this,Xs));yc(this,ei,t),this.initialState=t,yc(this,Xs,Date.now()),this.emitLifecycle("init",{initialState:bo(this,ei)})}}ei=new WeakMap,Xs=new WeakMap;class D7{constructor({config:t,api:n}){ne(this,"config");ne(this,"api");ne(this,"state");ne(this,"shouldCollectData",()=>{var n;return!!(!((n=this.state.get().contact)!=null&&n.token)&&this.config.collectUserData)});ne(this,"autoCreateUnverifiedUser",async()=>{var t,n,r,i;await this.createUnverifiedContact({name:((n=(t=this.config.user)==null?void 0:t.data)==null?void 0:n.name)||"Anonymous",email:(i=(r=this.config.user)==null?void 0:r.data)==null?void 0:i.email})});ne(this,"createUnverifiedContact",async t=>{try{this.state.setPartial({isCreatingUnverifiedContact:!0,isErrorCreatingUnverifiedContact:!1});const{data:n}=await this.api.createUnverifiedContact(t);n!=null&&n.token?(this.api.setAuthToken(n.token),this.state.setPartial({contact:{token:n.token}})):this.state.setPartial({isErrorCreatingUnverifiedContact:!0})}finally{this.state.setPartial({isCreatingUnverifiedContact:!1})}});var r,i,a;this.config=t,this.api=n,this.state=new hs({contact:(r=t.user)!=null&&r.token?{token:(i=t.user)==null?void 0:i.token}:null,isCreatingUnverifiedContact:!1,isErrorCreatingUnverifiedContact:!1}),!((a=t.user)!=null&&a.token)&&!t.collectUserData&&this.autoCreateUnverifiedUser()}}class uy{constructor(){ne(this,"state",new hs({isPolling:!1,isError:!1}));ne(this,"abortController",new AbortController);ne(this,"reset",()=>{var t;this.abortController.abort("Resetting poller"),(t=this.stopPolling)==null||t.call(this),this.stopPolling=null});ne(this,"stopPolling",null);ne(this,"startPolling",(t,n)=>{if(this.stopPolling)return;const r=[],i=async()=>{this.abortController=new AbortController,this.state.setPartial({isPolling:!0});try{await t(this.abortController.signal)}catch(a){if(this.abortController.signal.aborted)return;console.error("Failed to poll:",a),this.state.setPartial({isError:!0})}finally{this.state.setPartial({isPolling:!1})}this.abortController.signal.aborted?console.log("Poller aborted, not scheduling anymore"):r.push(setTimeout(i,n))};i(),this.stopPolling=()=>{r.forEach(clearTimeout),this.state.reset()}})}}const Wt=[];for(let e=0;e<256;++e)Wt.push((e+256).toString(16).slice(1));function L7(e,t=0){return(Wt[e[t+0]]+Wt[e[t+1]]+Wt[e[t+2]]+Wt[e[t+3]]+"-"+Wt[e[t+4]]+Wt[e[t+5]]+"-"+Wt[e[t+6]]+Wt[e[t+7]]+"-"+Wt[e[t+8]]+Wt[e[t+9]]+"-"+Wt[e[t+10]]+Wt[e[t+11]]+Wt[e[t+12]]+Wt[e[t+13]]+Wt[e[t+14]]+Wt[e[t+15]]).toLowerCase()}let ly;const M7=new Uint8Array(16);function F7(){if(!ly){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ly=crypto.getRandomValues.bind(crypto)}return ly(M7)}const cC={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function dC(e,t,n){var i;if(cC.randomUUID&&!t&&!e)return cC.randomUUID();e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??F7();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,L7(r)}function cy(){return dC()}class B7{constructor({config:t,api:n,contactCtx:r}){ne(this,"config");ne(this,"api");ne(this,"contactCtx");ne(this,"activeSessionPoller",new uy);ne(this,"sessionsRefresher",new uy);ne(this,"sessionState",new hs({session:null,isCreatingSession:!1}));ne(this,"sessionsState",new hs({data:[],cursor:void 0,isLastPage:!1,didStartInitialFetch:!1,isInitialFetchLoading:!0}));ne(this,"reset",async()=>{this.sessionState.reset(),this.activeSessionPoller.reset()});ne(this,"registerActiveSessionPolling",()=>{this.sessionState.subscribe(({session:t})=>{t!=null&&t.id?this.activeSessionPoller.startPolling(async n=>{const{data:r}=await this.api.getSession({sessionId:t.id,abortSignal:n});r&&this.sessionState.setPartial({session:r})},1e3):this.activeSessionPoller.reset()})});ne(this,"registerInitialSessionsFetch",()=>{var n;const t=async()=>{this.sessionsState.setPartial({didStartInitialFetch:!0}),await this.loadMoreSessions(),this.sessionsState.setPartial({isInitialFetchLoading:!1})};(n=this.contactCtx.state.get().contact)!=null&&n.token&&!this.sessionsState.get().didStartInitialFetch&&(t(),this.registerSessionsRefresher()),this.contactCtx.state.subscribe(({contact:r})=>{r!=null&&r.token&&!this.sessionsState.get().didStartInitialFetch&&(t(),this.registerSessionsRefresher())})});ne(this,"registerSessionsRefresher",()=>{this.sessionsRefresher.startPolling(async()=>{const{data:t}=await this.getSessions({cursor:void 0});if(!t)return;const n=[...t.items,...this.sessionsState.get().data].filter((r,i,a)=>i===a.findIndex(o=>r.id===o.id));this.sessionsState.setPartial({data:n})},1e4)});ne(this,"createSession",async()=>{var r,i;this.sessionState.setPartial({session:null,isCreatingSession:!0});const{data:t,error:n}=await this.api.createSession({customData:(r=this.config.user)!=null&&r.externalId?{external_id:(i=this.config.user)==null?void 0:i.externalId}:void 0});return t?(this.sessionState.setPartial({session:t,isCreatingSession:!1}),t):(console.error("Failed to create session:",n),null)});ne(this,"loadMoreSessions",async()=>{if(this.sessionsState.get().isLastPage)return;const{data:t}=await this.getSessions({cursor:this.sessionsState.get().cursor});if(t){const r=[...this.sessionsState.get().data,...t.items].filter((i,a,o)=>a===o.findIndex(s=>i.id===s.id));this.sessionsState.setPartial({data:r,cursor:t.next||void 0,isLastPage:t.next===null})}});ne(this,"getSessions",async({cursor:t})=>{var n,r;return(n=this.contactCtx.state.get().contact)!=null&&n.token?await this.api.getSessions({cursor:t,filters:(r=this.config.user)!=null&&r.externalId?{external_id:this.config.user.externalId}:{}}):{data:null}});this.config=t,this.api=n,this.contactCtx=r,this.registerActiveSessionPolling(),this.registerInitialSessionsFetch()}}class j7{constructor({config:t,api:n,sessionCtx:r}){ne(this,"config");ne(this,"api");ne(this,"sessionCtx");ne(this,"poller",new uy);ne(this,"state",new hs({messages:[],isSendingMessage:!1,lastAIResMightSolveUserIssue:!1,isInitialFetchLoading:!1}));ne(this,"sendMessageAbortController",new AbortController);ne(this,"reset",()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset(),this.poller.reset()});ne(this,"registerPolling",()=>{this.sessionCtx.sessionState.subscribe(({session:t})=>{t!=null&&t.id?this.poller.startPolling(async n=>{await this.fetchAndSetHistory(t.id,n)},1e3):this.poller.reset()})});ne(this,"sendMessage",async t=>{var i,a,o,s,u,l,c,d,f;this.sendMessageAbortController=new AbortController;const n=this.state.get().isSendingMessage,r=((i=this.sessionCtx.sessionState.get().session)==null?void 0:i.assignee.kind)==="ai";if(n&&r){console.warn("Cannot send messages while awaiting AI response");return}this.state.setPartial({lastAIResMightSolveUserIssue:!1});try{this.state.setPartial({isSendingMessage:!0});const p=this.toUserMessage(t.content,t.attachments||void 0),m=this.state.get().messages;if(this.state.setPartial({messages:[...m,p]}),!((a=this.sessionCtx.sessionState.get().session)!=null&&a.id)&&!await this.sessionCtx.createSession()){console.error("Failed to create session");return}const y=(o=this.sessionCtx.sessionState.get().session)==null?void 0:o.id;if(!y)return;const{data:w}=await this.api.sendMessage({uuid:p.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,session_id:y,user:(s=this.config.user)==null?void 0:s.data,...t},this.sendMessageAbortController.signal);if(w!=null&&w.success){const g=this.toBotMessage(w);if(g){const x=this.state.get().messages;if(!!x.some(T=>T.id===g.id)){this.state.setPartial({lastAIResMightSolveUserIssue:((u=w.autopilotResponse)==null?void 0:u.mightSolveUserIssue)||((l=w.uiResponse)==null?void 0:l.mightSolveUserIssue)});return}this.state.setPartial({messages:[...x,g],lastAIResMightSolveUserIssue:((c=w.autopilotResponse)==null?void 0:c.mightSolveUserIssue)||((d=w.uiResponse)==null?void 0:d.mightSolveUserIssue)})}}else{const g=this.toBotErrorMessage(((f=w==null?void 0:w.error)==null?void 0:f.message)||"Unknown error occurred"),x=this.state.get().messages;this.state.setPartial({messages:[...x,g]})}}catch(p){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",p)}finally{this.state.setPartial({isSendingMessage:!1})}});ne(this,"fetchAndSetHistory",async(t,n)=>{var a;this.state.get().messages.length===0&&this.state.setPartial({isInitialFetchLoading:!0});const r=(a=this.state.get().messages.at(-1))==null?void 0:a.timestamp,{data:i}=await this.api.getSessionHistory({sessionId:t,lastMessageTimestamp:r,abortSignal:n});if(i&&i.length>0){const o=this.state.get().messages,s=i.map(this.mapHistoryToMessage).filter(u=>!o.some(l=>l.id===u.id));this.state.setPartial({messages:[...o,...s]})}this.state.get().isInitialFetchLoading&&this.state.setPartial({isInitialFetchLoading:!1})});ne(this,"mapHistoryToMessage",t=>{var i,a,o;const n={id:t.publicId,timestamp:t.sentAt||"",attachments:t.attachments||void 0};if(t.sender.kind==="user")return{...n,type:"FROM_USER",content:t.content.text||"",deliveredAt:t.sentAt||""};if(t.sender.kind==="agent")return{...n,type:"FROM_AGENT",component:"agent_message",data:{message:t.content.text||""},agent:{name:t.sender.name||"",avatar:t.sender.avatar||"",id:null,isAi:!1}};const r=(i=t.actionCalls)==null?void 0:i.at(-1);return{...n,type:"FROM_BOT",component:"bot_message",agent:{id:null,name:((a=this.config.bot)==null?void 0:a.name)||"",isAi:!0,avatar:((o=this.config.bot)==null?void 0:o.avatar)||""},data:{message:t.content.text||"",action:r?{name:r.actionName,data:r.result}:void 0}}});ne(this,"toUserMessage",(t,n)=>({id:cy(),type:"FROM_USER",content:t,deliveredAt:new Date().toISOString(),attachments:n,timestamp:new Date().toISOString()}));ne(this,"toBotMessage",t=>{var n;return t.success&&t.autopilotResponse?{type:"FROM_BOT",id:t.autopilotResponse.id||cy(),timestamp:new Date().toISOString(),component:"bot_message",agent:this.config.bot?{name:this.config.bot.name||"",isAi:!0,avatar:this.config.bot.avatar||"",id:null}:void 0,data:{message:t.autopilotResponse.value.content,action:(n=t.uiResponse)!=null&&n.value.name?{name:t.uiResponse.value.name,data:t.uiResponse.value.request_response}:void 0}}:null});ne(this,"toBotErrorMessage",t=>({type:"FROM_BOT",id:cy(),timestamp:new Date().toISOString(),component:"TEXT",data:{message:t,variant:"error",action:void 0}}));this.config=t,this.api=n,this.sessionCtx=r,this.registerPolling()}}class U7{constructor({contactCtx:t,sessionCtx:n,resetChat:r}){ne(this,"state");ne(this,"contactCtx");ne(this,"sessionCtx");ne(this,"resetChat");ne(this,"registerRoutingListener",()=>{this.contactCtx.state.subscribe(({contact:t})=>{t!=null&&t.token&&this.state.get().screen==="welcome"&&this.state.setPartial({screen:"sessions"})})});ne(this,"toSessionsScreen",()=>{this.resetChat(),this.state.setPartial({screen:"sessions"})});ne(this,"toChatScreen",t=>{if(this.resetChat(),t){const n=this.sessionCtx.sessionsState.get().data.find(r=>r.id===t);if(!n)return;this.sessionCtx.sessionState.setPartial({session:n})}this.state.setPartial({screen:"chat"})});this.state=new hs({screen:t.shouldCollectData()?"welcome":"sessions"}),this.contactCtx=t,this.sessionCtx=n,this.resetChat=r,this.registerRoutingListener()}}class H7{constructor({config:t}){ne(this,"config");ne(this,"api");ne(this,"contactCtx");ne(this,"sessionCtx");ne(this,"messageCtx");ne(this,"routerCtx");ne(this,"resetChat",()=>{this.sessionCtx.reset(),this.messageCtx.reset()});this.config=t,this.api=new P7({config:t}),this.contactCtx=new D7({api:this.api,config:this.config}),this.sessionCtx=new B7({config:this.config,api:this.api,contactCtx:this.contactCtx}),this.messageCtx=new j7({config:this.config,api:this.api,sessionCtx:this.sessionCtx}),this.routerCtx=new U7({contactCtx:this.contactCtx,sessionCtx:this.sessionCtx,resetChat:this.resetChat})}}const[ar,z7]=Q9();function V7({options:e,children:t,components:n}){const r=v.useRef(new H7({config:e})).current,i=v.useMemo(()=>new X9({components:n}),[n]);return E.jsx(z7,{value:{widgetCtx:r,components:n,componentStore:i,version:cE},children:t})}function ms(){const{widgetCtx:e}=ar();return e.config}function dl(e){return v.useSyncExternalStore(e.subscribe,e.get,e.get)}function $7(){const{widgetCtx:e}=ar();return{contactState:dl(e.contactCtx.state),createUnverifiedContact:e.contactCtx.createUnverifiedContact}}function gs(){const{widgetCtx:e}=ar();return{messagesState:dl(e.messageCtx.state),sendMessage:e.messageCtx.sendMessage}}function fl(){const{widgetCtx:e}=ar(),t=dl(e.sessionCtx.sessionState),n=dl(e.sessionCtx.sessionsState);return{sessionState:t,sessionsState:n}}function fC(){var a,o;const{sessionState:e}=fl(),{messagesState:t}=gs(),n=((a=e.session)==null?void 0:a.assignee.kind)==="ai",r=((o=t.messages.at(-1))==null?void 0:o.type)==="FROM_USER";return{isAwaitingBotReply:(n||e.isCreatingSession)&&(t.isSendingMessage||r)}}var pC={exports:{}},hC={};/**
334
334
  * @license React
335
335
  * use-sync-external-store-shim.production.min.js
336
336
  *
@@ -338,7 +338,7 @@ to {
338
338
  *
339
339
  * This source code is licensed under the MIT license found in the
340
340
  * LICENSE file in the root directory of this source tree.
341
- */var ys=v;function W7(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Y7=typeof Object.is=="function"?Object.is:W7,q7=ys.useState,G7=ys.useEffect,K7=ys.useLayoutEffect,X7=ys.useDebugValue;function Q7(e,t){var n=t(),r=q7({inst:{value:n,getSnapshot:t}}),i=r[0].inst,a=r[1];return K7(function(){i.value=n,i.getSnapshot=t,dy(i)&&a({inst:i})},[e,n,t]),G7(function(){return dy(i)&&a({inst:i}),e(function(){dy(i)&&a({inst:i})})},[e]),X7(n),n}function dy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Y7(e,n)}catch{return!0}}function Z7(e,t){return t()}var J7=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Z7:Q7;hC.useSyncExternalStore=ys.useSyncExternalStore!==void 0?ys.useSyncExternalStore:J7,pC.exports=hC;var ej=pC.exports;const sa=()=>{},_n=sa(),fy=Object,ze=e=>e===_n,Vr=e=>typeof e=="function",ua=(e,t)=>({...e,...t}),tj=e=>Vr(e.then),Af=new WeakMap;let nj=0;const pl=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let i,a;if(fy(e)===e&&!r&&n!=RegExp){if(i=Af.get(e),i)return i;if(i=++nj+"~",Af.set(e,i),n==Array){for(i="@",a=0;a<e.length;a++)i+=pl(e[a])+",";Af.set(e,i)}if(n==fy){i="#";const o=fy.keys(e).sort();for(;!ze(a=o.pop());)ze(e[a])||(i+=a+":"+pl(e[a])+",");Af.set(e,i)}}else i=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return i},bi=new WeakMap,py={},kf={},hy="undefined",Rf=typeof window!=hy,my=typeof document!=hy,rj=()=>Rf&&typeof window.requestAnimationFrame!=hy,mC=(e,t)=>{const n=bi.get(e);return[()=>!ze(t)&&e.get(t)||py,r=>{if(!ze(t)){const i=e.get(t);t in kf||(kf[t]=i),n[5](t,ua(i,r),i||py)}},n[6],()=>!ze(t)&&t in kf?kf[t]:!ze(t)&&e.get(t)||py]};let gy=!0;const ij=()=>gy,[yy,vy]=Rf&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[sa,sa],aj=()=>{const e=my&&document.visibilityState;return ze(e)||e!=="hidden"},oj=e=>(my&&document.addEventListener("visibilitychange",e),yy("focus",e),()=>{my&&document.removeEventListener("visibilitychange",e),vy("focus",e)}),sj=e=>{const t=()=>{gy=!0,e()},n=()=>{gy=!1};return yy("online",t),yy("offline",n),()=>{vy("online",t),vy("offline",n)}},uj={isOnline:ij,isVisible:aj},lj={initFocus:oj,initReconnect:sj},gC=!yn.useId,hl=!Rf||"Deno"in window,cj=e=>rj()?window.requestAnimationFrame(e):setTimeout(e,1),xy=hl?v.useEffect:v.useLayoutEffect,wy=typeof navigator<"u"&&navigator.connection,yC=!hl&&wy&&(["slow-2g","2g"].includes(wy.effectiveType)||wy.saveData),by=e=>{if(Vr(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?pl(e):"",[e,t]};let dj=0;const Ey=()=>++dj,vC=0,xC=1,wC=2;var ml={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:vC,MUTATE_EVENT:wC,RECONNECT_EVENT:xC};async function bC(...e){const[t,n,r,i]=e,a=ua({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let o=a.populateCache;const s=a.rollbackOnError;let u=a.optimisticData;const l=f=>typeof s=="function"?s(f):s!==!1,c=a.throwOnError;if(Vr(n)){const f=n,p=[],m=t.keys();for(const y of m)!/^\$(inf|sub)\$/.test(y)&&f(t.get(y)._k)&&p.push(y);return Promise.all(p.map(d))}return d(n);async function d(f){const[p]=by(f);if(!p)return;const[m,y]=mC(t,p),[w,g,x,b]=bi.get(t),T=()=>{const X=w[p];return(Vr(a.revalidate)?a.revalidate(m().data,f):a.revalidate!==!1)&&(delete x[p],delete b[p],X&&X[0])?X[0](wC).then(()=>m().data):m().data};if(e.length<3)return T();let S=r,_;const N=Ey();g[p]=[N,0];const D=!ze(u),V=m(),P=V.data,$=V._c,H=ze($)?P:$;if(D&&(u=Vr(u)?u(H,P):u,y({data:u,_c:H})),Vr(S))try{S=S(H)}catch(X){_=X}if(S&&tj(S))if(S=await S.catch(X=>{_=X}),N!==g[p][0]){if(_)throw _;return S}else _&&D&&l(_)&&(o=!0,y({data:H,_c:_n}));if(o&&!_)if(Vr(o)){const X=o(S,H);y({data:X,error:_n,_c:_n})}else y({data:S,error:_n,_c:_n});if(g[p][1]=Ey(),Promise.resolve(T()).then(()=>{y({_c:_n})}),_){if(c)throw _;return}return S}}const EC=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},fj=(e,t)=>{if(!bi.has(e)){const n=ua(lj,t),r={},i=bC.bind(_n,e);let a=sa;const o={},s=(c,d)=>{const f=o[c]||[];return o[c]=f,f.push(d),()=>f.splice(f.indexOf(d),1)},u=(c,d,f)=>{e.set(c,d);const p=o[c];if(p)for(const m of p)m(d,f)},l=()=>{if(!bi.has(e)&&(bi.set(e,[r,{},{},{},i,u,s]),!hl)){const c=n.initFocus(setTimeout.bind(_n,EC.bind(_n,r,vC))),d=n.initReconnect(setTimeout.bind(_n,EC.bind(_n,r,xC)));a=()=>{c&&c(),d&&d(),bi.delete(e)}}};return l(),[e,i,l,a]}return[e,bi.get(e)[4]]},pj=(e,t,n,r,i)=>{const a=n.errorRetryCount,o=i.retryCount,s=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!ze(a)&&o>a||setTimeout(r,s,i)},hj=(e,t)=>pl(e)==pl(t),[TC,mj]=fj(new Map),gj=ua({onLoadingSlow:sa,onSuccess:sa,onError:sa,onErrorRetry:pj,onDiscarded:sa,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:yC?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:yC?5e3:3e3,compare:hj,isPaused:()=>!1,cache:TC,mutate:mj,fallback:{}},uj),yj=(e,t)=>{const n=ua(e,t);if(t){const{use:r,fallback:i}=e,{use:a,fallback:o}=t;r&&a&&(n.use=r.concat(a)),i&&o&&(n.fallback=ua(i,o))}return n},vj=v.createContext({}),xj="$inf$",_C=Rf&&window.__SWR_DEVTOOLS_USE__,wj=_C?window.__SWR_DEVTOOLS_USE__:[],bj=()=>{_C&&(window.__SWR_DEVTOOLS_REACT__=yn)},Ej=e=>Vr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Tj=()=>ua(gj,v.useContext(vj)),_j=e=>(t,n,r)=>e(t,n&&((...a)=>{const[o]=by(t),[,,,s]=bi.get(TC);if(o.startsWith(xj))return n(...a);const u=s[o];return ze(u)?n(...a):(delete s[o],u)}),r),Sj=wj.concat(_j),Cj=e=>function(...n){const r=Tj(),[i,a,o]=Ej(n),s=yj(r,o);let u=e;const{use:l}=s,c=(l||[]).concat(Sj);for(let d=c.length;d--;)u=c[d](u);return u(i,a||s.fetcher||null,s)},Aj=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i>=0&&(r[i]=r[r.length-1],r.pop())}};bj();const SC=yn.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),Ty={dedupe:!0},kj=Cj((e,t,n)=>{const{cache:r,compare:i,suspense:a,fallbackData:o,revalidateOnMount:s,revalidateIfStale:u,refreshInterval:l,refreshWhenHidden:c,refreshWhenOffline:d,keepPreviousData:f}=n,[p,m,y,w]=bi.get(r),[g,x]=by(e),b=v.useRef(!1),T=v.useRef(!1),S=v.useRef(g),_=v.useRef(t),N=v.useRef(n),D=()=>N.current,V=()=>D().isVisible()&&D().isOnline(),[P,$,H,X]=mC(r,g),Y=v.useRef({}).current,re=ze(o)?n.fallback[g]:o,ie=(Te,be)=>{for(const Ye in Y){const He=Ye;if(He==="data"){if(!i(Te[He],be[He])&&(!ze(Te[He])||!i(ge,be[He])))return!1}else if(be[He]!==Te[He])return!1}return!0},ee=v.useMemo(()=>{const Te=!g||!t?!1:ze(s)?D().isPaused()||a?!1:ze(u)?!0:u:s,be=Me=>{const Ot=ua(Me);return delete Ot._k,Te?{isValidating:!0,isLoading:!0,...Ot}:Ot},Ye=P(),He=X(),xt=be(Ye),wt=Ye===He?xt:be(He);let Ke=xt;return[()=>{const Me=be(P());return ie(Me,Ke)?(Ke.data=Me.data,Ke.isLoading=Me.isLoading,Ke.isValidating=Me.isValidating,Ke.error=Me.error,Ke):(Ke=Me,Me)},()=>wt]},[r,g]),F=ej.useSyncExternalStore(v.useCallback(Te=>H(g,(be,Ye)=>{ie(Ye,be)||Te()}),[r,g]),ee[0],ee[1]),B=!b.current,A=p[g]&&p[g].length>0,ae=F.data,he=ze(ae)?re:ae,O=F.error,Pe=v.useRef(he),ge=f?ze(ae)?Pe.current:ae:he,xe=A&&!ze(O)?!1:B&&!ze(s)?s:D().isPaused()?!1:a?ze(he)?!1:u:ze(he)||u,$e=!!(g&&t&&B&&xe),Ve=ze(F.isValidating)?$e:F.isValidating,We=ze(F.isLoading)?$e:F.isLoading,Ge=v.useCallback(async Te=>{const be=_.current;if(!g||!be||T.current||D().isPaused())return!1;let Ye,He,xt=!0;const wt=Te||{},Ke=!y[g]||!wt.dedupe,Me=()=>gC?!T.current&&g===S.current&&b.current:g===S.current,Ot={isValidating:!1,isLoading:!1},ka=()=>{$(Ot)},Ra=()=>{const te=y[g];te&&te[1]===He&&delete y[g]},Na={isValidating:!0};ze(P().data)&&(Na.isLoading=!0);try{if(Ke&&($(Na),n.loadingTimeout&&ze(P().data)&&setTimeout(()=>{xt&&Me()&&D().onLoadingSlow(g,n)},n.loadingTimeout),y[g]=[be(x),Ey()]),[Ye,He]=y[g],Ye=await Ye,Ke&&setTimeout(Ra,n.dedupingInterval),!y[g]||y[g][1]!==He)return Ke&&Me()&&D().onDiscarded(g),!1;Ot.error=_n;const te=m[g];if(!ze(te)&&(He<=te[0]||He<=te[1]||te[1]===0))return ka(),Ke&&Me()&&D().onDiscarded(g),!1;const de=P().data;Ot.data=i(de,Ye)?de:Ye,Ke&&Me()&&D().onSuccess(Ye,g,n)}catch(te){Ra();const de=D(),{shouldRetryOnError:j}=de;de.isPaused()||(Ot.error=te,Ke&&Me()&&(de.onError(te,g,de),(j===!0||Vr(j)&&j(te))&&(!D().revalidateOnFocus||!D().revalidateOnReconnect||V())&&de.onErrorRetry(te,g,de,q=>{const ce=p[g];ce&&ce[0]&&ce[0](ml.ERROR_REVALIDATE_EVENT,q)},{retryCount:(wt.retryCount||0)+1,dedupe:!0})))}return xt=!1,ka(),!0},[g,r]),St=v.useCallback((...Te)=>bC(r,S.current,...Te),[]);if(xy(()=>{_.current=t,N.current=n,ze(ae)||(Pe.current=ae)}),xy(()=>{if(!g)return;const Te=Ge.bind(_n,Ty);let be=0;const He=Aj(g,p,(xt,wt={})=>{if(xt==ml.FOCUS_EVENT){const Ke=Date.now();D().revalidateOnFocus&&Ke>be&&V()&&(be=Ke+D().focusThrottleInterval,Te())}else if(xt==ml.RECONNECT_EVENT)D().revalidateOnReconnect&&V()&&Te();else{if(xt==ml.MUTATE_EVENT)return Ge();if(xt==ml.ERROR_REVALIDATE_EVENT)return Ge(wt)}});return T.current=!1,S.current=g,b.current=!0,$({_k:x}),xe&&(ze(he)||hl?Te():cj(Te)),()=>{T.current=!0,He()}},[g]),xy(()=>{let Te;function be(){const He=Vr(l)?l(P().data):l;He&&Te!==-1&&(Te=setTimeout(Ye,He))}function Ye(){!P().error&&(c||D().isVisible())&&(d||D().isOnline())?Ge(Ty).then(be):be()}return be(),()=>{Te&&(clearTimeout(Te),Te=-1)}},[l,c,d,g]),v.useDebugValue(ge),a&&ze(he)&&g){if(!gC&&hl)throw new Error("Fallback data is required when using suspense in SSR.");_.current=t,N.current=n,T.current=!1;const Te=w[g];if(!ze(Te)){const be=St(Te);SC(be)}if(ze(O)){const be=Ge(Ty);ze(ge)||(be.status="fulfilled",be.value=!0),SC(be)}else throw O}return{mutate:St,get data(){return Y.data=!0,ge},get error(){return Y.error=!0,O},get isValidating(){return Y.isValidating=!0,Ve},get isLoading(){return Y.isLoading=!0,We}}});function Nf(){const{widgetCtx:e}=ar();return kj([e.config.token],e.api.widgetPrelude,{revalidateOnFocus:!1})}function gl(){const{widgetCtx:e}=ar();return{routerState:dl(e.routerCtx.state),toSessionsScreen:e.routerCtx.toSessionsScreen,toChatScreen:e.routerCtx.toChatScreen}}var CC={};const Rj=vc(wF);var Pf={},AC;function Nj(){if(AC)return Pf;AC=1,Object.defineProperty(Pf,"__esModule",{value:!0});var e=v;function t(){var n=e.useRef(!1),r=e.useCallback(function(){return n.current},[]);return e.useEffect(function(){return n.current=!0,function(){n.current=!1}},[]),r}return Pf.default=t,Pf}Object.defineProperty(CC,"__esModule",{value:!0});var _y=Rj,Sy=v,Pj=_y.__importDefault(Nj());function Ij(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=Sy.useRef(0),i=Pj.default(),a=Sy.useState(n),o=a[0],s=a[1],u=Sy.useCallback(function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var d=++r.current;return o.loading||s(function(f){return _y.__assign(_y.__assign({},f),{loading:!0})}),e.apply(void 0,l).then(function(f){return i()&&d===r.current&&s({value:f,loading:!1}),f},function(f){return i()&&d===r.current&&s({error:f,loading:!1}),f})},t);return[o,u]}var Oj=CC.default=Ij;const la=new Map;function Dj(){const[e,t]=v.useState([]),{widgetCtx:{api:n}}=ar();function r(c){const d=c.map(f=>({file:f,id:dC(),status:"pending",progress:0}));t(f=>[...f,...d]),d.forEach(o)}function i(c,d){t(f=>f.map(p=>p.id===c?{...p,...d}:p))}function a(c){t(d=>d.filter(f=>f.id!==c))}const o=async c=>{const d=new AbortController;la.set(c.id,d);try{t(p=>p.map(m=>m.id===c.id?{...m,status:"uploading",progress:0}:m));const f=await n.uploadFile(c,{signal:d.signal,onUploadProgress:p=>{if(!p.total)return;const m=Math.round(p.loaded*100/p.total);i(c.id,{progress:m})}});i(c.id,{status:"success",fileUrl:f.fileUrl,progress:100})}catch(f){d.signal.aborted||i(c.id,{status:"error",error:f instanceof Error?f.message:"Upload failed",progress:0})}finally{la.delete(c.id)}},s=c=>{const d=la.get(c);d&&(d.abort(),la.delete(c)),a(c)},u=v.useMemo(()=>e.filter(c=>c.status==="success"&&c.fileUrl),[e]);function l(){la.forEach(c=>c.abort()),la.clear(),t([])}return v.useEffect(()=>()=>{la.forEach(c=>c.abort()),la.clear()},[]),{allFiles:e,appendFiles:r,handleCancelUpload:s,successFiles:u,emptyTheFiles:l,getFileById:c=>e.find(d=>d.id===c),getUploadProgress:c=>{var d;return((d=e.find(f=>f.id===c))==null?void 0:d.progress)??0},getUploadStatus:c=>{var d;return(d=e.find(f=>f.id===c))==null?void 0:d.status},hasErrors:e.some(c=>c.status==="error"),isUploading:e.some(c=>c.status==="uploading")}}function Sn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Lj(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function kC(...e){return t=>e.forEach(n=>Lj(n,t))}function $r(...e){return v.useCallback(kC(...e),e)}function ca(e,t=[]){let n=[];function r(a,o){const s=v.createContext(o),u=n.length;n=[...n,o];const l=d=>{var g;const{scope:f,children:p,...m}=d,y=((g=f==null?void 0:f[e])==null?void 0:g[u])||s,w=v.useMemo(()=>m,Object.values(m));return E.jsx(y.Provider,{value:w,children:p})};l.displayName=a+"Provider";function c(d,f){var y;const p=((y=f==null?void 0:f[e])==null?void 0:y[u])||s,m=v.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[l,c]}const i=()=>{const a=n.map(o=>v.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,Mj(i,...t)]}function Mj(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const d=u(a)[`__scope${l}`];return{...s,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var If=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),a=i.find(Fj);if(a){const o=a.props.children,s=i.map(u=>u===a?v.Children.count(o)>1?v.Children.only(null):v.isValidElement(o)?o.props.children:null:u);return E.jsx(Cy,{...r,ref:t,children:v.isValidElement(o)?v.cloneElement(o,void 0,s):null})}return E.jsx(Cy,{...r,ref:t,children:n})});If.displayName="Slot";var Cy=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=jj(n);return v.cloneElement(n,{...Bj(r,n.props),ref:t?kC(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});Cy.displayName="SlotClone";var RC=({children:e})=>E.jsx(E.Fragment,{children:e});function Fj(e){return v.isValidElement(e)&&e.type===RC}function Bj(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function jj(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Uj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],zn=Uj.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?If:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Hj(e,t){e&&Qo.flushSync(()=>e.dispatchEvent(t))}function Yt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function NC(e,t=globalThis==null?void 0:globalThis.document){const n=Yt(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var zj="DismissableLayer",Ay="dismissableLayer.update",Vj="dismissableLayer.pointerDownOutside",$j="dismissableLayer.focusOutside",PC,IC=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ky=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...u}=e,l=v.useContext(IC),[c,d]=v.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),m=$r(t,N=>d(N)),y=Array.from(l.layers),[w]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(w),x=c?y.indexOf(c):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,T=x>=g,S=qj(N=>{const D=N.target,V=[...l.branches].some(P=>P.contains(D));!T||V||(i==null||i(N),o==null||o(N),N.defaultPrevented||s==null||s())},f),_=Gj(N=>{const D=N.target;[...l.branches].some(P=>P.contains(D))||(a==null||a(N),o==null||o(N),N.defaultPrevented||s==null||s())},f);return NC(N=>{x===l.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},f),v.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(PC=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),OC(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=PC)}},[c,f,n,l]),v.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),OC())},[c,l]),v.useEffect(()=>{const N=()=>p({});return document.addEventListener(Ay,N),()=>document.removeEventListener(Ay,N)},[]),E.jsx(zn.div,{...u,ref:m,style:{pointerEvents:b?T?"auto":"none":void 0,...e.style},onFocusCapture:Sn(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Sn(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Sn(e.onPointerDownCapture,S.onPointerDownCapture)})});ky.displayName=zj;var Wj="DismissableLayerBranch",Yj=v.forwardRef((e,t)=>{const n=v.useContext(IC),r=v.useRef(null),i=$r(t,r);return v.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),E.jsx(zn.div,{...e,ref:i})});Yj.displayName=Wj;function qj(e,t=globalThis==null?void 0:globalThis.document){const n=Yt(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let u=function(){DC(Vj,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Gj(e,t=globalThis==null?void 0:globalThis.document){const n=Yt(e),r=v.useRef(!1);return v.useEffect(()=>{const i=a=>{a.target&&!r.current&&DC($j,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function OC(){const e=new CustomEvent(Ay);document.dispatchEvent(e)}function DC(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Hj(i,a):i.dispatchEvent(a)}var or=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},Kj=pO.useId||(()=>{}),Xj=0;function yl(e){const[t,n]=v.useState(Kj());return or(()=>{e||n(r=>r??String(Xj++))},[e]),e||(t?`radix-${t}`:"")}const Qj=["top","right","bottom","left"],da=Math.min,Vn=Math.max,Of=Math.round,Df=Math.floor,fa=e=>({x:e,y:e}),Zj={left:"right",right:"left",bottom:"top",top:"bottom"},Jj={start:"end",end:"start"};function Ry(e,t,n){return Vn(e,da(t,n))}function Ei(e,t){return typeof e=="function"?e(t):e}function Ti(e){return e.split("-")[0]}function vs(e){return e.split("-")[1]}function Ny(e){return e==="x"?"y":"x"}function Py(e){return e==="y"?"height":"width"}function pa(e){return["top","bottom"].includes(Ti(e))?"y":"x"}function Iy(e){return Ny(pa(e))}function eU(e,t,n){n===void 0&&(n=!1);const r=vs(e),i=Iy(e),a=Py(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Lf(o)),[o,Lf(o)]}function tU(e){const t=Lf(e);return[Oy(e),t,Oy(t)]}function Oy(e){return e.replace(/start|end/g,t=>Jj[t])}function nU(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:o;default:return[]}}function rU(e,t,n,r){const i=vs(e);let a=nU(Ti(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(Oy)))),a}function Lf(e){return e.replace(/left|right|bottom|top/g,t=>Zj[t])}function iU(e){return{top:0,right:0,bottom:0,left:0,...e}}function LC(e){return typeof e!="number"?iU(e):{top:e,right:e,bottom:e,left:e}}function Mf(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function MC(e,t,n){let{reference:r,floating:i}=e;const a=pa(t),o=Iy(t),s=Py(o),u=Ti(t),l=a==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(vs(t)){case"start":p[o]-=f*(n&&l?-1:1);break;case"end":p[o]+=f*(n&&l?-1:1);break}return p}const aU=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=MC(l,r,u),f=r,p={},m=0;for(let y=0;y<s.length;y++){const{name:w,fn:g}=s[y],{x,y:b,data:T,reset:S}=await g({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});c=x??c,d=b??d,p={...p,[w]:{...p[w],...T}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(l=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:d}=MC(l,f,u)),y=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}};async function vl(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ei(t,e),m=LC(p),w=s[f?d==="floating"?"reference":"floating":d],g=Mf(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(w)))==null||n?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),x=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),T=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Mf(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:b,strategy:u}):x);return{top:(g.top-S.top+m.top)/T.y,bottom:(S.bottom-g.bottom+m.bottom)/T.y,left:(g.left-S.left+m.left)/T.x,right:(S.right-g.right+m.right)/T.x}}const oU=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=Ei(e,t)||{};if(l==null)return{};const d=LC(c),f={x:n,y:r},p=Iy(i),m=Py(p),y=await o.getDimensions(l),w=p==="y",g=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",T=a.reference[m]+a.reference[p]-f[p]-a.floating[m],S=f[p]-a.reference[p],_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let N=_?_[b]:0;(!N||!await(o.isElement==null?void 0:o.isElement(_)))&&(N=s.floating[b]||a.floating[m]);const D=T/2-S/2,V=N/2-y[m]/2-1,P=da(d[g],V),$=da(d[x],V),H=P,X=N-y[m]-$,Y=N/2-y[m]/2+D,re=Ry(H,Y,X),ie=!u.arrow&&vs(i)!=null&&Y!==re&&a.reference[m]/2-(Y<H?P:$)-y[m]/2<0,ee=ie?Y<H?Y-H:Y-X:0;return{[p]:f[p]+ee,data:{[p]:re,centerOffset:Y-re-ee,...ie&&{alignmentOffset:ee}},reset:ie}}}),sU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:u,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...w}=Ei(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const g=Ti(i),x=pa(s),b=Ti(s)===s,T=await(u.isRTL==null?void 0:u.isRTL(l.floating)),S=f||(b||!y?[Lf(s)]:tU(s)),_=m!=="none";!f&&_&&S.push(...rU(s,y,m,T));const N=[s,...S],D=await vl(t,w),V=[];let P=((r=a.flip)==null?void 0:r.overflows)||[];if(c&&V.push(D[g]),d){const Y=eU(i,o,T);V.push(D[Y[0]],D[Y[1]])}if(P=[...P,{placement:i,overflows:V}],!V.every(Y=>Y<=0)){var $,H;const Y=((($=a.flip)==null?void 0:$.index)||0)+1,re=N[Y];if(re)return{data:{index:Y,overflows:P},reset:{placement:re}};let ie=(H=P.filter(ee=>ee.overflows[0]<=0).sort((ee,F)=>ee.overflows[1]-F.overflows[1])[0])==null?void 0:H.placement;if(!ie)switch(p){case"bestFit":{var X;const ee=(X=P.filter(F=>{if(_){const B=pa(F.placement);return B===x||B==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(B=>B>0).reduce((B,A)=>B+A,0)]).sort((F,B)=>F[1]-B[1])[0])==null?void 0:X[0];ee&&(ie=ee);break}case"initialPlacement":ie=s;break}if(i!==ie)return{reset:{placement:ie}}}return{}}}};function FC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function BC(e){return Qj.some(t=>e[t]>=0)}const uU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Ei(e,t);switch(r){case"referenceHidden":{const a=await vl(t,{...i,elementContext:"reference"}),o=FC(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:BC(o)}}}case"escaped":{const a=await vl(t,{...i,altBoundary:!0}),o=FC(a,n.floating);return{data:{escapedOffsets:o,escaped:BC(o)}}}default:return{}}}}};async function lU(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ti(n),s=vs(n),u=pa(n)==="y",l=["left","top"].includes(o)?-1:1,c=a&&u?-1:1,d=Ei(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),u?{x:p*c,y:f*l}:{x:f*l,y:p*c}}const cU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,u=await lU(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},dU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:w=>{let{x:g,y:x}=w;return{x:g,y:x}}},...u}=Ei(e,t),l={x:n,y:r},c=await vl(t,u),d=pa(Ti(i)),f=Ny(d);let p=l[f],m=l[d];if(a){const w=f==="y"?"top":"left",g=f==="y"?"bottom":"right",x=p+c[w],b=p-c[g];p=Ry(x,p,b)}if(o){const w=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=m+c[w],b=m-c[g];m=Ry(x,m,b)}const y=s.fn({...t,[f]:p,[d]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[f]:a,[d]:o}}}}}},fU=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=Ei(e,t),c={x:n,y:r},d=pa(i),f=Ny(d);let p=c[f],m=c[d];const y=Ei(s,t),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(u){const b=f==="y"?"height":"width",T=a.reference[f]-a.floating[b]+w.mainAxis,S=a.reference[f]+a.reference[b]-w.mainAxis;p<T?p=T:p>S&&(p=S)}if(l){var g,x;const b=f==="y"?"width":"height",T=["top","left"].includes(Ti(i)),S=a.reference[d]-a.floating[b]+(T&&((g=o.offset)==null?void 0:g[d])||0)+(T?0:w.crossAxis),_=a.reference[d]+a.reference[b]+(T?0:((x=o.offset)==null?void 0:x[d])||0)-(T?w.crossAxis:0);m<S?m=S:m>_&&(m=_)}return{[f]:p,[d]:m}}}},pU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:u=()=>{},...l}=Ei(e,t),c=await vl(t,l),d=Ti(i),f=vs(i),p=pa(i)==="y",{width:m,height:y}=a.floating;let w,g;d==="top"||d==="bottom"?(w=d,g=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,w=f==="end"?"top":"bottom");const x=y-c.top-c.bottom,b=m-c.left-c.right,T=da(y-c[w],x),S=da(m-c[g],b),_=!t.middlewareData.shift;let N=T,D=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=x),_&&!f){const P=Vn(c.left,0),$=Vn(c.right,0),H=Vn(c.top,0),X=Vn(c.bottom,0);p?D=m-2*(P!==0||$!==0?P+$:Vn(c.left,c.right)):N=y-2*(H!==0||X!==0?H+X:Vn(c.top,c.bottom))}await u({...t,availableWidth:D,availableHeight:N});const V=await o.getDimensions(s.floating);return m!==V.width||y!==V.height?{reset:{rects:!0}}:{}}}};function Ff(){return typeof window<"u"}function xs(e){return jC(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(e){var t;return(t=(jC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jC(e){return Ff()?e instanceof Node||e instanceof $n(e).Node:!1}function Cr(e){return Ff()?e instanceof Element||e instanceof $n(e).Element:!1}function Yr(e){return Ff()?e instanceof HTMLElement||e instanceof $n(e).HTMLElement:!1}function UC(e){return!Ff()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function xl(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function hU(e){return["table","td","th"].includes(xs(e))}function Bf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Dy(e){const t=Ly(),n=Cr(e)?Ar(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function mU(e){let t=ha(e);for(;Yr(t)&&!ws(t);){if(Dy(t))return t;if(Bf(t))return null;t=ha(t)}return null}function Ly(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ws(e){return["html","body","#document"].includes(xs(e))}function Ar(e){return $n(e).getComputedStyle(e)}function jf(e){return Cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ha(e){if(xs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||UC(e)&&e.host||Wr(e);return UC(t)?t.host:t}function HC(e){const t=ha(e);return ws(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yr(t)&&xl(t)?t:HC(t)}function wl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=HC(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=$n(i);if(a){const s=My(o);return t.concat(o,o.visualViewport||[],xl(i)?i:[],s&&n?wl(s):[])}return t.concat(i,wl(i,[],n))}function My(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zC(e){const t=Ar(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Yr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Of(n)!==a||Of(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Fy(e){return Cr(e)?e:e.contextElement}function bs(e){const t=Fy(e);if(!Yr(t))return fa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=zC(t);let o=(a?Of(n.width):n.width)/r,s=(a?Of(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const gU=fa(0);function VC(e){const t=$n(e);return!Ly()||!t.visualViewport?gU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function ro(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Fy(e);let o=fa(1);t&&(r?Cr(r)&&(o=bs(r)):o=bs(e));const s=yU(a,n,r)?VC(a):fa(0);let u=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,c=i.width/o.x,d=i.height/o.y;if(a){const f=$n(a),p=r&&Cr(r)?$n(r):r;let m=f,y=My(m);for(;y&&r&&p!==m;){const w=bs(y),g=y.getBoundingClientRect(),x=Ar(y),b=g.left+(y.clientLeft+parseFloat(x.paddingLeft))*w.x,T=g.top+(y.clientTop+parseFloat(x.paddingTop))*w.y;u*=w.x,l*=w.y,c*=w.x,d*=w.y,u+=b,l+=T,m=$n(y),y=My(m)}}return Mf({width:c,height:d,x:u,y:l})}function vU(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=Wr(r),s=t?Bf(t.floating):!1;if(r===o||s&&a)return n;let u={scrollLeft:0,scrollTop:0},l=fa(1);const c=fa(0),d=Yr(r);if((d||!d&&!a)&&((xs(r)!=="body"||xl(o))&&(u=jf(r)),Yr(r))){const f=ro(r);l=bs(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function xU(e){return Array.from(e.getClientRects())}function By(e,t){const n=jf(e).scrollLeft;return t?t.left+n:ro(Wr(e)).left+n}function wU(e){const t=Wr(e),n=jf(e),r=e.ownerDocument.body,i=Vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+By(e);const s=-n.scrollTop;return Ar(r).direction==="rtl"&&(o+=Vn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function bU(e,t){const n=$n(e),r=Wr(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;const l=Ly();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:s,y:u}}function EU(e,t){const n=ro(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Yr(e)?bs(e):fa(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,u=i*a.x,l=r*a.y;return{width:o,height:s,x:u,y:l}}function $C(e,t,n){let r;if(t==="viewport")r=bU(e,n);else if(t==="document")r=wU(Wr(e));else if(Cr(t))r=EU(t,n);else{const i=VC(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Mf(r)}function WC(e,t){const n=ha(e);return n===t||!Cr(n)||ws(n)?!1:Ar(n).position==="fixed"||WC(n,t)}function TU(e,t){const n=t.get(e);if(n)return n;let r=wl(e,[],!1).filter(s=>Cr(s)&&xs(s)!=="body"),i=null;const a=Ar(e).position==="fixed";let o=a?ha(e):e;for(;Cr(o)&&!ws(o);){const s=Ar(o),u=Dy(o);!u&&s.position==="fixed"&&(i=null),(a?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||xl(o)&&!u&&WC(e,o))?r=r.filter(c=>c!==o):i=s,o=ha(o)}return t.set(e,r),r}function _U(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Bf(t)?[]:TU(t,this._c):[].concat(n),r],s=o[0],u=o.reduce((l,c)=>{const d=$C(t,c,i);return l.top=Vn(d.top,l.top),l.right=da(d.right,l.right),l.bottom=da(d.bottom,l.bottom),l.left=Vn(d.left,l.left),l},$C(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function SU(e){const{width:t,height:n}=zC(e);return{width:t,height:n}}function CU(e,t,n){const r=Yr(t),i=Wr(t),a=n==="fixed",o=ro(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const u=fa(0);if(r||!r&&!a)if((xs(t)!=="body"||xl(i))&&(s=jf(t)),r){const p=ro(t,!0,a,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else i&&(u.x=By(i));let l=0,c=0;if(i&&!r&&!a){const p=i.getBoundingClientRect();c=p.top+s.scrollTop,l=p.left+s.scrollLeft-By(i,p)}const d=o.left+s.scrollLeft-u.x-l,f=o.top+s.scrollTop-u.y-c;return{x:d,y:f,width:o.width,height:o.height}}function jy(e){return Ar(e).position==="static"}function YC(e,t){if(!Yr(e)||Ar(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wr(e)===n&&(n=n.ownerDocument.body),n}function qC(e,t){const n=$n(e);if(Bf(e))return n;if(!Yr(e)){let i=ha(e);for(;i&&!ws(i);){if(Cr(i)&&!jy(i))return i;i=ha(i)}return n}let r=YC(e,t);for(;r&&hU(r)&&jy(r);)r=YC(r,t);return r&&ws(r)&&jy(r)&&!Dy(r)?n:r||mU(e)||n}const AU=async function(e){const t=this.getOffsetParent||qC,n=this.getDimensions,r=await n(e.floating);return{reference:CU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kU(e){return Ar(e).direction==="rtl"}const RU={convertOffsetParentRelativeRectToViewportRelativeRect:vU,getDocumentElement:Wr,getClippingRect:_U,getOffsetParent:qC,getElementRects:AU,getClientRects:xU,getDimensions:SU,getScale:bs,isElement:Cr,isRTL:kU};function NU(e,t){let n=null,r;const i=Wr(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),a();const{left:l,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p=Df(c),m=Df(i.clientWidth-(l+d)),y=Df(i.clientHeight-(c+f)),w=Df(l),x={rootMargin:-p+"px "+-m+"px "+-y+"px "+-w+"px",threshold:Vn(0,da(1,u))||1};let b=!0;function T(S){const _=S[0].intersectionRatio;if(_!==u){if(!b)return o();_?o(!1,_):r=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(T,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,x)}n.observe(e)}return o(!0),a}function GC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Fy(e),c=i||a?[...l?wl(l):[],...wl(t)]:[];c.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),a&&g.addEventListener("resize",n)});const d=l&&s?NU(l,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(g=>{let[x]=g;x&&x.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let m,y=u?ro(e):null;u&&w();function w(){const g=ro(e);y&&(g.x!==y.x||g.y!==y.y||g.width!==y.width||g.height!==y.height)&&n(),y=g,m=requestAnimationFrame(w)}return n(),()=>{var g;c.forEach(x=>{i&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),d==null||d(),(g=p)==null||g.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const PU=cU,IU=dU,OU=sU,DU=pU,LU=uU,KC=oU,MU=fU,FU=(e,t,n)=>{const r=new Map,i={platform:RU,...n},a={...i.platform,_c:r};return aU(e,t,{...i,platform:a})};var Uf=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Hf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Hf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Hf(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function XC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function QC(e,t){const n=XC(e);return Math.round(t*n)/n}function Uy(e){const t=v.useRef(e);return Uf(()=>{t.current=e}),t}function ZC(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);Hf(f,r)||p(r);const[m,y]=v.useState(null),[w,g]=v.useState(null),x=v.useCallback(F=>{F!==_.current&&(_.current=F,y(F))},[]),b=v.useCallback(F=>{F!==N.current&&(N.current=F,g(F))},[]),T=a||m,S=o||w,_=v.useRef(null),N=v.useRef(null),D=v.useRef(c),V=u!=null,P=Uy(u),$=Uy(i),H=Uy(l),X=v.useCallback(()=>{if(!_.current||!N.current)return;const F={placement:t,strategy:n,middleware:f};$.current&&(F.platform=$.current),FU(_.current,N.current,F).then(B=>{const A={...B,isPositioned:H.current!==!1};Y.current&&!Hf(D.current,A)&&(D.current=A,Qo.flushSync(()=>{d(A)}))})},[f,t,n,$,H]);Uf(()=>{l===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[l]);const Y=v.useRef(!1);Uf(()=>(Y.current=!0,()=>{Y.current=!1}),[]),Uf(()=>{if(T&&(_.current=T),S&&(N.current=S),T&&S){if(P.current)return P.current(T,S,X);X()}},[T,S,X,P,V]);const re=v.useMemo(()=>({reference:_,floating:N,setReference:x,setFloating:b}),[x,b]),ie=v.useMemo(()=>({reference:T,floating:S}),[T,S]),ee=v.useMemo(()=>{const F={position:n,left:0,top:0};if(!ie.floating)return F;const B=QC(ie.floating,c.x),A=QC(ie.floating,c.y);return s?{...F,transform:"translate("+B+"px, "+A+"px)",...XC(ie.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:A}},[n,s,ie.floating,c.x,c.y]);return v.useMemo(()=>({...c,update:X,refs:re,elements:ie,floatingStyles:ee}),[c,X,re,ie,ee])}const BU=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?KC({element:r.current,padding:i}).fn(n):{}:r?KC({element:r,padding:i}).fn(n):{}}}},JC=(e,t)=>({...PU(e),options:[e,t]}),eA=(e,t)=>({...IU(e),options:[e,t]}),tA=(e,t)=>({...MU(e),options:[e,t]}),nA=(e,t)=>({...OU(e),options:[e,t]}),rA=(e,t)=>({...DU(e),options:[e,t]}),iA=(e,t)=>({...LU(e),options:[e,t]}),aA=(e,t)=>({...BU(e),options:[e,t]});var jU="Arrow",oA=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return E.jsx(zn.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});oA.displayName=jU;var UU=oA;function HU(e,t=[]){let n=[];function r(a,o){const s=v.createContext(o),u=n.length;n=[...n,o];function l(d){const{scope:f,children:p,...m}=d,y=(f==null?void 0:f[e][u])||s,w=v.useMemo(()=>m,Object.values(m));return E.jsx(y.Provider,{value:w,children:p})}function c(d,f){const p=(f==null?void 0:f[e][u])||s,m=v.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return l.displayName=a+"Provider",[l,c]}const i=()=>{const a=n.map(o=>v.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,zU(i,...t)]}function zU(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const d=u(a)[`__scope${l}`];return{...s,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function sA(e){const[t,n]=v.useState(void 0);return or(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,s;if("borderBoxSize"in a){const u=a.borderBoxSize,l=Array.isArray(u)?u[0]:u;o=l.inlineSize,s=l.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Hy="Popper",[uA,zf]=HU(Hy),[VU,lA]=uA(Hy),cA=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return E.jsx(VU,{scope:t,anchor:r,onAnchorChange:i,children:n})};cA.displayName=Hy;var dA="PopperAnchor",fA=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=lA(dA,n),o=v.useRef(null),s=$r(t,o);return v.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:E.jsx(zn.div,{...i,ref:s})});fA.displayName=dA;var zy="PopperContent",[$U,WU]=uA(zy),pA=v.forwardRef((e,t)=>{var $e,Ve,We,Ge,St,Te;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...y}=e,w=lA(zy,n),[g,x]=v.useState(null),b=$r(t,be=>x(be)),[T,S]=v.useState(null),_=sA(T),N=(_==null?void 0:_.width)??0,D=(_==null?void 0:_.height)??0,V=r+(a!=="center"?"-"+a:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},$=Array.isArray(l)?l:[l],H=$.length>0,X={padding:P,boundary:$.filter(qU),altBoundary:H},{refs:Y,floatingStyles:re,placement:ie,isPositioned:ee,middlewareData:F}=ZC({strategy:"fixed",placement:V,whileElementsMounted:(...be)=>GC(...be,{animationFrame:p==="always"}),elements:{reference:w.anchor},middleware:[JC({mainAxis:i+D,alignmentAxis:o}),u&&eA({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?tA():void 0,...X}),u&&nA({...X}),rA({...X,apply:({elements:be,rects:Ye,availableWidth:He,availableHeight:xt})=>{const{width:wt,height:Ke}=Ye.reference,Me=be.floating.style;Me.setProperty("--radix-popper-available-width",`${He}px`),Me.setProperty("--radix-popper-available-height",`${xt}px`),Me.setProperty("--radix-popper-anchor-width",`${wt}px`),Me.setProperty("--radix-popper-anchor-height",`${Ke}px`)}}),T&&aA({element:T,padding:s}),GU({arrowWidth:N,arrowHeight:D}),f&&iA({strategy:"referenceHidden",...X})]}),[B,A]=gA(ie),ae=Yt(m);or(()=>{ee&&(ae==null||ae())},[ee,ae]);const he=($e=F.arrow)==null?void 0:$e.x,O=(Ve=F.arrow)==null?void 0:Ve.y,Pe=((We=F.arrow)==null?void 0:We.centerOffset)!==0,[ge,xe]=v.useState();return or(()=>{g&&xe(window.getComputedStyle(g).zIndex)},[g]),E.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:ee?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(Ge=F.transformOrigin)==null?void 0:Ge.x,(St=F.transformOrigin)==null?void 0:St.y].join(" "),...((Te=F.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx($U,{scope:n,placedSide:B,onArrowChange:S,arrowX:he,arrowY:O,shouldHideArrow:Pe,children:E.jsx(zn.div,{"data-side":B,"data-align":A,...y,ref:b,style:{...y.style,animation:ee?void 0:"none"}})})})});pA.displayName=zy;var hA="PopperArrow",YU={top:"bottom",right:"left",bottom:"top",left:"right"},mA=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=WU(hA,r),o=YU[a.placedSide];return E.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:E.jsx(UU,{...i,ref:n,style:{...i.style,display:"block"}})})});mA.displayName=hA;function qU(e){return e!==null}var GU=e=>({name:"transformOrigin",options:e,fn(t){var w,g,x;const{placement:n,rects:r,middlewareData:i}=t,o=((w=i.arrow)==null?void 0:w.centerOffset)!==0,s=o?0:e.arrowWidth,u=o?0:e.arrowHeight,[l,c]=gA(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((g=i.arrow)==null?void 0:g.x)??0)+s/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+u/2;let m="",y="";return l==="bottom"?(m=o?d:`${f}px`,y=`${-u}px`):l==="top"?(m=o?d:`${f}px`,y=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,y=o?d:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,y=o?d:`${p}px`),{data:{x:m,y}}}});function gA(e){const[t,n="center"]=e.split("-");return[t,n]}var yA=cA,Vy=fA,vA=pA,xA=mA;function KU(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var $y=e=>{const{present:t,children:n}=e,r=XU(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),a=$r(r.ref,QU(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:a}):null};$y.displayName="Presence";function XU(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),a=v.useRef("none"),o=e?"mounted":"unmounted",[s,u]=KU(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=Vf(r.current);a.current=s==="mounted"?l:"none"},[s]),or(()=>{const l=r.current,c=i.current;if(c!==e){const f=a.current,p=Vf(l);e?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),or(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=p=>{const y=Vf(r.current).includes(p.animationName);if(p.target===t&&y&&(u("ANIMATION_END"),!i.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},f=p=>{p.target===t&&(a.current=Vf(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Vf(e){return(e==null?void 0:e.animationName)||"none"}function QU(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function $f({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=ZU({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=Yt(n),u=v.useCallback(l=>{if(a){const d=typeof l=="function"?l(e):l;d!==e&&s(d)}else i(l)},[a,e,i,s]);return[o,u]}function ZU({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,i=v.useRef(r),a=Yt(t);return v.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var JU="VisuallyHidden",wA=v.forwardRef((e,t)=>E.jsx(zn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));wA.displayName=JU;var eH=wA,[Wf,Mre]=ca("Tooltip",[zf]),Yf=zf(),bA="TooltipProvider",tH=700,Wy="tooltip.open",[nH,Yy]=Wf(bA),EA=e=>{const{__scopeTooltip:t,delayDuration:n=tH,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,[o,s]=v.useState(!0),u=v.useRef(!1),l=v.useRef(0);return v.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),E.jsx(nH,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(l.current),s(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:v.useCallback(c=>{u.current=c},[]),disableHoverableContent:i,children:a})};EA.displayName=bA;var qf="Tooltip",[rH,Gf]=Wf(qf),TA=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,u=Yy(qf,e.__scopeTooltip),l=Yf(t),[c,d]=v.useState(null),f=yl(),p=v.useRef(0),m=o??u.disableHoverableContent,y=s??u.delayDuration,w=v.useRef(!1),[g=!1,x]=$f({prop:r,defaultProp:i,onChange:N=>{N?(u.onOpen(),document.dispatchEvent(new CustomEvent(Wy))):u.onClose(),a==null||a(N)}}),b=v.useMemo(()=>g?w.current?"delayed-open":"instant-open":"closed",[g]),T=v.useCallback(()=>{window.clearTimeout(p.current),w.current=!1,x(!0)},[x]),S=v.useCallback(()=>{window.clearTimeout(p.current),x(!1)},[x]),_=v.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{w.current=!0,x(!0)},y)},[y,x]);return v.useEffect(()=>()=>window.clearTimeout(p.current),[]),E.jsx(yA,{...l,children:E.jsx(rH,{scope:t,contentId:f,open:g,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:v.useCallback(()=>{u.isOpenDelayed?_():T()},[u.isOpenDelayed,_,T]),onTriggerLeave:v.useCallback(()=>{m?S():window.clearTimeout(p.current)},[S,m]),onOpen:T,onClose:S,disableHoverableContent:m,children:n})})};TA.displayName=qf;var qy="TooltipTrigger",_A=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Gf(qy,n),a=Yy(qy,n),o=Yf(n),s=v.useRef(null),u=$r(t,s,i.onTriggerChange),l=v.useRef(!1),c=v.useRef(!1),d=v.useCallback(()=>l.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),E.jsx(Vy,{asChild:!0,...o,children:E.jsx(zn.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Sn(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Sn(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Sn(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Sn(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Sn(e.onBlur,i.onClose),onClick:Sn(e.onClick,i.onClose)})})});_A.displayName=qy;var iH="TooltipPortal",[Fre,aH]=Wf(iH,{forceMount:void 0}),Es="TooltipContent",SA=v.forwardRef((e,t)=>{const n=aH(Es,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=Gf(Es,e.__scopeTooltip);return E.jsx($y,{present:r||o.open,children:o.disableHoverableContent?E.jsx(CA,{side:i,...a,ref:t}):E.jsx(oH,{side:i,...a,ref:t})})}),oH=v.forwardRef((e,t)=>{const n=Gf(Es,e.__scopeTooltip),r=Yy(Es,e.__scopeTooltip),i=v.useRef(null),a=$r(t,i),[o,s]=v.useState(null),{trigger:u,onClose:l}=n,c=i.current,{onPointerInTransitChange:d}=r,f=v.useCallback(()=>{s(null),d(!1)},[d]),p=v.useCallback((m,y)=>{const w=m.currentTarget,g={x:m.clientX,y:m.clientY},x=cH(g,w.getBoundingClientRect()),b=dH(g,x),T=fH(y.getBoundingClientRect()),S=hH([...b,...T]);s(S),d(!0)},[d]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(u&&c){const m=w=>p(w,c),y=w=>p(w,u);return u.addEventListener("pointerleave",m),c.addEventListener("pointerleave",y),()=>{u.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",y)}}},[u,c,p,f]),v.useEffect(()=>{if(o){const m=y=>{const w=y.target,g={x:y.clientX,y:y.clientY},x=(u==null?void 0:u.contains(w))||(c==null?void 0:c.contains(w)),b=!pH(g,o);x?f():b&&(f(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[u,c,o,l,f]),E.jsx(CA,{...e,ref:a})}),[sH,uH]=Wf(qf,{isInside:!1}),CA=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,u=Gf(Es,n),l=Yf(n),{onClose:c}=u;return v.useEffect(()=>(document.addEventListener(Wy,c),()=>document.removeEventListener(Wy,c)),[c]),v.useEffect(()=>{if(u.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(u.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[u.trigger,c]),E.jsx(ky,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:E.jsxs(vA,{"data-state":u.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[E.jsx(RC,{children:r}),E.jsx(sH,{scope:n,isInside:!0,children:E.jsx(eH,{id:u.contentId,role:"tooltip",children:i||r})})]})})});SA.displayName=Es;var AA="TooltipArrow",lH=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Yf(n);return uH(AA,n).isInside?null:E.jsx(xA,{...i,...r,ref:t})});lH.displayName=AA;function cH(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function dH(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function fH(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function pH(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a].x,u=t[a].y,l=t[o].x,c=t[o].y;u>r!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function hH(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),mH(t)}function mH(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var gH=EA,yH=TA,vH=_A,kA=SA;const xH=gH,wH=yH,bH=vH,RA=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>E.jsx(kA,{ref:r,sideOffset:t,className:Le("z-50 overflow-hidden max-w-xs rounded-xl bg-primary border text-primary-foreground p-2 text-center align-middle text-xs shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));RA.displayName=kA.displayName;function Kf({children:e,content:t,side:n,align:r}){return t?E.jsxs(wH,{children:[E.jsx(bH,{asChild:!0,children:e}),E.jsx(RA,{side:n,align:r,collisionPadding:8,avoidCollisions:!0,children:t})]}):e}const NA={en:{ok:"OK",yes:"Yes",no:"No",agree:"Agree",cancel:"Cancel","yes-exit":"Yes, exit","yes-reset":"Yes, reset","no-cancel":"No, cancel","are-you-sure":"Are you sure?",recording:"Recording...","thank-you":"Thank you","sorry-try-again":"Sorry, please try again","error-occurred":"An error occurred","please-try-again":"Please try again","write-a-message":"Write a message...","send-message":"Send message",connected:"Connected",connecting:"Connecting",reconnecting:"Reconnecting",reconnected:"Reconnected",disconnecting:"Disconnecting",disconnected:"Disconnected",error:"Error","persist-session":"Persist session",settings:"Settings",close:"Close",help:"Help",chat:"Chat",send:"Send",copy:"Copy",copied:"Copied","sound-effects":"Sound effects",language:"Language",select:"Select",agent:"Agent",user:"User",bot:"Bot","close-widget":"Close widget","got-any-questions":"Got any questions? Chat with us!","typical-response-time":"Typically respond in less than 1 minute","session-closed-lead":"Your issue has been resolved!","create-new-ticket":"Create new ticket",exit:"Exit","reset-conversation":"Reset conversation","new-conversation":"New conversation","welcome-title":"Welcome to our support chat","welcome-description":"We're here to help! Start a conversation and we'll get back to you as soon as possible.","your-name":"Your name","your-email":"Your email address","start-chat":"Talk to support","starting-chat":"Connecting...","hello-greeting":"Hi there!","i-need-more-help":"I need more help","this-was-helpful":"This was helpful"},ar:{ok:"حسنا",yes:"نعم",no:"لا",agree:"موافق",cancel:"إلغاء","yes-exit":"نعم، اخرج","yes-reset":"نعم، إعادة تعيين","no-cancel":"لا، إلغاء","are-you-sure":"هل أنت متأكد؟",recording:"تسجيل","thank-you":"شكرا","sorry-try-again":"عذرا، حاول مرة أخرى","error-occurred":"حدث خطأ","please-try-again":"يرجى المحاولة مرة أخرى","write-a-message":"اكتب رسالة...","send-message":"إرسال رسالة",connected:"متصل",connecting:"جاري الاتصال",reconnecting:"جاري إعادة الاتصال",reconnected:"تم إعادة الاتصال",disconnecting:"جاري قطع الاتصال",disconnected:"قطع الاتصال",error:"خطأ","persist-session":"حفظ الجلسة",settings:"إعدادات",close:"إغلاق",help:"مساعدة",chat:"محادثة",send:"إرسال",copy:"نسخ",copied:"تم النسخ","sound-effects":"التاثيرات الصوتية",language:"اللغة",select:"اختر",agent:"الوكيل",user:"المستخدم",bot:"البوت","close-widget":"إغلاق الودجة","got-any-questions":"هل لديك أي أسئلة؟ تحدث معنا!","typical-response-time":"عادة ما نرد في أقل من دقيقة واحدة","session-closed-lead":"تم حل مشكلتك!",exit:"خروج","create-new-ticket":"إنشاء تذكرة جديدة","reset-conversation":"إعادة تعيين المحادثة","new-conversation":"محادثة جديدة","welcome-title":"مرحبًا بك في دردشة الدعم الخاصة بنا","welcome-description":"نحن هنا للمساعدة! ابدأ محادثة وسنرد عليك في أقرب وقت ممكن.","your-name":"اسمك","your-email":"عنوان بريدك الإلكتروني","start-chat":"تحدث إلى الدعم","starting-chat":"جاري الاتصال...","hello-greeting":"مرحبًا! كيف يمكننا مساعدتك اليوم؟","i-need-more-help":"أحتاج المزيد من المساعدة","this-was-helpful":"كان هذا مفيدًا"},nl:{ok:"OK",yes:"Ja",no:"Nee",agree:"Akkoord",cancel:"Annuleren","yes-exit":"Ja, afsluiten","yes-reset":"Ja, resetten","no-cancel":"Nee, annuleren","are-you-sure":"Weet u het zeker?",recording:"Opname...","thank-you":"Dank u","sorry-try-again":"Sorry, probeer het opnieuw","error-occurred":"Er is een fout opgetreden","please-try-again":"Probeer het opnieuw","write-a-message":"Schrijf een bericht...","send-message":"Bericht verzenden",connected:"Verbonden",connecting:"Verbinding maken",reconnecting:"Opnieuw verbinding maken",reconnected:"Opnieuw verbonden",disconnecting:"Verbinding verbreken",disconnected:"Verbinding verbroken",error:"Fout","persist-session":"Sessie behouden",settings:"Instellingen",close:"Sluiten",help:"Help",chat:"Chat",send:"Verzenden",copy:"Kopiëren",copied:"Gekopieerd","sound-effects":"Geluidseffecten",language:"Taal",select:"Selecteren",agent:"Agent",user:"Gebruiker",bot:"Bot","close-widget":"Widget sluiten","got-any-questions":"Heeft u vragen? Chat met ons!","typical-response-time":"We reageren doorgaans binnen 1 minuut","session-closed-lead":"Uw probleem is opgelost!","create-new-ticket":"Nieuw ticket aanmaken",exit:"Afsluiten","reset-conversation":"Gesprek resetten","new-conversation":"Nieuw gesprek","welcome-title":"Welkom bij onze supportchat","welcome-description":"We zijn hier om te helpen! Begin een gesprek en we nemen zo snel mogelijk contact met u op.","your-name":"Uw naam","your-email":"Uw e-mailadres","start-chat":"Praat met ondersteuning","starting-chat":"Verbinding maken...","hello-greeting":"Hallo! Hoe kunnen we u vandaag helpen?","i-need-more-help":"Ik heb nog meer help nodig","this-was-helpful":"Dit was handig"},fr:{ok:"D'accord",yes:"Oui",no:"Non",agree:"Accepter",cancel:"Annuler","yes-exit":"Oui, quitter","yes-reset":"Oui, réinitialiser","no-cancel":"Non, annuler","are-you-sure":"Êtes-vous sûr ?",recording:"Enregistrement...","thank-you":"Merci","sorry-try-again":"Désolé, veuillez réessayer","error-occurred":"Une erreur s'est produite","please-try-again":"Veuillez réessayer","write-a-message":"Écrivez un message...","send-message":"Envoyer le message",connected:"Connecté",connecting:"Connexion en cours",reconnecting:"Reconnexion en cours",reconnected:"Reconnecté",disconnecting:"Déconnexion en cours",disconnected:"Déconnecté",error:"Erreur","persist-session":"Conserver la session",settings:"Paramètres",close:"Fermer",help:"Aide",chat:"Chat",send:"Envoyer",copy:"Copier",copied:"Copié","sound-effects":"Effets sonores",language:"Langue",select:"Sélectionner",agent:"Agent",user:"Utilisateur",bot:"Bot","close-widget":"Fermer le widget","got-any-questions":"Vous avez des questions ? Chattez avec nous !","typical-response-time":"Nous répondons généralement en moins d'une minute","session-closed-lead":"Votre problème a été résolu !","create-new-ticket":"Créer un nouveau ticket",exit:"Sortie","reset-conversation":"Réinitialiser la conversation","new-conversation":"Nouvelle conversation","welcome-title":"Bienvenue dans notre chat de support","welcome-description":"Nous sommes là pour vous aider ! Commencez une conversation et nous vous répondrons dès que possible.","your-name":"Votre nom","your-email":"Votre adresse e-mail","start-chat":"Parler au support","starting-chat":"Connexion...","hello-greeting":"Bonjour ! Comment pouvons-nous vous aider aujourd'hui ?","i-need-more-help":"Je besoin d'aide plus","this-was-helpful":"C'était utile"},de:{ok:"OK",yes:"Ja",no:"Nein",agree:"Zustimmen",cancel:"Stornieren","yes-exit":"Ja, beenden","yes-reset":"Ja, zurücksetzen","no-cancel":"Nein, abbrechen","are-you-sure":"Sind Sie sicher?",recording:"Aufnahme läuft","thank-you":"Vielen Dank","sorry-try-again":"Entschuldigung, bitte versuchen Sie es erneut","error-occurred":"Ein Fehler ist aufgetreten","please-try-again":"Bitte versuchen Sie es erneut","write-a-message":"Nachricht schreiben...","send-message":"Nachricht senden",connected:"Verbunden",connecting:"Verbindung wird hergestellt",reconnecting:"Verbindung wird wiederhergestellt",reconnected:"Wieder verbunden",disconnecting:"Verbindung wird getrennt",disconnected:"Verbindung getrennt",error:"Fehler","persist-session":"Sitzung beibehalten",settings:"Einstellungen",close:"Schließen",help:"Hilfe",chat:"Chat",send:"Senden",copy:"Kopieren",copied:"Kopiert","sound-effects":"Soundeffekte",language:"Sprache",select:"Auswählen",agent:"Agent",user:"Benutzer",bot:"Bot","got-any-questions":"Haben Sie Fragen? Chatten Sie mit uns!","typical-response-time":"Üblicherweise antworten wir in weniger als 1 Minute","close-widget":"Widget schließen","session-closed-lead":"Ihr Problem wurde gelöst!","create-new-ticket":"Neues Ticket erstellen",exit:"Beenden","reset-conversation":"Konversation zurücksetzen","new-conversation":"Neue Konversation","welcome-title":"Willkommen in unserem Support-Chat","welcome-description":"Wir sind hier, um zu helfen! Beginnen Sie ein Gesprách und wir werden so schnell wie mogelijk antworten.","your-name":"Ihr Name","your-email":"Ihre E-Mail-Adresse","start-chat":"Mit dem Support sprechen","starting-chat":"Verbindung wird hergestellt...","hello-greeting":"Hallo! Wie können wir Ihnen heute helfen?","i-need-more-help":"Ich brauche weitere Hilfe","this-was-helpful":"Dies war hilfreich"},pt:{ok:"OK",yes:"Sim",no:"Não",agree:"Concordo",cancel:"Cancelar","yes-exit":"Sim, sair","yes-reset":"Sim, redefinir","no-cancel":"Não, cancelar","are-you-sure":"Você tem certeza?",recording:"Gravando...","thank-you":"Obrigado","sorry-try-again":"Desculpe, tente novamente","error-occurred":"Ocorreu um erro","please-try-again":"Por favor, tente novamente","write-a-message":"Escreva uma mensagem...","send-message":"Enviar mensagem",connected:"Conectado",connecting:"Conectando",reconnecting:"Reconectando",reconnected:"Reconectado",disconnecting:"Desconectando",disconnected:"Desconectado",error:"Erro","persist-session":"Persistir sessão",settings:"Configurações",close:"Fechar",help:"Ajuda",chat:"Bate-papo",send:"Enviar",copy:"Copiar",copied:"Copiado","sound-effects":"Efeitos sonoros",language:"Idioma",select:"Selecionar",agent:"Agente",user:"Usuário",bot:"Bot","close-widget":"Fechar widget","got-any-questions":"Tem alguma dúvida? Converse conosco!","typical-response-time":"Geralmente respondemos em menos de 1 minuto","session-closed-lead":"Seu problema foi resolvido!","create-new-ticket":"Criar novo ticket",exit:"Sair","reset-conversation":"Redefinir conversa","new-conversation":"Nova conversa","welcome-title":"Bem-vindo ao nosso chat de suporte","welcome-description":"Estamos aqui para ajudar! Inicie uma conversa e responderemos o mais rápido possível.","your-name":"Seu nome","your-email":"Seu endereço de email","start-chat":"Falar com o suporte","starting-chat":"Conectando...","hello-greeting":"Olá! Como podemos ajudar você hoje?","i-need-more-help":"preciso de mais ajuda","this-was-helpful":"Isso foi útil"}},EH=Object.keys(NA),TH=e=>EH.includes(e);function _H(e,t){const n=NA[t];return n&&n[e]||""}function Ts(){const{widgetCtx:{config:e}}=ar();return v.useMemo(()=>{const n=TH(e.language)?e.language:"en";return{get:r=>_H(r,n),lang:n}},[e.language])}const SH=10,CH={right:(e,t)=>({initial:{opacity:0,x:-e,...t.initial},animate:{opacity:1,x:0,...t.animate},exit:{opacity:0,x:e,...t.exit}}),left:(e,t)=>({initial:{opacity:0,x:e,...t.initial},animate:{opacity:1,x:0,...t.animate},exit:{opacity:0,x:-e,...t.exit}}),up:(e,t)=>({initial:{opacity:0,y:e,...t.initial},animate:{opacity:1,y:0,...t.animate},exit:{opacity:0,y:-e,...t.exit}}),down:(e,t)=>({initial:{opacity:0,y:-e,...t.initial},animate:{opacity:1,y:0,...t.animate},exit:{opacity:0,y:e,...t.exit}})},vt=v.forwardRef(({fadeIn:e="down",distance:t=SH,children:n,snapExit:r=!1,overrides:i={},...a},o)=>{const s=e?CH[e](t,i):{};return r&&s.exit&&typeof s.exit=="object"&&!Array.isArray(s.exit)&&(s.exit.transition={duration:0}),E.jsx(ss.div,{ref:o,...a,...s,children:n})});vt.displayName="MotionDiv";function PA(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=PA(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function AH(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=PA(e))&&(r&&(r+=" "),r+=t);return r}const IA=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,OA=AH,kH=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return OA(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(l=>{const c=n==null?void 0:n[l],d=a==null?void 0:a[l];if(c===null)return null;const f=IA(c)||IA(d);return i[l][f]}),s=n&&Object.entries(n).reduce((l,c)=>{let[d,f]=c;return f===void 0||(l[d]=f),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:d,className:f,...p}=c;return Object.entries(p).every(m=>{let[y,w]=m;return Array.isArray(w)?w.includes({...a,...s}[y]):{...a,...s}[y]===w})?[...l,d,f]:l},[]);return OA(e,o,u,n==null?void 0:n.class,n==null?void 0:n.className)},DA={x:2,y:2},RH={1:"scale-[1]","1.01":"scale-[1.01]","1.02":"scale-[1.02]","1.1":"scale-[1.1]"},Xf=v.memo(v.forwardRef(({children:e,className:t,scale:n="1.02",off:r=!1},i)=>{const[a,o]=v.useState(!1),[s,u]=v.useState({x:0,y:0});if(r||/translate/.test(e.props.className||""))return e;const c=m=>{var D,V;const{clientX:y,clientY:w}=m,g=m.currentTarget.getBoundingClientRect(),x=y-(g.left+g.width/2),b=w-(g.top+g.height/2),T=Math.max(-1,Math.min(1,x/(g.width/2))),S=Math.max(-1,Math.min(1,b/(g.height/2))),_=T*DA.x,N=S*DA.y;u({x:_,y:N}),(V=(D=e.props).onMouseMove)==null||V.call(D,m)},d=()=>{var m,y;o(!0),(y=(m=e.props).onMouseEnter)==null||y.call(m)},f=()=>{var m,y;o(!1),u({x:0,y:0}),(y=(m=e.props).onMouseLeave)==null||y.call(m)},p={"--opencx-wobble-x":a?`${s.x}px`:"0px","--opencx-wobble-y":a?`${s.y}px`:"0px"};return v.cloneElement(e,{ref:i,onMouseMove:c,onMouseEnter:d,onMouseLeave:f,style:{...p,...e.props.style},className:Le("translate-x-[var(--opencx-wobble-x)]","translate-y-[var(--opencx-wobble-y)]",`hover:${RH[n]}`,t,e.props.className,"transition-all ease-out")})}));Xf.displayName="Wobble";const NH=kH(Le("inline-flex shrink-0 items-center justify-center gap-2","text-sm font-medium whitespace-nowrap","ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","shadow-sm active:shadow-none active:scale-95 hover:active:scale-95","rounded-xl","border","transition"),{variants:{variant:{default:"border-primary bg-primary text-primary-foreground",destructive:"border-destructive bg-destructive text-destructive-foreground",outline:"bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground",ghost:"border-transparent shadow-none hover:bg-accent hover:text-accent-foreground",link:"border-transparent shadow-none text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-xs",lg:"min-h-12 px-4",icon:"h-10 w-10",fit:"size-fit p-2",free:"p-2"}},defaultVariants:{variant:"default",size:"default"}}),sr=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?If:"button";return E.jsx(Xf,{ref:a,children:E.jsx(o,{className:Le(NH({variant:t,size:n,className:e})),...i})})});sr.displayName="Button";const Qf=()=>{const[e,t]=v.useState("ltr");return v.useEffect(()=>{const n=()=>{typeof document>"u"||t(window.getComputedStyle(document.body).direction)};n();const r=new MutationObserver(n);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),r.observe(document.body,{attributes:!0,attributeFilter:["dir"]}),window.addEventListener("languagechange",n),()=>{r.disconnect(),window.removeEventListener("languagechange",n)}},[]),e};function PH(){const{sendMessage:e}=gs(),t=Ts(),n=[t.get("i-need-more-help"),t.get("this-was-helpful")],r=i=>{const a=i.trim();a&&e({content:a})};return E.jsx("div",{className:"flex items-center gap-2 p-2 pb-0 flex-wrap",children:n.map((i,a)=>E.jsx(sr,{onClick:()=>r(i),className:"flex-1 rounded-full",size:"sm",children:i},a))})}function IH({file:{status:e,file:t,error:n},onCancel:r}){const[i,a]=v.useState(null);v.useEffect(()=>{if(!t.type.startsWith("image/"))return;const u=new FileReader;return u.onload=()=>a(u.result),u.onerror=()=>console.error("Error reading file"),u.readAsDataURL(t),()=>u.abort()},[t]);const o=()=>{switch(e){case"uploading":return E.jsx(lF,{className:"size-4 animate-spin"});case"error":return E.jsx(rF,{className:"size-4 text-destructive"});default:return null}},s=()=>{const u=t.type.split("/")[0];return u==="image"&&i?E.jsx("img",{src:typeof i=="string"?i:"",className:"object-cover bg-secondary size-full",alt:t.name}):u==="audio"?E.jsx(sF,{}):E.jsx(uF,{})};return E.jsx(Kf,{side:"bottom",content:e==="error"?E.jsxs("span",{className:"text-destructive",children:["Failed to upload: ",n]}):t.name,children:E.jsxs("div",{className:Le(e==="uploading"&&"opacity-50","group","size-12 border rounded-2xl overflow-hidden relative","flex items-center justify-center shrink-0"),children:[E.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:o()}),E.jsx("button",{className:Le("absolute bg-black/50 inset-0 size-full z-10 opacity-0","flex items-center justify-center","opacity-0 group-hover:opacity-100 transition"),onClick:r,children:E.jsx(b_,{className:"size-4 text-primary-foreground"})}),E.jsx(s,{})]})})}const LA=Le("rounded-3xl");function OH(){var S;const e=v.useRef(null),{sendMessage:t}=gs(),{sessionState:n}=fl(),r=Ts(),i=Qf(),[a,o]=v.useState(""),{allFiles:s,emptyTheFiles:u,handleCancelUpload:l,appendFiles:c,isUploading:d,successFiles:f}=Dj(),p=!!((S=n.session)!=null&&S.isHandedOff),{isAwaitingBotReply:m}=fC(),y=_=>{p&&c(_)},w=async()=>{if(m)return;if(d){const N="please wait for the file(s) to upload";bS.error(N),console.info(N)}const _=a.trim();_&&(o(""),u(),await t({content:_,attachments:f.map(N=>({url:N.fileUrl,type:N.file.type,name:N.file.name,id:N.id,size:N.file.size}))}))},{getRootProps:g,getInputProps:x,open:b}=mS({onDrop:y,noClick:!0,onDropRejected(){if(p){const _="unsupported file type, or the file is too large";bS.error(_),console.error(_)}},maxSize:5*1024*1024,accept:{"text/*":[".txt"],"image/*":[".png",".jpg",".jpeg",".gif"],"application/pdf":[".pdf"]}}),T=_=>{const N=_.clipboardData;N&&N.files.length>0&&y(Array.from(N.files))};return E.jsxs("div",{className:"p-2 relative space-y-1",...g(),children:[E.jsx("input",{...x()}),E.jsxs("div",{className:Le(LA,"relative space-y-2 border transition-all shadow py-2"),children:[E.jsx("div",{className:"flex items-center gap-1 px-2",children:E.jsx(ir,{mode:"popLayout",children:s.map(_=>E.jsx(vt,{snapExit:!0,children:E.jsx(IH,{onCancel:()=>l(_.id),file:_})},_.id))})}),E.jsx("textarea",{onPaste:T,ref:e,id:"chat-input",dir:i,value:a,rows:3,className:Le(LA,"w-full resize-none px-3","text-sm rtl:placeholder:text-right bg-transparent outline-none"),onChange:_=>o(_.target.value),onKeyDown:async _=>{_.key==="Enter"&&!_.shiftKey&&(_.preventDefault(),w())},placeholder:r.get("write-a-message")}),E.jsxs("div",{dir:i,className:"px-2 flex justify-between rtl:text-right",children:[E.jsx(Kf,{side:"top",align:"start",content:"attach files, (maximum size 5mb)",children:E.jsx(sr,{onClick:()=>{p&&b()},size:"fit",variant:"outline",className:Le("disabled:opacity-0","rounded-full size-8 flex items-center justify-center p-0"),disabled:!p,children:E.jsx(fF,{className:"size-4"})})}),E.jsx(Kf,{content:"send message",side:"top",align:"end",children:E.jsx(sr,{size:"fit",onClick:w,disabled:m||d,className:"rounded-full size-8 flex items-center justify-center p-0",children:m?E.jsx(iF,{className:"size-4 animate-spin animate-iteration-infinite"}):E.jsx(w_,{className:"size-4 rtl:-scale-100"})})})]})]})]})}function DH(){const{widgetCtx:e}=ar(),t=Ts();return E.jsx("div",{className:"p-2",children:E.jsxs("div",{className:"p-2 bg-background rounded-3xl border shadow-2xl space-y-2",children:[E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(eF,{className:"size-4 text-emerald-500"}),E.jsx("h2",{className:"text-sm font-medium",dir:"auto",children:t.get("session-closed-lead")})]}),E.jsx("div",{children:E.jsx(sr,{onClick:e.resetChat,className:"rounded-2xl w-full",children:t.get("new-conversation")})})]})})}function LH(){var o,s,u;const{sessionState:e}=fl(),{messagesState:t,sendMessage:n}=gs(),i=(s=(o=Nf().data)==null?void 0:o.data)==null?void 0:s.initialQuestions,a=t.messages.length===0;return E.jsx("footer",{children:E.jsx("div",{children:E.jsx(ir,{mode:"wait",children:e.session&&!((u=e.session)!=null&&u.isOpened)?E.jsx(vt,{className:"overflow-hidden",overrides:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},children:E.jsx(DH,{})},"session-closed"):E.jsxs(vt,{className:"overflow-hidden",overrides:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},children:[t.lastAIResMightSolveUserIssue&&E.jsx(PH,{}),a&&i&&E.jsx("div",{className:"flex items-center flex-row justify-end gap-2 flex-wrap px-2",children:i==null?void 0:i.map((l,c)=>E.jsx(sr,{dir:"auto",variant:"outline",size:"sm",onClick:()=>{n({content:l})},children:l},c))}),E.jsx(OH,{})]},"chat-input")})})})}function Fe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function MA(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zf(...e){return t=>{let n=!1;const r=e.map(i=>{const a=MA(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():MA(e[i],null)}}}}function Cn(...e){return v.useCallback(Zf(...e),e)}var bl=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),a=i.find(FH);if(a){const o=a.props.children,s=i.map(u=>u===a?v.Children.count(o)>1?v.Children.only(null):v.isValidElement(o)?o.props.children:null:u);return E.jsx(Gy,{...r,ref:t,children:v.isValidElement(o)?v.cloneElement(o,void 0,s):null})}return E.jsx(Gy,{...r,ref:t,children:n})});bl.displayName="Slot";var Gy=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=jH(n);return v.cloneElement(n,{...BH(r,n.props),ref:t?Zf(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});Gy.displayName="SlotClone";var MH=({children:e})=>E.jsx(E.Fragment,{children:e});function FH(e){return v.isValidElement(e)&&e.type===MH}function BH(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function jH(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var UH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],An=UH.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?bl:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function FA(e,t){e&&Qo.flushSync(()=>e.dispatchEvent(t))}function BA(e){const t=e+"CollectionProvider",[n,r]=ca(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:m,children:y}=p,w=yn.useRef(null),g=yn.useRef(new Map).current;return E.jsx(i,{scope:m,itemMap:g,collectionRef:w,children:y})};o.displayName=t;const s=e+"CollectionSlot",u=yn.forwardRef((p,m)=>{const{scope:y,children:w}=p,g=a(s,y),x=Cn(m,g.collectionRef);return E.jsx(bl,{ref:x,children:w})});u.displayName=s;const l=e+"CollectionItemSlot",c="data-radix-collection-item",d=yn.forwardRef((p,m)=>{const{scope:y,children:w,...g}=p,x=yn.useRef(null),b=Cn(m,x),T=a(l,y);return yn.useEffect(()=>(T.itemMap.set(x,{ref:x,...g}),()=>void T.itemMap.delete(x))),E.jsx(bl,{[c]:"",ref:b,children:w})});d.displayName=l;function f(p){const m=a(e+"CollectionConsumer",p);return yn.useCallback(()=>{const w=m.collectionRef.current;if(!w)return[];const g=Array.from(w.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((T,S)=>g.indexOf(T.ref.current)-g.indexOf(S.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:o,Slot:u,ItemSlot:d},f,r]}var HH=v.createContext(void 0);function jA(e){const t=v.useContext(HH);return e||t||"ltr"}var zH="DismissableLayer",Ky="dismissableLayer.update",VH="dismissableLayer.pointerDownOutside",$H="dismissableLayer.focusOutside",UA,HA=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zA=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...u}=e,l=v.useContext(HA),[c,d]=v.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),m=Cn(t,N=>d(N)),y=Array.from(l.layers),[w]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(w),x=c?y.indexOf(c):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,T=x>=g,S=qH(N=>{const D=N.target,V=[...l.branches].some(P=>P.contains(D));!T||V||(i==null||i(N),o==null||o(N),N.defaultPrevented||s==null||s())},f),_=GH(N=>{const D=N.target;[...l.branches].some(P=>P.contains(D))||(a==null||a(N),o==null||o(N),N.defaultPrevented||s==null||s())},f);return NC(N=>{x===l.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},f),v.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(UA=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),VA(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=UA)}},[c,f,n,l]),v.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),VA())},[c,l]),v.useEffect(()=>{const N=()=>p({});return document.addEventListener(Ky,N),()=>document.removeEventListener(Ky,N)},[]),E.jsx(An.div,{...u,ref:m,style:{pointerEvents:b?T?"auto":"none":void 0,...e.style},onFocusCapture:Fe(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Fe(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Fe(e.onPointerDownCapture,S.onPointerDownCapture)})});zA.displayName=zH;var WH="DismissableLayerBranch",YH=v.forwardRef((e,t)=>{const n=v.useContext(HA),r=v.useRef(null),i=Cn(t,r);return v.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),E.jsx(An.div,{...e,ref:i})});YH.displayName=WH;function qH(e,t=globalThis==null?void 0:globalThis.document){const n=Yt(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let u=function(){$A(VH,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function GH(e,t=globalThis==null?void 0:globalThis.document){const n=Yt(e),r=v.useRef(!1);return v.useEffect(()=>{const i=a=>{a.target&&!r.current&&$A($H,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VA(){const e=new CustomEvent(Ky);document.dispatchEvent(e)}function $A(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?FA(i,a):i.dispatchEvent(a)}var Xy=0;function WA(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??YA()),document.body.insertAdjacentElement("beforeend",e[1]??YA()),Xy++,()=>{Xy===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xy--}},[])}function YA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Qy="focusScope.autoFocusOnMount",Zy="focusScope.autoFocusOnUnmount",qA={bubbles:!1,cancelable:!0},KH="FocusScope",GA=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,u]=v.useState(null),l=Yt(i),c=Yt(a),d=v.useRef(null),f=Cn(t,y=>u(y)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let y=function(b){if(p.paused||!s)return;const T=b.target;s.contains(T)?d.current=T:ma(d.current,{select:!0})},w=function(b){if(p.paused||!s)return;const T=b.relatedTarget;T!==null&&(s.contains(T)||ma(d.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&ma(s)};document.addEventListener("focusin",y),document.addEventListener("focusout",w);const x=new MutationObserver(g);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w),x.disconnect()}}},[r,s,p.paused]),v.useEffect(()=>{if(s){QA.add(p);const y=document.activeElement;if(!s.contains(y)){const g=new CustomEvent(Qy,qA);s.addEventListener(Qy,l),s.dispatchEvent(g),g.defaultPrevented||(XH(tz(KA(s)),{select:!0}),document.activeElement===y&&ma(s))}return()=>{s.removeEventListener(Qy,l),setTimeout(()=>{const g=new CustomEvent(Zy,qA);s.addEventListener(Zy,c),s.dispatchEvent(g),g.defaultPrevented||ma(y??document.body,{select:!0}),s.removeEventListener(Zy,c),QA.remove(p)},0)}}},[s,l,c,p]);const m=v.useCallback(y=>{if(!n&&!r||p.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,g=document.activeElement;if(w&&g){const x=y.currentTarget,[b,T]=QH(x);b&&T?!y.shiftKey&&g===T?(y.preventDefault(),n&&ma(b,{select:!0})):y.shiftKey&&g===b&&(y.preventDefault(),n&&ma(T,{select:!0})):g===x&&y.preventDefault()}},[n,r,p.paused]);return E.jsx(An.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});GA.displayName=KH;function XH(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ma(r,{select:t}),document.activeElement!==n)return}function QH(e){const t=KA(e),n=XA(t,e),r=XA(t.reverse(),e);return[n,r]}function KA(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function XA(e,t){for(const n of e)if(!ZH(n,{upTo:t}))return n}function ZH(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function JH(e){return e instanceof HTMLInputElement&&"select"in e}function ma(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&JH(e)&&t&&e.select()}}var QA=ez();function ez(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ZA(e,t),e.unshift(t)},remove(t){var n;e=ZA(e,t),(n=e[0])==null||n.resume()}}}function ZA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function tz(e){return e.filter(t=>t.tagName!=="A")}var nz="Arrow",JA=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return E.jsx(An.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});JA.displayName=nz;var rz=JA,Jy="Popper",[ek,tk]=ca(Jy),[iz,nk]=ek(Jy),rk=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return E.jsx(iz,{scope:t,anchor:r,onAnchorChange:i,children:n})};rk.displayName=Jy;var ik="PopperAnchor",ak=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=nk(ik,n),o=v.useRef(null),s=Cn(t,o);return v.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:E.jsx(An.div,{...i,ref:s})});ak.displayName=ik;var e1="PopperContent",[az,oz]=ek(e1),ok=v.forwardRef((e,t)=>{var $e,Ve,We,Ge,St,Te;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...y}=e,w=nk(e1,n),[g,x]=v.useState(null),b=Cn(t,be=>x(be)),[T,S]=v.useState(null),_=sA(T),N=(_==null?void 0:_.width)??0,D=(_==null?void 0:_.height)??0,V=r+(a!=="center"?"-"+a:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},$=Array.isArray(l)?l:[l],H=$.length>0,X={padding:P,boundary:$.filter(uz),altBoundary:H},{refs:Y,floatingStyles:re,placement:ie,isPositioned:ee,middlewareData:F}=ZC({strategy:"fixed",placement:V,whileElementsMounted:(...be)=>GC(...be,{animationFrame:p==="always"}),elements:{reference:w.anchor},middleware:[JC({mainAxis:i+D,alignmentAxis:o}),u&&eA({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?tA():void 0,...X}),u&&nA({...X}),rA({...X,apply:({elements:be,rects:Ye,availableWidth:He,availableHeight:xt})=>{const{width:wt,height:Ke}=Ye.reference,Me=be.floating.style;Me.setProperty("--radix-popper-available-width",`${He}px`),Me.setProperty("--radix-popper-available-height",`${xt}px`),Me.setProperty("--radix-popper-anchor-width",`${wt}px`),Me.setProperty("--radix-popper-anchor-height",`${Ke}px`)}}),T&&aA({element:T,padding:s}),lz({arrowWidth:N,arrowHeight:D}),f&&iA({strategy:"referenceHidden",...X})]}),[B,A]=lk(ie),ae=Yt(m);or(()=>{ee&&(ae==null||ae())},[ee,ae]);const he=($e=F.arrow)==null?void 0:$e.x,O=(Ve=F.arrow)==null?void 0:Ve.y,Pe=((We=F.arrow)==null?void 0:We.centerOffset)!==0,[ge,xe]=v.useState();return or(()=>{g&&xe(window.getComputedStyle(g).zIndex)},[g]),E.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:ee?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(Ge=F.transformOrigin)==null?void 0:Ge.x,(St=F.transformOrigin)==null?void 0:St.y].join(" "),...((Te=F.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(az,{scope:n,placedSide:B,onArrowChange:S,arrowX:he,arrowY:O,shouldHideArrow:Pe,children:E.jsx(An.div,{"data-side":B,"data-align":A,...y,ref:b,style:{...y.style,animation:ee?void 0:"none"}})})})});ok.displayName=e1;var sk="PopperArrow",sz={top:"bottom",right:"left",bottom:"top",left:"right"},uk=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=oz(sk,r),o=sz[a.placedSide];return E.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:E.jsx(rz,{...i,ref:n,style:{...i.style,display:"block"}})})});uk.displayName=sk;function uz(e){return e!==null}var lz=e=>({name:"transformOrigin",options:e,fn(t){var w,g,x;const{placement:n,rects:r,middlewareData:i}=t,o=((w=i.arrow)==null?void 0:w.centerOffset)!==0,s=o?0:e.arrowWidth,u=o?0:e.arrowHeight,[l,c]=lk(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((g=i.arrow)==null?void 0:g.x)??0)+s/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+u/2;let m="",y="";return l==="bottom"?(m=o?d:`${f}px`,y=`${-u}px`):l==="top"?(m=o?d:`${f}px`,y=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,y=o?d:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,y=o?d:`${p}px`),{data:{x:m,y}}}});function lk(e){const[t,n="center"]=e.split("-");return[t,n]}var cz=rk,dz=ak,fz=ok,pz=uk;function hz(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Jf=e=>{const{present:t,children:n}=e,r=mz(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),a=Cn(r.ref,gz(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:a}):null};Jf.displayName="Presence";function mz(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),a=v.useRef("none"),o=e?"mounted":"unmounted",[s,u]=hz(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=ep(r.current);a.current=s==="mounted"?l:"none"},[s]),or(()=>{const l=r.current,c=i.current;if(c!==e){const f=a.current,p=ep(l);e?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),or(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=p=>{const y=ep(r.current).includes(p.animationName);if(p.target===t&&y&&(u("ANIMATION_END"),!i.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},f=p=>{p.target===t&&(a.current=ep(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function ep(e){return(e==null?void 0:e.animationName)||"none"}function gz(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var t1="rovingFocusGroup.onEntryFocus",yz={bubbles:!1,cancelable:!0},tp="RovingFocusGroup",[n1,ck,vz]=BA(tp),[xz,dk]=ca(tp,[vz]),[wz,bz]=xz(tp),fk=v.forwardRef((e,t)=>E.jsx(n1.Provider,{scope:e.__scopeRovingFocusGroup,children:E.jsx(n1.Slot,{scope:e.__scopeRovingFocusGroup,children:E.jsx(Ez,{...e,ref:t})})}));fk.displayName=tp;var Ez=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...d}=e,f=v.useRef(null),p=Cn(t,f),m=jA(a),[y=null,w]=$f({prop:o,defaultProp:s,onChange:u}),[g,x]=v.useState(!1),b=Yt(l),T=ck(n),S=v.useRef(!1),[_,N]=v.useState(0);return v.useEffect(()=>{const D=f.current;if(D)return D.addEventListener(t1,b),()=>D.removeEventListener(t1,b)},[b]),E.jsx(wz,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:y,onItemFocus:v.useCallback(D=>w(D),[w]),onItemShiftTab:v.useCallback(()=>x(!0),[]),onFocusableItemAdd:v.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:v.useCallback(()=>N(D=>D-1),[]),children:E.jsx(An.div,{tabIndex:g||_===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:Fe(e.onMouseDown,()=>{S.current=!0}),onFocus:Fe(e.onFocus,D=>{const V=!S.current;if(D.target===D.currentTarget&&V&&!g){const P=new CustomEvent(t1,yz);if(D.currentTarget.dispatchEvent(P),!P.defaultPrevented){const $=T().filter(ie=>ie.focusable),H=$.find(ie=>ie.active),X=$.find(ie=>ie.id===y),re=[H,X,...$].filter(Boolean).map(ie=>ie.ref.current);mk(re,c)}}S.current=!1}),onBlur:Fe(e.onBlur,()=>x(!1))})})}),pk="RovingFocusGroupItem",hk=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...o}=e,s=yl(),u=a||s,l=bz(pk,n),c=l.currentTabStopId===u,d=ck(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=l;return v.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),E.jsx(n1.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:E.jsx(An.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...o,ref:t,onMouseDown:Fe(e.onMouseDown,m=>{r?l.onItemFocus(u):m.preventDefault()}),onFocus:Fe(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Fe(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){l.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const y=Sz(m,l.orientation,l.dir);if(y!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let g=d().filter(x=>x.focusable).map(x=>x.ref.current);if(y==="last")g.reverse();else if(y==="prev"||y==="next"){y==="prev"&&g.reverse();const x=g.indexOf(m.currentTarget);g=l.loop?Cz(g,x+1):g.slice(x+1)}setTimeout(()=>mk(g))}})})})});hk.displayName=pk;var Tz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _z(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sz(e,t,n){const r=_z(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Tz[r]}function mk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Cz(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Az=fk,kz=hk,Rz=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_s=new WeakMap,np=new WeakMap,rp={},r1=0,gk=function(e){return e&&(e.host||gk(e.parentNode))},Nz=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=gk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Pz=function(e,t,n,r){var i=Nz(t,Array.isArray(e)?e:[e]);rp[n]||(rp[n]=new WeakMap);var a=rp[n],o=[],s=new Set,u=new Set(i),l=function(d){!d||s.has(d)||(s.add(d),l(d.parentNode))};i.forEach(l);var c=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else try{var p=f.getAttribute(r),m=p!==null&&p!=="false",y=(_s.get(f)||0)+1,w=(a.get(f)||0)+1;_s.set(f,y),a.set(f,w),o.push(f),y===1&&m&&np.set(f,!0),w===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return c(t),s.clear(),r1++,function(){o.forEach(function(d){var f=_s.get(d)-1,p=a.get(d)-1;_s.set(d,f),a.set(d,p),f||(np.has(d)||d.removeAttribute(r),np.delete(d)),p||d.removeAttribute(n)}),r1--,r1||(_s=new WeakMap,_s=new WeakMap,np=new WeakMap,rp={})}},yk=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Rz(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Pz(r,i,n,"aria-hidden")):function(){return null}},ip="right-scroll-bar-position",ap="width-before-scroll-bar",Iz="with-scroll-bars-hidden",Oz="--removed-body-scroll-bar-size";function i1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Dz(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Lz=typeof window<"u"?v.useLayoutEffect:v.useEffect,vk=new WeakMap;function Mz(e,t){var n=Dz(null,function(r){return e.forEach(function(i){return i1(i,r)})});return Lz(function(){var r=vk.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||i1(s,null)}),a.forEach(function(s){i.has(s)||i1(s,o)})}vk.set(n,e)},[e]),n}function Fz(e){return e}function Bz(e,t){t===void 0&&(t=Fz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var u=function(){var c=o;o=[],c.forEach(a)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(c){o.push(c),l()},filter:function(c){return o=o.filter(c),n}}}};return i}function xk(e){e===void 0&&(e={});var t=Bz(null);return t.options=Mt({async:!0,ssr:!1},e),t}var wk=function(e){var t=e.sideCar,n=il(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Mt({},n))};wk.isSideCarExport=!0;function bk(e,t){return e.useMedium(t),wk}var Ek=xk(),a1=function(){},op=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:a1,onWheelCapture:a1,onTouchMoveCapture:a1}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,y=e.allowPinchZoom,w=e.as,g=w===void 0?"div":w,x=e.gapMode,b=il(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,S=Mz([n,t]),_=Mt(Mt({},b),i);return v.createElement(v.Fragment,null,c&&v.createElement(T,{sideCar:Ek,removeScrollBar:l,shards:d,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:x}),o?v.cloneElement(v.Children.only(s),Mt(Mt({},_),{ref:S})):v.createElement(g,Mt({},_,{className:u,ref:S}),s))});op.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},op.classNames={fullWidth:ap,zeroRight:ip};var Tk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Tk();return t&&e.setAttribute("nonce",t),e}function Uz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hz(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var zz=function(){var e=0,t=null;return{add:function(n){e==0&&(t=jz())&&(Uz(t,n),Hz(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Vz=function(){var e=zz();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},$z=function(){var e=Vz(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Wz={left:0,top:0,right:0,gap:0},o1=function(e){return parseInt(e||"",10)||0},Yz=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[o1(n),o1(r),o1(i)]},qz=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wz;var t=Yz(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Gz=$z(),Ss="data-scroll-locked",Kz=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
341
+ */var ys=v;function W7(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Y7=typeof Object.is=="function"?Object.is:W7,q7=ys.useState,G7=ys.useEffect,K7=ys.useLayoutEffect,X7=ys.useDebugValue;function Q7(e,t){var n=t(),r=q7({inst:{value:n,getSnapshot:t}}),i=r[0].inst,a=r[1];return K7(function(){i.value=n,i.getSnapshot=t,dy(i)&&a({inst:i})},[e,n,t]),G7(function(){return dy(i)&&a({inst:i}),e(function(){dy(i)&&a({inst:i})})},[e]),X7(n),n}function dy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Y7(e,n)}catch{return!0}}function Z7(e,t){return t()}var J7=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Z7:Q7;hC.useSyncExternalStore=ys.useSyncExternalStore!==void 0?ys.useSyncExternalStore:J7,pC.exports=hC;var ej=pC.exports;const sa=()=>{},_n=sa(),fy=Object,ze=e=>e===_n,Vr=e=>typeof e=="function",ua=(e,t)=>({...e,...t}),tj=e=>Vr(e.then),Af=new WeakMap;let nj=0;const pl=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let i,a;if(fy(e)===e&&!r&&n!=RegExp){if(i=Af.get(e),i)return i;if(i=++nj+"~",Af.set(e,i),n==Array){for(i="@",a=0;a<e.length;a++)i+=pl(e[a])+",";Af.set(e,i)}if(n==fy){i="#";const o=fy.keys(e).sort();for(;!ze(a=o.pop());)ze(e[a])||(i+=a+":"+pl(e[a])+",");Af.set(e,i)}}else i=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return i},bi=new WeakMap,py={},kf={},hy="undefined",Rf=typeof window!=hy,my=typeof document!=hy,rj=()=>Rf&&typeof window.requestAnimationFrame!=hy,mC=(e,t)=>{const n=bi.get(e);return[()=>!ze(t)&&e.get(t)||py,r=>{if(!ze(t)){const i=e.get(t);t in kf||(kf[t]=i),n[5](t,ua(i,r),i||py)}},n[6],()=>!ze(t)&&t in kf?kf[t]:!ze(t)&&e.get(t)||py]};let gy=!0;const ij=()=>gy,[yy,vy]=Rf&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[sa,sa],aj=()=>{const e=my&&document.visibilityState;return ze(e)||e!=="hidden"},oj=e=>(my&&document.addEventListener("visibilitychange",e),yy("focus",e),()=>{my&&document.removeEventListener("visibilitychange",e),vy("focus",e)}),sj=e=>{const t=()=>{gy=!0,e()},n=()=>{gy=!1};return yy("online",t),yy("offline",n),()=>{vy("online",t),vy("offline",n)}},uj={isOnline:ij,isVisible:aj},lj={initFocus:oj,initReconnect:sj},gC=!yn.useId,hl=!Rf||"Deno"in window,cj=e=>rj()?window.requestAnimationFrame(e):setTimeout(e,1),xy=hl?v.useEffect:v.useLayoutEffect,wy=typeof navigator<"u"&&navigator.connection,yC=!hl&&wy&&(["slow-2g","2g"].includes(wy.effectiveType)||wy.saveData),by=e=>{if(Vr(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?pl(e):"",[e,t]};let dj=0;const Ey=()=>++dj,vC=0,xC=1,wC=2;var ml={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:vC,MUTATE_EVENT:wC,RECONNECT_EVENT:xC};async function bC(...e){const[t,n,r,i]=e,a=ua({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let o=a.populateCache;const s=a.rollbackOnError;let u=a.optimisticData;const l=f=>typeof s=="function"?s(f):s!==!1,c=a.throwOnError;if(Vr(n)){const f=n,p=[],m=t.keys();for(const y of m)!/^\$(inf|sub)\$/.test(y)&&f(t.get(y)._k)&&p.push(y);return Promise.all(p.map(d))}return d(n);async function d(f){const[p]=by(f);if(!p)return;const[m,y]=mC(t,p),[w,g,x,b]=bi.get(t),T=()=>{const X=w[p];return(Vr(a.revalidate)?a.revalidate(m().data,f):a.revalidate!==!1)&&(delete x[p],delete b[p],X&&X[0])?X[0](wC).then(()=>m().data):m().data};if(e.length<3)return T();let S=r,_;const N=Ey();g[p]=[N,0];const D=!ze(u),V=m(),P=V.data,$=V._c,H=ze($)?P:$;if(D&&(u=Vr(u)?u(H,P):u,y({data:u,_c:H})),Vr(S))try{S=S(H)}catch(X){_=X}if(S&&tj(S))if(S=await S.catch(X=>{_=X}),N!==g[p][0]){if(_)throw _;return S}else _&&D&&l(_)&&(o=!0,y({data:H,_c:_n}));if(o&&!_)if(Vr(o)){const X=o(S,H);y({data:X,error:_n,_c:_n})}else y({data:S,error:_n,_c:_n});if(g[p][1]=Ey(),Promise.resolve(T()).then(()=>{y({_c:_n})}),_){if(c)throw _;return}return S}}const EC=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},fj=(e,t)=>{if(!bi.has(e)){const n=ua(lj,t),r={},i=bC.bind(_n,e);let a=sa;const o={},s=(c,d)=>{const f=o[c]||[];return o[c]=f,f.push(d),()=>f.splice(f.indexOf(d),1)},u=(c,d,f)=>{e.set(c,d);const p=o[c];if(p)for(const m of p)m(d,f)},l=()=>{if(!bi.has(e)&&(bi.set(e,[r,{},{},{},i,u,s]),!hl)){const c=n.initFocus(setTimeout.bind(_n,EC.bind(_n,r,vC))),d=n.initReconnect(setTimeout.bind(_n,EC.bind(_n,r,xC)));a=()=>{c&&c(),d&&d(),bi.delete(e)}}};return l(),[e,i,l,a]}return[e,bi.get(e)[4]]},pj=(e,t,n,r,i)=>{const a=n.errorRetryCount,o=i.retryCount,s=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!ze(a)&&o>a||setTimeout(r,s,i)},hj=(e,t)=>pl(e)==pl(t),[TC,mj]=fj(new Map),gj=ua({onLoadingSlow:sa,onSuccess:sa,onError:sa,onErrorRetry:pj,onDiscarded:sa,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:yC?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:yC?5e3:3e3,compare:hj,isPaused:()=>!1,cache:TC,mutate:mj,fallback:{}},uj),yj=(e,t)=>{const n=ua(e,t);if(t){const{use:r,fallback:i}=e,{use:a,fallback:o}=t;r&&a&&(n.use=r.concat(a)),i&&o&&(n.fallback=ua(i,o))}return n},vj=v.createContext({}),xj="$inf$",_C=Rf&&window.__SWR_DEVTOOLS_USE__,wj=_C?window.__SWR_DEVTOOLS_USE__:[],bj=()=>{_C&&(window.__SWR_DEVTOOLS_REACT__=yn)},Ej=e=>Vr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Tj=()=>ua(gj,v.useContext(vj)),_j=e=>(t,n,r)=>e(t,n&&((...a)=>{const[o]=by(t),[,,,s]=bi.get(TC);if(o.startsWith(xj))return n(...a);const u=s[o];return ze(u)?n(...a):(delete s[o],u)}),r),Sj=wj.concat(_j),Cj=e=>function(...n){const r=Tj(),[i,a,o]=Ej(n),s=yj(r,o);let u=e;const{use:l}=s,c=(l||[]).concat(Sj);for(let d=c.length;d--;)u=c[d](u);return u(i,a||s.fetcher||null,s)},Aj=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i>=0&&(r[i]=r[r.length-1],r.pop())}};bj();const SC=yn.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),Ty={dedupe:!0},kj=Cj((e,t,n)=>{const{cache:r,compare:i,suspense:a,fallbackData:o,revalidateOnMount:s,revalidateIfStale:u,refreshInterval:l,refreshWhenHidden:c,refreshWhenOffline:d,keepPreviousData:f}=n,[p,m,y,w]=bi.get(r),[g,x]=by(e),b=v.useRef(!1),T=v.useRef(!1),S=v.useRef(g),_=v.useRef(t),N=v.useRef(n),D=()=>N.current,V=()=>D().isVisible()&&D().isOnline(),[P,$,H,X]=mC(r,g),Y=v.useRef({}).current,re=ze(o)?n.fallback[g]:o,ie=(Te,be)=>{for(const Ye in Y){const He=Ye;if(He==="data"){if(!i(Te[He],be[He])&&(!ze(Te[He])||!i(ge,be[He])))return!1}else if(be[He]!==Te[He])return!1}return!0},ee=v.useMemo(()=>{const Te=!g||!t?!1:ze(s)?D().isPaused()||a?!1:ze(u)?!0:u:s,be=Me=>{const Ot=ua(Me);return delete Ot._k,Te?{isValidating:!0,isLoading:!0,...Ot}:Ot},Ye=P(),He=X(),xt=be(Ye),wt=Ye===He?xt:be(He);let Ke=xt;return[()=>{const Me=be(P());return ie(Me,Ke)?(Ke.data=Me.data,Ke.isLoading=Me.isLoading,Ke.isValidating=Me.isValidating,Ke.error=Me.error,Ke):(Ke=Me,Me)},()=>wt]},[r,g]),F=ej.useSyncExternalStore(v.useCallback(Te=>H(g,(be,Ye)=>{ie(Ye,be)||Te()}),[r,g]),ee[0],ee[1]),B=!b.current,A=p[g]&&p[g].length>0,ae=F.data,he=ze(ae)?re:ae,O=F.error,Pe=v.useRef(he),ge=f?ze(ae)?Pe.current:ae:he,xe=A&&!ze(O)?!1:B&&!ze(s)?s:D().isPaused()?!1:a?ze(he)?!1:u:ze(he)||u,$e=!!(g&&t&&B&&xe),Ve=ze(F.isValidating)?$e:F.isValidating,We=ze(F.isLoading)?$e:F.isLoading,Ge=v.useCallback(async Te=>{const be=_.current;if(!g||!be||T.current||D().isPaused())return!1;let Ye,He,xt=!0;const wt=Te||{},Ke=!y[g]||!wt.dedupe,Me=()=>gC?!T.current&&g===S.current&&b.current:g===S.current,Ot={isValidating:!1,isLoading:!1},ka=()=>{$(Ot)},Ra=()=>{const te=y[g];te&&te[1]===He&&delete y[g]},Na={isValidating:!0};ze(P().data)&&(Na.isLoading=!0);try{if(Ke&&($(Na),n.loadingTimeout&&ze(P().data)&&setTimeout(()=>{xt&&Me()&&D().onLoadingSlow(g,n)},n.loadingTimeout),y[g]=[be(x),Ey()]),[Ye,He]=y[g],Ye=await Ye,Ke&&setTimeout(Ra,n.dedupingInterval),!y[g]||y[g][1]!==He)return Ke&&Me()&&D().onDiscarded(g),!1;Ot.error=_n;const te=m[g];if(!ze(te)&&(He<=te[0]||He<=te[1]||te[1]===0))return ka(),Ke&&Me()&&D().onDiscarded(g),!1;const de=P().data;Ot.data=i(de,Ye)?de:Ye,Ke&&Me()&&D().onSuccess(Ye,g,n)}catch(te){Ra();const de=D(),{shouldRetryOnError:j}=de;de.isPaused()||(Ot.error=te,Ke&&Me()&&(de.onError(te,g,de),(j===!0||Vr(j)&&j(te))&&(!D().revalidateOnFocus||!D().revalidateOnReconnect||V())&&de.onErrorRetry(te,g,de,q=>{const ce=p[g];ce&&ce[0]&&ce[0](ml.ERROR_REVALIDATE_EVENT,q)},{retryCount:(wt.retryCount||0)+1,dedupe:!0})))}return xt=!1,ka(),!0},[g,r]),St=v.useCallback((...Te)=>bC(r,S.current,...Te),[]);if(xy(()=>{_.current=t,N.current=n,ze(ae)||(Pe.current=ae)}),xy(()=>{if(!g)return;const Te=Ge.bind(_n,Ty);let be=0;const He=Aj(g,p,(xt,wt={})=>{if(xt==ml.FOCUS_EVENT){const Ke=Date.now();D().revalidateOnFocus&&Ke>be&&V()&&(be=Ke+D().focusThrottleInterval,Te())}else if(xt==ml.RECONNECT_EVENT)D().revalidateOnReconnect&&V()&&Te();else{if(xt==ml.MUTATE_EVENT)return Ge();if(xt==ml.ERROR_REVALIDATE_EVENT)return Ge(wt)}});return T.current=!1,S.current=g,b.current=!0,$({_k:x}),xe&&(ze(he)||hl?Te():cj(Te)),()=>{T.current=!0,He()}},[g]),xy(()=>{let Te;function be(){const He=Vr(l)?l(P().data):l;He&&Te!==-1&&(Te=setTimeout(Ye,He))}function Ye(){!P().error&&(c||D().isVisible())&&(d||D().isOnline())?Ge(Ty).then(be):be()}return be(),()=>{Te&&(clearTimeout(Te),Te=-1)}},[l,c,d,g]),v.useDebugValue(ge),a&&ze(he)&&g){if(!gC&&hl)throw new Error("Fallback data is required when using suspense in SSR.");_.current=t,N.current=n,T.current=!1;const Te=w[g];if(!ze(Te)){const be=St(Te);SC(be)}if(ze(O)){const be=Ge(Ty);ze(ge)||(be.status="fulfilled",be.value=!0),SC(be)}else throw O}return{mutate:St,get data(){return Y.data=!0,ge},get error(){return Y.error=!0,O},get isValidating(){return Y.isValidating=!0,Ve},get isLoading(){return Y.isLoading=!0,We}}});function Nf(){const{widgetCtx:e}=ar();return kj([e.config.token],e.api.widgetPrelude,{revalidateOnFocus:!1})}function gl(){const{widgetCtx:e}=ar();return{routerState:dl(e.routerCtx.state),toSessionsScreen:e.routerCtx.toSessionsScreen,toChatScreen:e.routerCtx.toChatScreen}}var CC={};const Rj=vc(wF);var Pf={},AC;function Nj(){if(AC)return Pf;AC=1,Object.defineProperty(Pf,"__esModule",{value:!0});var e=v;function t(){var n=e.useRef(!1),r=e.useCallback(function(){return n.current},[]);return e.useEffect(function(){return n.current=!0,function(){n.current=!1}},[]),r}return Pf.default=t,Pf}Object.defineProperty(CC,"__esModule",{value:!0});var _y=Rj,Sy=v,Pj=_y.__importDefault(Nj());function Ij(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=Sy.useRef(0),i=Pj.default(),a=Sy.useState(n),o=a[0],s=a[1],u=Sy.useCallback(function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var d=++r.current;return o.loading||s(function(f){return _y.__assign(_y.__assign({},f),{loading:!0})}),e.apply(void 0,l).then(function(f){return i()&&d===r.current&&s({value:f,loading:!1}),f},function(f){return i()&&d===r.current&&s({error:f,loading:!1}),f})},t);return[o,u]}var Oj=CC.default=Ij;const la=new Map;function Dj(){const[e,t]=v.useState([]),{widgetCtx:{api:n}}=ar();function r(c){const d=c.map(f=>({file:f,id:dC(),status:"pending",progress:0}));t(f=>[...f,...d]),d.forEach(o)}function i(c,d){t(f=>f.map(p=>p.id===c?{...p,...d}:p))}function a(c){t(d=>d.filter(f=>f.id!==c))}const o=async c=>{const d=new AbortController;la.set(c.id,d);try{t(p=>p.map(m=>m.id===c.id?{...m,status:"uploading",progress:0}:m));const f=await n.uploadFile(c,{signal:d.signal,onUploadProgress:p=>{if(!p.total)return;const m=Math.round(p.loaded*100/p.total);i(c.id,{progress:m})}});i(c.id,{status:"success",fileUrl:f.fileUrl,progress:100})}catch(f){d.signal.aborted||i(c.id,{status:"error",error:f instanceof Error?f.message:"Upload failed",progress:0})}finally{la.delete(c.id)}},s=c=>{const d=la.get(c);d&&(d.abort(),la.delete(c)),a(c)},u=v.useMemo(()=>e.filter(c=>c.status==="success"&&c.fileUrl),[e]);function l(){la.forEach(c=>c.abort()),la.clear(),t([])}return v.useEffect(()=>()=>{la.forEach(c=>c.abort()),la.clear()},[]),{allFiles:e,appendFiles:r,handleCancelUpload:s,successFiles:u,emptyTheFiles:l,getFileById:c=>e.find(d=>d.id===c),getUploadProgress:c=>{var d;return((d=e.find(f=>f.id===c))==null?void 0:d.progress)??0},getUploadStatus:c=>{var d;return(d=e.find(f=>f.id===c))==null?void 0:d.status},hasErrors:e.some(c=>c.status==="error"),isUploading:e.some(c=>c.status==="uploading")}}function Sn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Lj(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function kC(...e){return t=>e.forEach(n=>Lj(n,t))}function $r(...e){return v.useCallback(kC(...e),e)}function ca(e,t=[]){let n=[];function r(a,o){const s=v.createContext(o),u=n.length;n=[...n,o];const l=d=>{var g;const{scope:f,children:p,...m}=d,y=((g=f==null?void 0:f[e])==null?void 0:g[u])||s,w=v.useMemo(()=>m,Object.values(m));return E.jsx(y.Provider,{value:w,children:p})};l.displayName=a+"Provider";function c(d,f){var y;const p=((y=f==null?void 0:f[e])==null?void 0:y[u])||s,m=v.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[l,c]}const i=()=>{const a=n.map(o=>v.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,Mj(i,...t)]}function Mj(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const d=u(a)[`__scope${l}`];return{...s,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var If=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),a=i.find(Fj);if(a){const o=a.props.children,s=i.map(u=>u===a?v.Children.count(o)>1?v.Children.only(null):v.isValidElement(o)?o.props.children:null:u);return E.jsx(Cy,{...r,ref:t,children:v.isValidElement(o)?v.cloneElement(o,void 0,s):null})}return E.jsx(Cy,{...r,ref:t,children:n})});If.displayName="Slot";var Cy=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=jj(n);return v.cloneElement(n,{...Bj(r,n.props),ref:t?kC(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});Cy.displayName="SlotClone";var RC=({children:e})=>E.jsx(E.Fragment,{children:e});function Fj(e){return v.isValidElement(e)&&e.type===RC}function Bj(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function jj(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Uj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],zn=Uj.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?If:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Hj(e,t){e&&Qo.flushSync(()=>e.dispatchEvent(t))}function Yt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function NC(e,t=globalThis==null?void 0:globalThis.document){const n=Yt(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var zj="DismissableLayer",Ay="dismissableLayer.update",Vj="dismissableLayer.pointerDownOutside",$j="dismissableLayer.focusOutside",PC,IC=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ky=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...u}=e,l=v.useContext(IC),[c,d]=v.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),m=$r(t,N=>d(N)),y=Array.from(l.layers),[w]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(w),x=c?y.indexOf(c):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,T=x>=g,S=qj(N=>{const D=N.target,V=[...l.branches].some(P=>P.contains(D));!T||V||(i==null||i(N),o==null||o(N),N.defaultPrevented||s==null||s())},f),_=Gj(N=>{const D=N.target;[...l.branches].some(P=>P.contains(D))||(a==null||a(N),o==null||o(N),N.defaultPrevented||s==null||s())},f);return NC(N=>{x===l.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},f),v.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(PC=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),OC(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=PC)}},[c,f,n,l]),v.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),OC())},[c,l]),v.useEffect(()=>{const N=()=>p({});return document.addEventListener(Ay,N),()=>document.removeEventListener(Ay,N)},[]),E.jsx(zn.div,{...u,ref:m,style:{pointerEvents:b?T?"auto":"none":void 0,...e.style},onFocusCapture:Sn(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Sn(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Sn(e.onPointerDownCapture,S.onPointerDownCapture)})});ky.displayName=zj;var Wj="DismissableLayerBranch",Yj=v.forwardRef((e,t)=>{const n=v.useContext(IC),r=v.useRef(null),i=$r(t,r);return v.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),E.jsx(zn.div,{...e,ref:i})});Yj.displayName=Wj;function qj(e,t=globalThis==null?void 0:globalThis.document){const n=Yt(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let u=function(){DC(Vj,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Gj(e,t=globalThis==null?void 0:globalThis.document){const n=Yt(e),r=v.useRef(!1);return v.useEffect(()=>{const i=a=>{a.target&&!r.current&&DC($j,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function OC(){const e=new CustomEvent(Ay);document.dispatchEvent(e)}function DC(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Hj(i,a):i.dispatchEvent(a)}var or=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},Kj=pO.useId||(()=>{}),Xj=0;function yl(e){const[t,n]=v.useState(Kj());return or(()=>{e||n(r=>r??String(Xj++))},[e]),e||(t?`radix-${t}`:"")}const Qj=["top","right","bottom","left"],da=Math.min,Vn=Math.max,Of=Math.round,Df=Math.floor,fa=e=>({x:e,y:e}),Zj={left:"right",right:"left",bottom:"top",top:"bottom"},Jj={start:"end",end:"start"};function Ry(e,t,n){return Vn(e,da(t,n))}function Ei(e,t){return typeof e=="function"?e(t):e}function Ti(e){return e.split("-")[0]}function vs(e){return e.split("-")[1]}function Ny(e){return e==="x"?"y":"x"}function Py(e){return e==="y"?"height":"width"}function pa(e){return["top","bottom"].includes(Ti(e))?"y":"x"}function Iy(e){return Ny(pa(e))}function eU(e,t,n){n===void 0&&(n=!1);const r=vs(e),i=Iy(e),a=Py(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Lf(o)),[o,Lf(o)]}function tU(e){const t=Lf(e);return[Oy(e),t,Oy(t)]}function Oy(e){return e.replace(/start|end/g,t=>Jj[t])}function nU(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:o;default:return[]}}function rU(e,t,n,r){const i=vs(e);let a=nU(Ti(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(Oy)))),a}function Lf(e){return e.replace(/left|right|bottom|top/g,t=>Zj[t])}function iU(e){return{top:0,right:0,bottom:0,left:0,...e}}function LC(e){return typeof e!="number"?iU(e):{top:e,right:e,bottom:e,left:e}}function Mf(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function MC(e,t,n){let{reference:r,floating:i}=e;const a=pa(t),o=Iy(t),s=Py(o),u=Ti(t),l=a==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(vs(t)){case"start":p[o]-=f*(n&&l?-1:1);break;case"end":p[o]+=f*(n&&l?-1:1);break}return p}const aU=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=MC(l,r,u),f=r,p={},m=0;for(let y=0;y<s.length;y++){const{name:w,fn:g}=s[y],{x,y:b,data:T,reset:S}=await g({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});c=x??c,d=b??d,p={...p,[w]:{...p[w],...T}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(l=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:d}=MC(l,f,u)),y=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}};async function vl(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ei(t,e),m=LC(p),w=s[f?d==="floating"?"reference":"floating":d],g=Mf(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(w)))==null||n?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),x=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),T=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Mf(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:b,strategy:u}):x);return{top:(g.top-S.top+m.top)/T.y,bottom:(S.bottom-g.bottom+m.bottom)/T.y,left:(g.left-S.left+m.left)/T.x,right:(S.right-g.right+m.right)/T.x}}const oU=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=Ei(e,t)||{};if(l==null)return{};const d=LC(c),f={x:n,y:r},p=Iy(i),m=Py(p),y=await o.getDimensions(l),w=p==="y",g=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",T=a.reference[m]+a.reference[p]-f[p]-a.floating[m],S=f[p]-a.reference[p],_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let N=_?_[b]:0;(!N||!await(o.isElement==null?void 0:o.isElement(_)))&&(N=s.floating[b]||a.floating[m]);const D=T/2-S/2,V=N/2-y[m]/2-1,P=da(d[g],V),$=da(d[x],V),H=P,X=N-y[m]-$,Y=N/2-y[m]/2+D,re=Ry(H,Y,X),ie=!u.arrow&&vs(i)!=null&&Y!==re&&a.reference[m]/2-(Y<H?P:$)-y[m]/2<0,ee=ie?Y<H?Y-H:Y-X:0;return{[p]:f[p]+ee,data:{[p]:re,centerOffset:Y-re-ee,...ie&&{alignmentOffset:ee}},reset:ie}}}),sU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:u,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...w}=Ei(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const g=Ti(i),x=pa(s),b=Ti(s)===s,T=await(u.isRTL==null?void 0:u.isRTL(l.floating)),S=f||(b||!y?[Lf(s)]:tU(s)),_=m!=="none";!f&&_&&S.push(...rU(s,y,m,T));const N=[s,...S],D=await vl(t,w),V=[];let P=((r=a.flip)==null?void 0:r.overflows)||[];if(c&&V.push(D[g]),d){const Y=eU(i,o,T);V.push(D[Y[0]],D[Y[1]])}if(P=[...P,{placement:i,overflows:V}],!V.every(Y=>Y<=0)){var $,H;const Y=((($=a.flip)==null?void 0:$.index)||0)+1,re=N[Y];if(re)return{data:{index:Y,overflows:P},reset:{placement:re}};let ie=(H=P.filter(ee=>ee.overflows[0]<=0).sort((ee,F)=>ee.overflows[1]-F.overflows[1])[0])==null?void 0:H.placement;if(!ie)switch(p){case"bestFit":{var X;const ee=(X=P.filter(F=>{if(_){const B=pa(F.placement);return B===x||B==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(B=>B>0).reduce((B,A)=>B+A,0)]).sort((F,B)=>F[1]-B[1])[0])==null?void 0:X[0];ee&&(ie=ee);break}case"initialPlacement":ie=s;break}if(i!==ie)return{reset:{placement:ie}}}return{}}}};function FC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function BC(e){return Qj.some(t=>e[t]>=0)}const uU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Ei(e,t);switch(r){case"referenceHidden":{const a=await vl(t,{...i,elementContext:"reference"}),o=FC(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:BC(o)}}}case"escaped":{const a=await vl(t,{...i,altBoundary:!0}),o=FC(a,n.floating);return{data:{escapedOffsets:o,escaped:BC(o)}}}default:return{}}}}};async function lU(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ti(n),s=vs(n),u=pa(n)==="y",l=["left","top"].includes(o)?-1:1,c=a&&u?-1:1,d=Ei(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),u?{x:p*c,y:f*l}:{x:f*l,y:p*c}}const cU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,u=await lU(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},dU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:w=>{let{x:g,y:x}=w;return{x:g,y:x}}},...u}=Ei(e,t),l={x:n,y:r},c=await vl(t,u),d=pa(Ti(i)),f=Ny(d);let p=l[f],m=l[d];if(a){const w=f==="y"?"top":"left",g=f==="y"?"bottom":"right",x=p+c[w],b=p-c[g];p=Ry(x,p,b)}if(o){const w=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=m+c[w],b=m-c[g];m=Ry(x,m,b)}const y=s.fn({...t,[f]:p,[d]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[f]:a,[d]:o}}}}}},fU=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=Ei(e,t),c={x:n,y:r},d=pa(i),f=Ny(d);let p=c[f],m=c[d];const y=Ei(s,t),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(u){const b=f==="y"?"height":"width",T=a.reference[f]-a.floating[b]+w.mainAxis,S=a.reference[f]+a.reference[b]-w.mainAxis;p<T?p=T:p>S&&(p=S)}if(l){var g,x;const b=f==="y"?"width":"height",T=["top","left"].includes(Ti(i)),S=a.reference[d]-a.floating[b]+(T&&((g=o.offset)==null?void 0:g[d])||0)+(T?0:w.crossAxis),_=a.reference[d]+a.reference[b]+(T?0:((x=o.offset)==null?void 0:x[d])||0)-(T?w.crossAxis:0);m<S?m=S:m>_&&(m=_)}return{[f]:p,[d]:m}}}},pU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:u=()=>{},...l}=Ei(e,t),c=await vl(t,l),d=Ti(i),f=vs(i),p=pa(i)==="y",{width:m,height:y}=a.floating;let w,g;d==="top"||d==="bottom"?(w=d,g=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,w=f==="end"?"top":"bottom");const x=y-c.top-c.bottom,b=m-c.left-c.right,T=da(y-c[w],x),S=da(m-c[g],b),_=!t.middlewareData.shift;let N=T,D=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=x),_&&!f){const P=Vn(c.left,0),$=Vn(c.right,0),H=Vn(c.top,0),X=Vn(c.bottom,0);p?D=m-2*(P!==0||$!==0?P+$:Vn(c.left,c.right)):N=y-2*(H!==0||X!==0?H+X:Vn(c.top,c.bottom))}await u({...t,availableWidth:D,availableHeight:N});const V=await o.getDimensions(s.floating);return m!==V.width||y!==V.height?{reset:{rects:!0}}:{}}}};function Ff(){return typeof window<"u"}function xs(e){return jC(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(e){var t;return(t=(jC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jC(e){return Ff()?e instanceof Node||e instanceof $n(e).Node:!1}function Cr(e){return Ff()?e instanceof Element||e instanceof $n(e).Element:!1}function Yr(e){return Ff()?e instanceof HTMLElement||e instanceof $n(e).HTMLElement:!1}function UC(e){return!Ff()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function xl(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function hU(e){return["table","td","th"].includes(xs(e))}function Bf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Dy(e){const t=Ly(),n=Cr(e)?Ar(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function mU(e){let t=ha(e);for(;Yr(t)&&!ws(t);){if(Dy(t))return t;if(Bf(t))return null;t=ha(t)}return null}function Ly(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ws(e){return["html","body","#document"].includes(xs(e))}function Ar(e){return $n(e).getComputedStyle(e)}function jf(e){return Cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ha(e){if(xs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||UC(e)&&e.host||Wr(e);return UC(t)?t.host:t}function HC(e){const t=ha(e);return ws(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yr(t)&&xl(t)?t:HC(t)}function wl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=HC(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=$n(i);if(a){const s=My(o);return t.concat(o,o.visualViewport||[],xl(i)?i:[],s&&n?wl(s):[])}return t.concat(i,wl(i,[],n))}function My(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zC(e){const t=Ar(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Yr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Of(n)!==a||Of(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Fy(e){return Cr(e)?e:e.contextElement}function bs(e){const t=Fy(e);if(!Yr(t))return fa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=zC(t);let o=(a?Of(n.width):n.width)/r,s=(a?Of(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const gU=fa(0);function VC(e){const t=$n(e);return!Ly()||!t.visualViewport?gU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function ro(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Fy(e);let o=fa(1);t&&(r?Cr(r)&&(o=bs(r)):o=bs(e));const s=yU(a,n,r)?VC(a):fa(0);let u=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,c=i.width/o.x,d=i.height/o.y;if(a){const f=$n(a),p=r&&Cr(r)?$n(r):r;let m=f,y=My(m);for(;y&&r&&p!==m;){const w=bs(y),g=y.getBoundingClientRect(),x=Ar(y),b=g.left+(y.clientLeft+parseFloat(x.paddingLeft))*w.x,T=g.top+(y.clientTop+parseFloat(x.paddingTop))*w.y;u*=w.x,l*=w.y,c*=w.x,d*=w.y,u+=b,l+=T,m=$n(y),y=My(m)}}return Mf({width:c,height:d,x:u,y:l})}function vU(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=Wr(r),s=t?Bf(t.floating):!1;if(r===o||s&&a)return n;let u={scrollLeft:0,scrollTop:0},l=fa(1);const c=fa(0),d=Yr(r);if((d||!d&&!a)&&((xs(r)!=="body"||xl(o))&&(u=jf(r)),Yr(r))){const f=ro(r);l=bs(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function xU(e){return Array.from(e.getClientRects())}function By(e,t){const n=jf(e).scrollLeft;return t?t.left+n:ro(Wr(e)).left+n}function wU(e){const t=Wr(e),n=jf(e),r=e.ownerDocument.body,i=Vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+By(e);const s=-n.scrollTop;return Ar(r).direction==="rtl"&&(o+=Vn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function bU(e,t){const n=$n(e),r=Wr(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;const l=Ly();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:s,y:u}}function EU(e,t){const n=ro(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Yr(e)?bs(e):fa(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,u=i*a.x,l=r*a.y;return{width:o,height:s,x:u,y:l}}function $C(e,t,n){let r;if(t==="viewport")r=bU(e,n);else if(t==="document")r=wU(Wr(e));else if(Cr(t))r=EU(t,n);else{const i=VC(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Mf(r)}function WC(e,t){const n=ha(e);return n===t||!Cr(n)||ws(n)?!1:Ar(n).position==="fixed"||WC(n,t)}function TU(e,t){const n=t.get(e);if(n)return n;let r=wl(e,[],!1).filter(s=>Cr(s)&&xs(s)!=="body"),i=null;const a=Ar(e).position==="fixed";let o=a?ha(e):e;for(;Cr(o)&&!ws(o);){const s=Ar(o),u=Dy(o);!u&&s.position==="fixed"&&(i=null),(a?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||xl(o)&&!u&&WC(e,o))?r=r.filter(c=>c!==o):i=s,o=ha(o)}return t.set(e,r),r}function _U(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Bf(t)?[]:TU(t,this._c):[].concat(n),r],s=o[0],u=o.reduce((l,c)=>{const d=$C(t,c,i);return l.top=Vn(d.top,l.top),l.right=da(d.right,l.right),l.bottom=da(d.bottom,l.bottom),l.left=Vn(d.left,l.left),l},$C(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function SU(e){const{width:t,height:n}=zC(e);return{width:t,height:n}}function CU(e,t,n){const r=Yr(t),i=Wr(t),a=n==="fixed",o=ro(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const u=fa(0);if(r||!r&&!a)if((xs(t)!=="body"||xl(i))&&(s=jf(t)),r){const p=ro(t,!0,a,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else i&&(u.x=By(i));let l=0,c=0;if(i&&!r&&!a){const p=i.getBoundingClientRect();c=p.top+s.scrollTop,l=p.left+s.scrollLeft-By(i,p)}const d=o.left+s.scrollLeft-u.x-l,f=o.top+s.scrollTop-u.y-c;return{x:d,y:f,width:o.width,height:o.height}}function jy(e){return Ar(e).position==="static"}function YC(e,t){if(!Yr(e)||Ar(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wr(e)===n&&(n=n.ownerDocument.body),n}function qC(e,t){const n=$n(e);if(Bf(e))return n;if(!Yr(e)){let i=ha(e);for(;i&&!ws(i);){if(Cr(i)&&!jy(i))return i;i=ha(i)}return n}let r=YC(e,t);for(;r&&hU(r)&&jy(r);)r=YC(r,t);return r&&ws(r)&&jy(r)&&!Dy(r)?n:r||mU(e)||n}const AU=async function(e){const t=this.getOffsetParent||qC,n=this.getDimensions,r=await n(e.floating);return{reference:CU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kU(e){return Ar(e).direction==="rtl"}const RU={convertOffsetParentRelativeRectToViewportRelativeRect:vU,getDocumentElement:Wr,getClippingRect:_U,getOffsetParent:qC,getElementRects:AU,getClientRects:xU,getDimensions:SU,getScale:bs,isElement:Cr,isRTL:kU};function NU(e,t){let n=null,r;const i=Wr(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),a();const{left:l,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p=Df(c),m=Df(i.clientWidth-(l+d)),y=Df(i.clientHeight-(c+f)),w=Df(l),x={rootMargin:-p+"px "+-m+"px "+-y+"px "+-w+"px",threshold:Vn(0,da(1,u))||1};let b=!0;function T(S){const _=S[0].intersectionRatio;if(_!==u){if(!b)return o();_?o(!1,_):r=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(T,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,x)}n.observe(e)}return o(!0),a}function GC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Fy(e),c=i||a?[...l?wl(l):[],...wl(t)]:[];c.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),a&&g.addEventListener("resize",n)});const d=l&&s?NU(l,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(g=>{let[x]=g;x&&x.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let m,y=u?ro(e):null;u&&w();function w(){const g=ro(e);y&&(g.x!==y.x||g.y!==y.y||g.width!==y.width||g.height!==y.height)&&n(),y=g,m=requestAnimationFrame(w)}return n(),()=>{var g;c.forEach(x=>{i&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),d==null||d(),(g=p)==null||g.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const PU=cU,IU=dU,OU=sU,DU=pU,LU=uU,KC=oU,MU=fU,FU=(e,t,n)=>{const r=new Map,i={platform:RU,...n},a={...i.platform,_c:r};return aU(e,t,{...i,platform:a})};var Uf=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Hf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Hf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Hf(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function XC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function QC(e,t){const n=XC(e);return Math.round(t*n)/n}function Uy(e){const t=v.useRef(e);return Uf(()=>{t.current=e}),t}function ZC(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);Hf(f,r)||p(r);const[m,y]=v.useState(null),[w,g]=v.useState(null),x=v.useCallback(F=>{F!==_.current&&(_.current=F,y(F))},[]),b=v.useCallback(F=>{F!==N.current&&(N.current=F,g(F))},[]),T=a||m,S=o||w,_=v.useRef(null),N=v.useRef(null),D=v.useRef(c),V=u!=null,P=Uy(u),$=Uy(i),H=Uy(l),X=v.useCallback(()=>{if(!_.current||!N.current)return;const F={placement:t,strategy:n,middleware:f};$.current&&(F.platform=$.current),FU(_.current,N.current,F).then(B=>{const A={...B,isPositioned:H.current!==!1};Y.current&&!Hf(D.current,A)&&(D.current=A,Qo.flushSync(()=>{d(A)}))})},[f,t,n,$,H]);Uf(()=>{l===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[l]);const Y=v.useRef(!1);Uf(()=>(Y.current=!0,()=>{Y.current=!1}),[]),Uf(()=>{if(T&&(_.current=T),S&&(N.current=S),T&&S){if(P.current)return P.current(T,S,X);X()}},[T,S,X,P,V]);const re=v.useMemo(()=>({reference:_,floating:N,setReference:x,setFloating:b}),[x,b]),ie=v.useMemo(()=>({reference:T,floating:S}),[T,S]),ee=v.useMemo(()=>{const F={position:n,left:0,top:0};if(!ie.floating)return F;const B=QC(ie.floating,c.x),A=QC(ie.floating,c.y);return s?{...F,transform:"translate("+B+"px, "+A+"px)",...XC(ie.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:A}},[n,s,ie.floating,c.x,c.y]);return v.useMemo(()=>({...c,update:X,refs:re,elements:ie,floatingStyles:ee}),[c,X,re,ie,ee])}const BU=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?KC({element:r.current,padding:i}).fn(n):{}:r?KC({element:r,padding:i}).fn(n):{}}}},JC=(e,t)=>({...PU(e),options:[e,t]}),eA=(e,t)=>({...IU(e),options:[e,t]}),tA=(e,t)=>({...MU(e),options:[e,t]}),nA=(e,t)=>({...OU(e),options:[e,t]}),rA=(e,t)=>({...DU(e),options:[e,t]}),iA=(e,t)=>({...LU(e),options:[e,t]}),aA=(e,t)=>({...BU(e),options:[e,t]});var jU="Arrow",oA=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return E.jsx(zn.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});oA.displayName=jU;var UU=oA;function HU(e,t=[]){let n=[];function r(a,o){const s=v.createContext(o),u=n.length;n=[...n,o];function l(d){const{scope:f,children:p,...m}=d,y=(f==null?void 0:f[e][u])||s,w=v.useMemo(()=>m,Object.values(m));return E.jsx(y.Provider,{value:w,children:p})}function c(d,f){const p=(f==null?void 0:f[e][u])||s,m=v.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return l.displayName=a+"Provider",[l,c]}const i=()=>{const a=n.map(o=>v.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,zU(i,...t)]}function zU(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const d=u(a)[`__scope${l}`];return{...s,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function sA(e){const[t,n]=v.useState(void 0);return or(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,s;if("borderBoxSize"in a){const u=a.borderBoxSize,l=Array.isArray(u)?u[0]:u;o=l.inlineSize,s=l.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Hy="Popper",[uA,zf]=HU(Hy),[VU,lA]=uA(Hy),cA=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return E.jsx(VU,{scope:t,anchor:r,onAnchorChange:i,children:n})};cA.displayName=Hy;var dA="PopperAnchor",fA=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=lA(dA,n),o=v.useRef(null),s=$r(t,o);return v.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:E.jsx(zn.div,{...i,ref:s})});fA.displayName=dA;var zy="PopperContent",[$U,WU]=uA(zy),pA=v.forwardRef((e,t)=>{var $e,Ve,We,Ge,St,Te;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...y}=e,w=lA(zy,n),[g,x]=v.useState(null),b=$r(t,be=>x(be)),[T,S]=v.useState(null),_=sA(T),N=(_==null?void 0:_.width)??0,D=(_==null?void 0:_.height)??0,V=r+(a!=="center"?"-"+a:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},$=Array.isArray(l)?l:[l],H=$.length>0,X={padding:P,boundary:$.filter(qU),altBoundary:H},{refs:Y,floatingStyles:re,placement:ie,isPositioned:ee,middlewareData:F}=ZC({strategy:"fixed",placement:V,whileElementsMounted:(...be)=>GC(...be,{animationFrame:p==="always"}),elements:{reference:w.anchor},middleware:[JC({mainAxis:i+D,alignmentAxis:o}),u&&eA({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?tA():void 0,...X}),u&&nA({...X}),rA({...X,apply:({elements:be,rects:Ye,availableWidth:He,availableHeight:xt})=>{const{width:wt,height:Ke}=Ye.reference,Me=be.floating.style;Me.setProperty("--radix-popper-available-width",`${He}px`),Me.setProperty("--radix-popper-available-height",`${xt}px`),Me.setProperty("--radix-popper-anchor-width",`${wt}px`),Me.setProperty("--radix-popper-anchor-height",`${Ke}px`)}}),T&&aA({element:T,padding:s}),GU({arrowWidth:N,arrowHeight:D}),f&&iA({strategy:"referenceHidden",...X})]}),[B,A]=gA(ie),ae=Yt(m);or(()=>{ee&&(ae==null||ae())},[ee,ae]);const he=($e=F.arrow)==null?void 0:$e.x,O=(Ve=F.arrow)==null?void 0:Ve.y,Pe=((We=F.arrow)==null?void 0:We.centerOffset)!==0,[ge,xe]=v.useState();return or(()=>{g&&xe(window.getComputedStyle(g).zIndex)},[g]),E.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:ee?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(Ge=F.transformOrigin)==null?void 0:Ge.x,(St=F.transformOrigin)==null?void 0:St.y].join(" "),...((Te=F.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx($U,{scope:n,placedSide:B,onArrowChange:S,arrowX:he,arrowY:O,shouldHideArrow:Pe,children:E.jsx(zn.div,{"data-side":B,"data-align":A,...y,ref:b,style:{...y.style,animation:ee?void 0:"none"}})})})});pA.displayName=zy;var hA="PopperArrow",YU={top:"bottom",right:"left",bottom:"top",left:"right"},mA=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=WU(hA,r),o=YU[a.placedSide];return E.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:E.jsx(UU,{...i,ref:n,style:{...i.style,display:"block"}})})});mA.displayName=hA;function qU(e){return e!==null}var GU=e=>({name:"transformOrigin",options:e,fn(t){var w,g,x;const{placement:n,rects:r,middlewareData:i}=t,o=((w=i.arrow)==null?void 0:w.centerOffset)!==0,s=o?0:e.arrowWidth,u=o?0:e.arrowHeight,[l,c]=gA(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((g=i.arrow)==null?void 0:g.x)??0)+s/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+u/2;let m="",y="";return l==="bottom"?(m=o?d:`${f}px`,y=`${-u}px`):l==="top"?(m=o?d:`${f}px`,y=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,y=o?d:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,y=o?d:`${p}px`),{data:{x:m,y}}}});function gA(e){const[t,n="center"]=e.split("-");return[t,n]}var yA=cA,Vy=fA,vA=pA,xA=mA;function KU(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var $y=e=>{const{present:t,children:n}=e,r=XU(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),a=$r(r.ref,QU(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:a}):null};$y.displayName="Presence";function XU(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),a=v.useRef("none"),o=e?"mounted":"unmounted",[s,u]=KU(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=Vf(r.current);a.current=s==="mounted"?l:"none"},[s]),or(()=>{const l=r.current,c=i.current;if(c!==e){const f=a.current,p=Vf(l);e?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),or(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=p=>{const y=Vf(r.current).includes(p.animationName);if(p.target===t&&y&&(u("ANIMATION_END"),!i.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},f=p=>{p.target===t&&(a.current=Vf(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Vf(e){return(e==null?void 0:e.animationName)||"none"}function QU(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function $f({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=ZU({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=Yt(n),u=v.useCallback(l=>{if(a){const d=typeof l=="function"?l(e):l;d!==e&&s(d)}else i(l)},[a,e,i,s]);return[o,u]}function ZU({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,i=v.useRef(r),a=Yt(t);return v.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var JU="VisuallyHidden",wA=v.forwardRef((e,t)=>E.jsx(zn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));wA.displayName=JU;var eH=wA,[Wf,Mre]=ca("Tooltip",[zf]),Yf=zf(),bA="TooltipProvider",tH=700,Wy="tooltip.open",[nH,Yy]=Wf(bA),EA=e=>{const{__scopeTooltip:t,delayDuration:n=tH,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,[o,s]=v.useState(!0),u=v.useRef(!1),l=v.useRef(0);return v.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),E.jsx(nH,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(l.current),s(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:v.useCallback(c=>{u.current=c},[]),disableHoverableContent:i,children:a})};EA.displayName=bA;var qf="Tooltip",[rH,Gf]=Wf(qf),TA=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,u=Yy(qf,e.__scopeTooltip),l=Yf(t),[c,d]=v.useState(null),f=yl(),p=v.useRef(0),m=o??u.disableHoverableContent,y=s??u.delayDuration,w=v.useRef(!1),[g=!1,x]=$f({prop:r,defaultProp:i,onChange:N=>{N?(u.onOpen(),document.dispatchEvent(new CustomEvent(Wy))):u.onClose(),a==null||a(N)}}),b=v.useMemo(()=>g?w.current?"delayed-open":"instant-open":"closed",[g]),T=v.useCallback(()=>{window.clearTimeout(p.current),w.current=!1,x(!0)},[x]),S=v.useCallback(()=>{window.clearTimeout(p.current),x(!1)},[x]),_=v.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{w.current=!0,x(!0)},y)},[y,x]);return v.useEffect(()=>()=>window.clearTimeout(p.current),[]),E.jsx(yA,{...l,children:E.jsx(rH,{scope:t,contentId:f,open:g,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:v.useCallback(()=>{u.isOpenDelayed?_():T()},[u.isOpenDelayed,_,T]),onTriggerLeave:v.useCallback(()=>{m?S():window.clearTimeout(p.current)},[S,m]),onOpen:T,onClose:S,disableHoverableContent:m,children:n})})};TA.displayName=qf;var qy="TooltipTrigger",_A=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Gf(qy,n),a=Yy(qy,n),o=Yf(n),s=v.useRef(null),u=$r(t,s,i.onTriggerChange),l=v.useRef(!1),c=v.useRef(!1),d=v.useCallback(()=>l.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),E.jsx(Vy,{asChild:!0,...o,children:E.jsx(zn.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Sn(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Sn(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Sn(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Sn(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Sn(e.onBlur,i.onClose),onClick:Sn(e.onClick,i.onClose)})})});_A.displayName=qy;var iH="TooltipPortal",[Fre,aH]=Wf(iH,{forceMount:void 0}),Es="TooltipContent",SA=v.forwardRef((e,t)=>{const n=aH(Es,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=Gf(Es,e.__scopeTooltip);return E.jsx($y,{present:r||o.open,children:o.disableHoverableContent?E.jsx(CA,{side:i,...a,ref:t}):E.jsx(oH,{side:i,...a,ref:t})})}),oH=v.forwardRef((e,t)=>{const n=Gf(Es,e.__scopeTooltip),r=Yy(Es,e.__scopeTooltip),i=v.useRef(null),a=$r(t,i),[o,s]=v.useState(null),{trigger:u,onClose:l}=n,c=i.current,{onPointerInTransitChange:d}=r,f=v.useCallback(()=>{s(null),d(!1)},[d]),p=v.useCallback((m,y)=>{const w=m.currentTarget,g={x:m.clientX,y:m.clientY},x=cH(g,w.getBoundingClientRect()),b=dH(g,x),T=fH(y.getBoundingClientRect()),S=hH([...b,...T]);s(S),d(!0)},[d]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(u&&c){const m=w=>p(w,c),y=w=>p(w,u);return u.addEventListener("pointerleave",m),c.addEventListener("pointerleave",y),()=>{u.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",y)}}},[u,c,p,f]),v.useEffect(()=>{if(o){const m=y=>{const w=y.target,g={x:y.clientX,y:y.clientY},x=(u==null?void 0:u.contains(w))||(c==null?void 0:c.contains(w)),b=!pH(g,o);x?f():b&&(f(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[u,c,o,l,f]),E.jsx(CA,{...e,ref:a})}),[sH,uH]=Wf(qf,{isInside:!1}),CA=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,u=Gf(Es,n),l=Yf(n),{onClose:c}=u;return v.useEffect(()=>(document.addEventListener(Wy,c),()=>document.removeEventListener(Wy,c)),[c]),v.useEffect(()=>{if(u.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(u.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[u.trigger,c]),E.jsx(ky,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:E.jsxs(vA,{"data-state":u.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[E.jsx(RC,{children:r}),E.jsx(sH,{scope:n,isInside:!0,children:E.jsx(eH,{id:u.contentId,role:"tooltip",children:i||r})})]})})});SA.displayName=Es;var AA="TooltipArrow",lH=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Yf(n);return uH(AA,n).isInside?null:E.jsx(xA,{...i,...r,ref:t})});lH.displayName=AA;function cH(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function dH(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function fH(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function pH(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a].x,u=t[a].y,l=t[o].x,c=t[o].y;u>r!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function hH(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),mH(t)}function mH(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var gH=EA,yH=TA,vH=_A,kA=SA;const xH=gH,wH=yH,bH=vH,RA=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>E.jsx(kA,{ref:r,sideOffset:t,className:Le("z-50 overflow-hidden max-w-xs rounded-xl bg-primary border text-primary-foreground p-2 text-center align-middle text-xs shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));RA.displayName=kA.displayName;function Kf({children:e,content:t,side:n,align:r}){return t?E.jsxs(wH,{children:[E.jsx(bH,{asChild:!0,children:e}),E.jsx(RA,{side:n,align:r,collisionPadding:8,avoidCollisions:!0,children:t})]}):e}const NA={en:{ok:"OK",yes:"Yes",no:"No",agree:"Agree",cancel:"Cancel","yes-exit":"Yes, exit","yes-reset":"Yes, reset","no-cancel":"No, cancel","are-you-sure":"Are you sure?",recording:"Recording...","thank-you":"Thank you","sorry-try-again":"Sorry, please try again","error-occurred":"An error occurred","please-try-again":"Please try again","write-a-message":"Write a message...","send-message":"Send message",connected:"Connected",connecting:"Connecting",reconnecting:"Reconnecting",reconnected:"Reconnected",disconnecting:"Disconnecting",disconnected:"Disconnected",error:"Error","persist-session":"Persist session",settings:"Settings",close:"Close",help:"Help",chat:"Chat",send:"Send",copy:"Copy",copied:"Copied","sound-effects":"Sound effects",language:"Language",select:"Select",agent:"Agent",user:"User",bot:"Bot","close-widget":"Close widget","got-any-questions":"Got any questions? Chat with us!","typical-response-time":"Typically respond in less than 1 minute","session-closed-lead":"Your issue has been resolved!","create-new-ticket":"Create new ticket",exit:"Exit","reset-conversation":"Reset conversation","new-conversation":"New conversation","welcome-title":"Welcome to our support chat","welcome-description":"We're here to help! Start a conversation and we'll get back to you as soon as possible.","your-name":"Your name","your-email":"Your email address","start-chat":"Talk to support","starting-chat":"Connecting...","hello-greeting":"Hi there!","i-need-more-help":"I need more help","this-was-helpful":"This was helpful"},ar:{ok:"حسنا",yes:"نعم",no:"لا",agree:"موافق",cancel:"إلغاء","yes-exit":"نعم، اخرج","yes-reset":"نعم، إعادة تعيين","no-cancel":"لا، إلغاء","are-you-sure":"هل أنت متأكد؟",recording:"تسجيل","thank-you":"شكرا","sorry-try-again":"عذرا، حاول مرة أخرى","error-occurred":"حدث خطأ","please-try-again":"يرجى المحاولة مرة أخرى","write-a-message":"اكتب رسالة...","send-message":"إرسال رسالة",connected:"متصل",connecting:"جاري الاتصال",reconnecting:"جاري إعادة الاتصال",reconnected:"تم إعادة الاتصال",disconnecting:"جاري قطع الاتصال",disconnected:"قطع الاتصال",error:"خطأ","persist-session":"حفظ الجلسة",settings:"إعدادات",close:"إغلاق",help:"مساعدة",chat:"محادثة",send:"إرسال",copy:"نسخ",copied:"تم النسخ","sound-effects":"التاثيرات الصوتية",language:"اللغة",select:"اختر",agent:"الوكيل",user:"المستخدم",bot:"البوت","close-widget":"إغلاق الودجة","got-any-questions":"هل لديك أي أسئلة؟ تحدث معنا!","typical-response-time":"عادة ما نرد في أقل من دقيقة واحدة","session-closed-lead":"تم حل مشكلتك!",exit:"خروج","create-new-ticket":"إنشاء تذكرة جديدة","reset-conversation":"إعادة تعيين المحادثة","new-conversation":"محادثة جديدة","welcome-title":"مرحبًا بك في دردشة الدعم الخاصة بنا","welcome-description":"نحن هنا للمساعدة! ابدأ محادثة وسنرد عليك في أقرب وقت ممكن.","your-name":"اسمك","your-email":"عنوان بريدك الإلكتروني","start-chat":"تحدث إلى الدعم","starting-chat":"جاري الاتصال...","hello-greeting":"مرحبًا! كيف يمكننا مساعدتك اليوم؟","i-need-more-help":"أحتاج المزيد من المساعدة","this-was-helpful":"كان هذا مفيدًا"},nl:{ok:"OK",yes:"Ja",no:"Nee",agree:"Akkoord",cancel:"Annuleren","yes-exit":"Ja, afsluiten","yes-reset":"Ja, resetten","no-cancel":"Nee, annuleren","are-you-sure":"Weet u het zeker?",recording:"Opname...","thank-you":"Dank u","sorry-try-again":"Sorry, probeer het opnieuw","error-occurred":"Er is een fout opgetreden","please-try-again":"Probeer het opnieuw","write-a-message":"Schrijf een bericht...","send-message":"Bericht verzenden",connected:"Verbonden",connecting:"Verbinding maken",reconnecting:"Opnieuw verbinding maken",reconnected:"Opnieuw verbonden",disconnecting:"Verbinding verbreken",disconnected:"Verbinding verbroken",error:"Fout","persist-session":"Sessie behouden",settings:"Instellingen",close:"Sluiten",help:"Help",chat:"Chat",send:"Verzenden",copy:"Kopiëren",copied:"Gekopieerd","sound-effects":"Geluidseffecten",language:"Taal",select:"Selecteren",agent:"Agent",user:"Gebruiker",bot:"Bot","close-widget":"Widget sluiten","got-any-questions":"Heeft u vragen? Chat met ons!","typical-response-time":"We reageren doorgaans binnen 1 minuut","session-closed-lead":"Uw probleem is opgelost!","create-new-ticket":"Nieuw ticket aanmaken",exit:"Afsluiten","reset-conversation":"Gesprek resetten","new-conversation":"Nieuw gesprek","welcome-title":"Welkom bij onze supportchat","welcome-description":"We zijn hier om te helpen! Begin een gesprek en we nemen zo snel mogelijk contact met u op.","your-name":"Uw naam","your-email":"Uw e-mailadres","start-chat":"Praat met ondersteuning","starting-chat":"Verbinding maken...","hello-greeting":"Hallo! Hoe kunnen we u vandaag helpen?","i-need-more-help":"Ik heb nog meer help nodig","this-was-helpful":"Dit was handig"},fr:{ok:"D'accord",yes:"Oui",no:"Non",agree:"Accepter",cancel:"Annuler","yes-exit":"Oui, quitter","yes-reset":"Oui, réinitialiser","no-cancel":"Non, annuler","are-you-sure":"Êtes-vous sûr ?",recording:"Enregistrement...","thank-you":"Merci","sorry-try-again":"Désolé, veuillez réessayer","error-occurred":"Une erreur s'est produite","please-try-again":"Veuillez réessayer","write-a-message":"Écrivez un message...","send-message":"Envoyer le message",connected:"Connecté",connecting:"Connexion en cours",reconnecting:"Reconnexion en cours",reconnected:"Reconnecté",disconnecting:"Déconnexion en cours",disconnected:"Déconnecté",error:"Erreur","persist-session":"Conserver la session",settings:"Paramètres",close:"Fermer",help:"Aide",chat:"Chat",send:"Envoyer",copy:"Copier",copied:"Copié","sound-effects":"Effets sonores",language:"Langue",select:"Sélectionner",agent:"Agent",user:"Utilisateur",bot:"Bot","close-widget":"Fermer le widget","got-any-questions":"Vous avez des questions ? Chattez avec nous !","typical-response-time":"Nous répondons généralement en moins d'une minute","session-closed-lead":"Votre problème a été résolu !","create-new-ticket":"Créer un nouveau ticket",exit:"Sortie","reset-conversation":"Réinitialiser la conversation","new-conversation":"Nouvelle conversation","welcome-title":"Bienvenue dans notre chat de support","welcome-description":"Nous sommes là pour vous aider ! Commencez une conversation et nous vous répondrons dès que possible.","your-name":"Votre nom","your-email":"Votre adresse e-mail","start-chat":"Parler au support","starting-chat":"Connexion...","hello-greeting":"Bonjour ! Comment pouvons-nous vous aider aujourd'hui ?","i-need-more-help":"Je besoin d'aide plus","this-was-helpful":"C'était utile"},de:{ok:"OK",yes:"Ja",no:"Nein",agree:"Zustimmen",cancel:"Stornieren","yes-exit":"Ja, beenden","yes-reset":"Ja, zurücksetzen","no-cancel":"Nein, abbrechen","are-you-sure":"Sind Sie sicher?",recording:"Aufnahme läuft","thank-you":"Vielen Dank","sorry-try-again":"Entschuldigung, bitte versuchen Sie es erneut","error-occurred":"Ein Fehler ist aufgetreten","please-try-again":"Bitte versuchen Sie es erneut","write-a-message":"Nachricht schreiben...","send-message":"Nachricht senden",connected:"Verbunden",connecting:"Verbindung wird hergestellt",reconnecting:"Verbindung wird wiederhergestellt",reconnected:"Wieder verbunden",disconnecting:"Verbindung wird getrennt",disconnected:"Verbindung getrennt",error:"Fehler","persist-session":"Sitzung beibehalten",settings:"Einstellungen",close:"Schließen",help:"Hilfe",chat:"Chat",send:"Senden",copy:"Kopieren",copied:"Kopiert","sound-effects":"Soundeffekte",language:"Sprache",select:"Auswählen",agent:"Agent",user:"Benutzer",bot:"Bot","got-any-questions":"Haben Sie Fragen? Chatten Sie mit uns!","typical-response-time":"Üblicherweise antworten wir in weniger als 1 Minute","close-widget":"Widget schließen","session-closed-lead":"Ihr Problem wurde gelöst!","create-new-ticket":"Neues Ticket erstellen",exit:"Beenden","reset-conversation":"Konversation zurücksetzen","new-conversation":"Neue Konversation","welcome-title":"Willkommen in unserem Support-Chat","welcome-description":"Wir sind hier, um zu helfen! Beginnen Sie ein Gesprách und wir werden so schnell wie mogelijk antworten.","your-name":"Ihr Name","your-email":"Ihre E-Mail-Adresse","start-chat":"Mit dem Support sprechen","starting-chat":"Verbindung wird hergestellt...","hello-greeting":"Hallo! Wie können wir Ihnen heute helfen?","i-need-more-help":"Ich brauche weitere Hilfe","this-was-helpful":"Dies war hilfreich"},pt:{ok:"OK",yes:"Sim",no:"Não",agree:"Concordo",cancel:"Cancelar","yes-exit":"Sim, sair","yes-reset":"Sim, redefinir","no-cancel":"Não, cancelar","are-you-sure":"Você tem certeza?",recording:"Gravando...","thank-you":"Obrigado","sorry-try-again":"Desculpe, tente novamente","error-occurred":"Ocorreu um erro","please-try-again":"Por favor, tente novamente","write-a-message":"Escreva uma mensagem...","send-message":"Enviar mensagem",connected:"Conectado",connecting:"Conectando",reconnecting:"Reconectando",reconnected:"Reconectado",disconnecting:"Desconectando",disconnected:"Desconectado",error:"Erro","persist-session":"Persistir sessão",settings:"Configurações",close:"Fechar",help:"Ajuda",chat:"Bate-papo",send:"Enviar",copy:"Copiar",copied:"Copiado","sound-effects":"Efeitos sonoros",language:"Idioma",select:"Selecionar",agent:"Agente",user:"Usuário",bot:"Bot","close-widget":"Fechar widget","got-any-questions":"Tem alguma dúvida? Converse conosco!","typical-response-time":"Geralmente respondemos em menos de 1 minuto","session-closed-lead":"Seu problema foi resolvido!","create-new-ticket":"Criar novo ticket",exit:"Sair","reset-conversation":"Redefinir conversa","new-conversation":"Nova conversa","welcome-title":"Bem-vindo ao nosso chat de suporte","welcome-description":"Estamos aqui para ajudar! Inicie uma conversa e responderemos o mais rápido possível.","your-name":"Seu nome","your-email":"Seu endereço de email","start-chat":"Falar com o suporte","starting-chat":"Conectando...","hello-greeting":"Olá! Como podemos ajudar você hoje?","i-need-more-help":"preciso de mais ajuda","this-was-helpful":"Isso foi útil"}},EH=Object.keys(NA),TH=e=>EH.includes(e);function _H(e,t){const n=NA[t];return n&&n[e]||""}function Ts(){const{widgetCtx:{config:e}}=ar();return v.useMemo(()=>{const n=TH(e.language)?e.language:"en";return{get:r=>_H(r,n),lang:n}},[e.language])}const SH=10,CH={right:(e,t)=>({initial:{opacity:0,x:-e,...t.initial},animate:{opacity:1,x:0,...t.animate},exit:{opacity:0,x:e,...t.exit}}),left:(e,t)=>({initial:{opacity:0,x:e,...t.initial},animate:{opacity:1,x:0,...t.animate},exit:{opacity:0,x:-e,...t.exit}}),up:(e,t)=>({initial:{opacity:0,y:e,...t.initial},animate:{opacity:1,y:0,...t.animate},exit:{opacity:0,y:-e,...t.exit}}),down:(e,t)=>({initial:{opacity:0,y:-e,...t.initial},animate:{opacity:1,y:0,...t.animate},exit:{opacity:0,y:e,...t.exit}})},vt=v.forwardRef(({fadeIn:e="down",distance:t=SH,children:n,snapExit:r=!1,overrides:i={},...a},o)=>{const s=e?CH[e](t,i):{};return r&&s.exit&&typeof s.exit=="object"&&!Array.isArray(s.exit)&&(s.exit.transition={duration:0}),E.jsx(ss.div,{ref:o,...a,...s,children:n})});vt.displayName="MotionDiv";function PA(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=PA(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function AH(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=PA(e))&&(r&&(r+=" "),r+=t);return r}const IA=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,OA=AH,kH=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return OA(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(l=>{const c=n==null?void 0:n[l],d=a==null?void 0:a[l];if(c===null)return null;const f=IA(c)||IA(d);return i[l][f]}),s=n&&Object.entries(n).reduce((l,c)=>{let[d,f]=c;return f===void 0||(l[d]=f),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:d,className:f,...p}=c;return Object.entries(p).every(m=>{let[y,w]=m;return Array.isArray(w)?w.includes({...a,...s}[y]):{...a,...s}[y]===w})?[...l,d,f]:l},[]);return OA(e,o,u,n==null?void 0:n.class,n==null?void 0:n.className)},DA={x:2,y:2},RH={1:"scale-[1]","1.01":"scale-[1.01]","1.02":"scale-[1.02]","1.1":"scale-[1.1]"},Xf=v.memo(v.forwardRef(({children:e,className:t,scale:n="1.02",off:r=!1},i)=>{const[a,o]=v.useState(!1),[s,u]=v.useState({x:0,y:0});if(r||/translate/.test(e.props.className||""))return e;const c=m=>{var D,V;const{clientX:y,clientY:w}=m,g=m.currentTarget.getBoundingClientRect(),x=y-(g.left+g.width/2),b=w-(g.top+g.height/2),T=Math.max(-1,Math.min(1,x/(g.width/2))),S=Math.max(-1,Math.min(1,b/(g.height/2))),_=T*DA.x,N=S*DA.y;u({x:_,y:N}),(V=(D=e.props).onMouseMove)==null||V.call(D,m)},d=()=>{var m,y;o(!0),(y=(m=e.props).onMouseEnter)==null||y.call(m)},f=()=>{var m,y;o(!1),u({x:0,y:0}),(y=(m=e.props).onMouseLeave)==null||y.call(m)},p={"--opencx-wobble-x":a?`${s.x}px`:"0px","--opencx-wobble-y":a?`${s.y}px`:"0px"};return v.cloneElement(e,{ref:i,onMouseMove:c,onMouseEnter:d,onMouseLeave:f,style:{...p,...e.props.style},className:Le("translate-x-[var(--opencx-wobble-x)]","translate-y-[var(--opencx-wobble-y)]",`hover:${RH[n]}`,t,e.props.className,"transition-all ease-out")})}));Xf.displayName="Wobble";const NH=kH(Le("inline-flex shrink-0 items-center justify-center gap-2","text-sm font-medium whitespace-nowrap","ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","shadow-sm active:shadow-none active:scale-95 hover:active:scale-95","rounded-xl","border","transition"),{variants:{variant:{default:"border-primary bg-primary text-primary-foreground",destructive:"border-destructive bg-destructive text-destructive-foreground",outline:"bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground",ghost:"border-transparent shadow-none hover:bg-accent hover:text-accent-foreground",link:"border-transparent shadow-none text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-xs",lg:"min-h-12 px-4",icon:"h-10 w-10",fit:"size-fit p-2",free:"p-2"}},defaultVariants:{variant:"default",size:"default"}}),sr=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?If:"button";return E.jsx(Xf,{ref:a,children:E.jsx(o,{className:Le(NH({variant:t,size:n,className:e})),...i})})});sr.displayName="Button";const Qf=()=>{const[e,t]=v.useState("ltr");return v.useEffect(()=>{const n=()=>{typeof document>"u"||t(window.getComputedStyle(document.body).direction)};n();const r=new MutationObserver(n);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),r.observe(document.body,{attributes:!0,attributeFilter:["dir"]}),window.addEventListener("languagechange",n),()=>{r.disconnect(),window.removeEventListener("languagechange",n)}},[]),e};function PH(){const{sendMessage:e}=gs(),t=Ts(),n=[t.get("i-need-more-help"),t.get("this-was-helpful")],r=i=>{const a=i.trim();a&&e({content:a})};return E.jsx("div",{className:"flex items-center gap-2 p-2 pb-0 flex-wrap",children:n.map((i,a)=>E.jsx(sr,{onClick:()=>r(i),className:"flex-1 rounded-full",size:"sm",children:i},a))})}function IH({file:{status:e,file:t,error:n},onCancel:r}){const[i,a]=v.useState(null);v.useEffect(()=>{if(!t.type.startsWith("image/"))return;const u=new FileReader;return u.onload=()=>a(u.result),u.onerror=()=>console.error("Error reading file"),u.readAsDataURL(t),()=>u.abort()},[t]);const o=()=>{switch(e){case"uploading":return E.jsx(lF,{className:"size-4 animate-spin"});case"error":return E.jsx(rF,{className:"size-4 text-destructive"});default:return null}},s=()=>{const u=t.type.split("/")[0];return u==="image"&&i?E.jsx("img",{src:typeof i=="string"?i:"",className:"object-cover bg-secondary size-full",alt:t.name}):u==="audio"?E.jsx(sF,{}):E.jsx(uF,{})};return E.jsx(Kf,{side:"bottom",content:e==="error"?E.jsxs("span",{className:"text-destructive",children:["Failed to upload: ",n]}):t.name,children:E.jsxs("div",{className:Le(e==="uploading"&&"opacity-50","group","size-12 border rounded-2xl overflow-hidden relative","flex items-center justify-center shrink-0"),children:[E.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:o()}),E.jsx("button",{className:Le("absolute bg-black/50 inset-0 size-full z-10 opacity-0","flex items-center justify-center","opacity-0 group-hover:opacity-100 transition"),onClick:r,children:E.jsx(b2,{className:"size-4 text-primary-foreground"})}),E.jsx(s,{})]})})}const LA=Le("rounded-3xl");function OH(){var S;const e=v.useRef(null),{sendMessage:t}=gs(),{sessionState:n}=fl(),r=Ts(),i=Qf(),[a,o]=v.useState(""),{allFiles:s,emptyTheFiles:u,handleCancelUpload:l,appendFiles:c,isUploading:d,successFiles:f}=Dj(),p=!!((S=n.session)!=null&&S.isHandedOff),{isAwaitingBotReply:m}=fC(),y=_=>{p&&c(_)},w=async()=>{if(m)return;if(d){const N="please wait for the file(s) to upload";bS.error(N),console.info(N)}const _=a.trim();_&&(o(""),u(),await t({content:_,attachments:f.map(N=>({url:N.fileUrl,type:N.file.type,name:N.file.name,id:N.id,size:N.file.size}))}))},{getRootProps:g,getInputProps:x,open:b}=mS({onDrop:y,noClick:!0,onDropRejected(){if(p){const _="unsupported file type, or the file is too large";bS.error(_),console.error(_)}},maxSize:5*1024*1024,accept:{"text/*":[".txt"],"image/*":[".png",".jpg",".jpeg",".gif"],"application/pdf":[".pdf"]}}),T=_=>{const N=_.clipboardData;N&&N.files.length>0&&y(Array.from(N.files))};return E.jsxs("div",{className:"p-2 relative space-y-1",...g(),children:[E.jsx("input",{...x()}),E.jsxs("div",{className:Le(LA,"relative space-y-2 border transition-all shadow py-2"),children:[E.jsx("div",{className:"flex items-center gap-1 px-2",children:E.jsx(ir,{mode:"popLayout",children:s.map(_=>E.jsx(vt,{snapExit:!0,children:E.jsx(IH,{onCancel:()=>l(_.id),file:_})},_.id))})}),E.jsx("textarea",{onPaste:T,ref:e,id:"chat-input",dir:i,value:a,rows:3,className:Le(LA,"w-full resize-none px-3","text-sm rtl:placeholder:text-right bg-transparent outline-none"),onChange:_=>o(_.target.value),onKeyDown:async _=>{_.key==="Enter"&&!_.shiftKey&&(_.preventDefault(),w())},placeholder:r.get("write-a-message")}),E.jsxs("div",{dir:i,className:"px-2 flex justify-between rtl:text-right",children:[E.jsx(Kf,{side:"top",align:"start",content:"attach files, (maximum size 5mb)",children:E.jsx(sr,{onClick:()=>{p&&b()},size:"fit",variant:"outline",className:Le("disabled:opacity-0","rounded-full size-8 flex items-center justify-center p-0"),disabled:!p,children:E.jsx(fF,{className:"size-4"})})}),E.jsx(Kf,{content:"send message",side:"top",align:"end",children:E.jsx(sr,{size:"fit",onClick:w,disabled:m||d,className:"rounded-full size-8 flex items-center justify-center p-0",children:m?E.jsx(iF,{className:"size-4 animate-spin animate-iteration-infinite"}):E.jsx(w2,{className:"size-4 rtl:-scale-100"})})})]})]})]})}function DH(){const{widgetCtx:e}=ar(),t=Ts();return E.jsx("div",{className:"p-2",children:E.jsxs("div",{className:"p-2 bg-background rounded-3xl border shadow-2xl space-y-2",children:[E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(eF,{className:"size-4 text-emerald-500"}),E.jsx("h2",{className:"text-sm font-medium",dir:"auto",children:t.get("session-closed-lead")})]}),E.jsx("div",{children:E.jsx(sr,{onClick:e.resetChat,className:"rounded-2xl w-full",children:t.get("new-conversation")})})]})})}function LH(){var o,s,u;const{sessionState:e}=fl(),{messagesState:t,sendMessage:n}=gs(),i=(s=(o=Nf().data)==null?void 0:o.data)==null?void 0:s.initialQuestions,a=t.messages.length===0;return E.jsx("footer",{children:E.jsx("div",{children:E.jsx(ir,{mode:"wait",children:e.session&&!((u=e.session)!=null&&u.isOpened)?E.jsx(vt,{className:"overflow-hidden",overrides:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},children:E.jsx(DH,{})},"session-closed"):E.jsxs(vt,{className:"overflow-hidden",overrides:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},children:[t.lastAIResMightSolveUserIssue&&E.jsx(PH,{}),a&&i&&E.jsx("div",{className:"flex items-center flex-row justify-end gap-2 flex-wrap px-2",children:i==null?void 0:i.map((l,c)=>E.jsx(sr,{dir:"auto",variant:"outline",size:"sm",onClick:()=>{n({content:l})},children:l},c))}),E.jsx(OH,{})]},"chat-input")})})})}function Fe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function MA(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zf(...e){return t=>{let n=!1;const r=e.map(i=>{const a=MA(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():MA(e[i],null)}}}}function Cn(...e){return v.useCallback(Zf(...e),e)}var bl=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),a=i.find(FH);if(a){const o=a.props.children,s=i.map(u=>u===a?v.Children.count(o)>1?v.Children.only(null):v.isValidElement(o)?o.props.children:null:u);return E.jsx(Gy,{...r,ref:t,children:v.isValidElement(o)?v.cloneElement(o,void 0,s):null})}return E.jsx(Gy,{...r,ref:t,children:n})});bl.displayName="Slot";var Gy=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=jH(n);return v.cloneElement(n,{...BH(r,n.props),ref:t?Zf(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});Gy.displayName="SlotClone";var MH=({children:e})=>E.jsx(E.Fragment,{children:e});function FH(e){return v.isValidElement(e)&&e.type===MH}function BH(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function jH(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var UH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],An=UH.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?bl:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function FA(e,t){e&&Qo.flushSync(()=>e.dispatchEvent(t))}function BA(e){const t=e+"CollectionProvider",[n,r]=ca(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:m,children:y}=p,w=yn.useRef(null),g=yn.useRef(new Map).current;return E.jsx(i,{scope:m,itemMap:g,collectionRef:w,children:y})};o.displayName=t;const s=e+"CollectionSlot",u=yn.forwardRef((p,m)=>{const{scope:y,children:w}=p,g=a(s,y),x=Cn(m,g.collectionRef);return E.jsx(bl,{ref:x,children:w})});u.displayName=s;const l=e+"CollectionItemSlot",c="data-radix-collection-item",d=yn.forwardRef((p,m)=>{const{scope:y,children:w,...g}=p,x=yn.useRef(null),b=Cn(m,x),T=a(l,y);return yn.useEffect(()=>(T.itemMap.set(x,{ref:x,...g}),()=>void T.itemMap.delete(x))),E.jsx(bl,{[c]:"",ref:b,children:w})});d.displayName=l;function f(p){const m=a(e+"CollectionConsumer",p);return yn.useCallback(()=>{const w=m.collectionRef.current;if(!w)return[];const g=Array.from(w.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((T,S)=>g.indexOf(T.ref.current)-g.indexOf(S.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:o,Slot:u,ItemSlot:d},f,r]}var HH=v.createContext(void 0);function jA(e){const t=v.useContext(HH);return e||t||"ltr"}var zH="DismissableLayer",Ky="dismissableLayer.update",VH="dismissableLayer.pointerDownOutside",$H="dismissableLayer.focusOutside",UA,HA=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zA=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...u}=e,l=v.useContext(HA),[c,d]=v.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),m=Cn(t,N=>d(N)),y=Array.from(l.layers),[w]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(w),x=c?y.indexOf(c):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,T=x>=g,S=qH(N=>{const D=N.target,V=[...l.branches].some(P=>P.contains(D));!T||V||(i==null||i(N),o==null||o(N),N.defaultPrevented||s==null||s())},f),_=GH(N=>{const D=N.target;[...l.branches].some(P=>P.contains(D))||(a==null||a(N),o==null||o(N),N.defaultPrevented||s==null||s())},f);return NC(N=>{x===l.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},f),v.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(UA=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),VA(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=UA)}},[c,f,n,l]),v.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),VA())},[c,l]),v.useEffect(()=>{const N=()=>p({});return document.addEventListener(Ky,N),()=>document.removeEventListener(Ky,N)},[]),E.jsx(An.div,{...u,ref:m,style:{pointerEvents:b?T?"auto":"none":void 0,...e.style},onFocusCapture:Fe(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Fe(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Fe(e.onPointerDownCapture,S.onPointerDownCapture)})});zA.displayName=zH;var WH="DismissableLayerBranch",YH=v.forwardRef((e,t)=>{const n=v.useContext(HA),r=v.useRef(null),i=Cn(t,r);return v.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),E.jsx(An.div,{...e,ref:i})});YH.displayName=WH;function qH(e,t=globalThis==null?void 0:globalThis.document){const n=Yt(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let u=function(){$A(VH,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function GH(e,t=globalThis==null?void 0:globalThis.document){const n=Yt(e),r=v.useRef(!1);return v.useEffect(()=>{const i=a=>{a.target&&!r.current&&$A($H,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VA(){const e=new CustomEvent(Ky);document.dispatchEvent(e)}function $A(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?FA(i,a):i.dispatchEvent(a)}var Xy=0;function WA(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??YA()),document.body.insertAdjacentElement("beforeend",e[1]??YA()),Xy++,()=>{Xy===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xy--}},[])}function YA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Qy="focusScope.autoFocusOnMount",Zy="focusScope.autoFocusOnUnmount",qA={bubbles:!1,cancelable:!0},KH="FocusScope",GA=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,u]=v.useState(null),l=Yt(i),c=Yt(a),d=v.useRef(null),f=Cn(t,y=>u(y)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let y=function(b){if(p.paused||!s)return;const T=b.target;s.contains(T)?d.current=T:ma(d.current,{select:!0})},w=function(b){if(p.paused||!s)return;const T=b.relatedTarget;T!==null&&(s.contains(T)||ma(d.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&ma(s)};document.addEventListener("focusin",y),document.addEventListener("focusout",w);const x=new MutationObserver(g);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w),x.disconnect()}}},[r,s,p.paused]),v.useEffect(()=>{if(s){QA.add(p);const y=document.activeElement;if(!s.contains(y)){const g=new CustomEvent(Qy,qA);s.addEventListener(Qy,l),s.dispatchEvent(g),g.defaultPrevented||(XH(tz(KA(s)),{select:!0}),document.activeElement===y&&ma(s))}return()=>{s.removeEventListener(Qy,l),setTimeout(()=>{const g=new CustomEvent(Zy,qA);s.addEventListener(Zy,c),s.dispatchEvent(g),g.defaultPrevented||ma(y??document.body,{select:!0}),s.removeEventListener(Zy,c),QA.remove(p)},0)}}},[s,l,c,p]);const m=v.useCallback(y=>{if(!n&&!r||p.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,g=document.activeElement;if(w&&g){const x=y.currentTarget,[b,T]=QH(x);b&&T?!y.shiftKey&&g===T?(y.preventDefault(),n&&ma(b,{select:!0})):y.shiftKey&&g===b&&(y.preventDefault(),n&&ma(T,{select:!0})):g===x&&y.preventDefault()}},[n,r,p.paused]);return E.jsx(An.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});GA.displayName=KH;function XH(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ma(r,{select:t}),document.activeElement!==n)return}function QH(e){const t=KA(e),n=XA(t,e),r=XA(t.reverse(),e);return[n,r]}function KA(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function XA(e,t){for(const n of e)if(!ZH(n,{upTo:t}))return n}function ZH(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function JH(e){return e instanceof HTMLInputElement&&"select"in e}function ma(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&JH(e)&&t&&e.select()}}var QA=ez();function ez(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ZA(e,t),e.unshift(t)},remove(t){var n;e=ZA(e,t),(n=e[0])==null||n.resume()}}}function ZA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function tz(e){return e.filter(t=>t.tagName!=="A")}var nz="Arrow",JA=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return E.jsx(An.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});JA.displayName=nz;var rz=JA,Jy="Popper",[ek,tk]=ca(Jy),[iz,nk]=ek(Jy),rk=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return E.jsx(iz,{scope:t,anchor:r,onAnchorChange:i,children:n})};rk.displayName=Jy;var ik="PopperAnchor",ak=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=nk(ik,n),o=v.useRef(null),s=Cn(t,o);return v.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:E.jsx(An.div,{...i,ref:s})});ak.displayName=ik;var e1="PopperContent",[az,oz]=ek(e1),ok=v.forwardRef((e,t)=>{var $e,Ve,We,Ge,St,Te;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...y}=e,w=nk(e1,n),[g,x]=v.useState(null),b=Cn(t,be=>x(be)),[T,S]=v.useState(null),_=sA(T),N=(_==null?void 0:_.width)??0,D=(_==null?void 0:_.height)??0,V=r+(a!=="center"?"-"+a:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},$=Array.isArray(l)?l:[l],H=$.length>0,X={padding:P,boundary:$.filter(uz),altBoundary:H},{refs:Y,floatingStyles:re,placement:ie,isPositioned:ee,middlewareData:F}=ZC({strategy:"fixed",placement:V,whileElementsMounted:(...be)=>GC(...be,{animationFrame:p==="always"}),elements:{reference:w.anchor},middleware:[JC({mainAxis:i+D,alignmentAxis:o}),u&&eA({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?tA():void 0,...X}),u&&nA({...X}),rA({...X,apply:({elements:be,rects:Ye,availableWidth:He,availableHeight:xt})=>{const{width:wt,height:Ke}=Ye.reference,Me=be.floating.style;Me.setProperty("--radix-popper-available-width",`${He}px`),Me.setProperty("--radix-popper-available-height",`${xt}px`),Me.setProperty("--radix-popper-anchor-width",`${wt}px`),Me.setProperty("--radix-popper-anchor-height",`${Ke}px`)}}),T&&aA({element:T,padding:s}),lz({arrowWidth:N,arrowHeight:D}),f&&iA({strategy:"referenceHidden",...X})]}),[B,A]=lk(ie),ae=Yt(m);or(()=>{ee&&(ae==null||ae())},[ee,ae]);const he=($e=F.arrow)==null?void 0:$e.x,O=(Ve=F.arrow)==null?void 0:Ve.y,Pe=((We=F.arrow)==null?void 0:We.centerOffset)!==0,[ge,xe]=v.useState();return or(()=>{g&&xe(window.getComputedStyle(g).zIndex)},[g]),E.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:ee?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(Ge=F.transformOrigin)==null?void 0:Ge.x,(St=F.transformOrigin)==null?void 0:St.y].join(" "),...((Te=F.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(az,{scope:n,placedSide:B,onArrowChange:S,arrowX:he,arrowY:O,shouldHideArrow:Pe,children:E.jsx(An.div,{"data-side":B,"data-align":A,...y,ref:b,style:{...y.style,animation:ee?void 0:"none"}})})})});ok.displayName=e1;var sk="PopperArrow",sz={top:"bottom",right:"left",bottom:"top",left:"right"},uk=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=oz(sk,r),o=sz[a.placedSide];return E.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:E.jsx(rz,{...i,ref:n,style:{...i.style,display:"block"}})})});uk.displayName=sk;function uz(e){return e!==null}var lz=e=>({name:"transformOrigin",options:e,fn(t){var w,g,x;const{placement:n,rects:r,middlewareData:i}=t,o=((w=i.arrow)==null?void 0:w.centerOffset)!==0,s=o?0:e.arrowWidth,u=o?0:e.arrowHeight,[l,c]=lk(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((g=i.arrow)==null?void 0:g.x)??0)+s/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+u/2;let m="",y="";return l==="bottom"?(m=o?d:`${f}px`,y=`${-u}px`):l==="top"?(m=o?d:`${f}px`,y=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,y=o?d:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,y=o?d:`${p}px`),{data:{x:m,y}}}});function lk(e){const[t,n="center"]=e.split("-");return[t,n]}var cz=rk,dz=ak,fz=ok,pz=uk;function hz(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Jf=e=>{const{present:t,children:n}=e,r=mz(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),a=Cn(r.ref,gz(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:a}):null};Jf.displayName="Presence";function mz(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),a=v.useRef("none"),o=e?"mounted":"unmounted",[s,u]=hz(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=ep(r.current);a.current=s==="mounted"?l:"none"},[s]),or(()=>{const l=r.current,c=i.current;if(c!==e){const f=a.current,p=ep(l);e?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),or(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=p=>{const y=ep(r.current).includes(p.animationName);if(p.target===t&&y&&(u("ANIMATION_END"),!i.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},f=p=>{p.target===t&&(a.current=ep(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function ep(e){return(e==null?void 0:e.animationName)||"none"}function gz(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var t1="rovingFocusGroup.onEntryFocus",yz={bubbles:!1,cancelable:!0},tp="RovingFocusGroup",[n1,ck,vz]=BA(tp),[xz,dk]=ca(tp,[vz]),[wz,bz]=xz(tp),fk=v.forwardRef((e,t)=>E.jsx(n1.Provider,{scope:e.__scopeRovingFocusGroup,children:E.jsx(n1.Slot,{scope:e.__scopeRovingFocusGroup,children:E.jsx(Ez,{...e,ref:t})})}));fk.displayName=tp;var Ez=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...d}=e,f=v.useRef(null),p=Cn(t,f),m=jA(a),[y=null,w]=$f({prop:o,defaultProp:s,onChange:u}),[g,x]=v.useState(!1),b=Yt(l),T=ck(n),S=v.useRef(!1),[_,N]=v.useState(0);return v.useEffect(()=>{const D=f.current;if(D)return D.addEventListener(t1,b),()=>D.removeEventListener(t1,b)},[b]),E.jsx(wz,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:y,onItemFocus:v.useCallback(D=>w(D),[w]),onItemShiftTab:v.useCallback(()=>x(!0),[]),onFocusableItemAdd:v.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:v.useCallback(()=>N(D=>D-1),[]),children:E.jsx(An.div,{tabIndex:g||_===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:Fe(e.onMouseDown,()=>{S.current=!0}),onFocus:Fe(e.onFocus,D=>{const V=!S.current;if(D.target===D.currentTarget&&V&&!g){const P=new CustomEvent(t1,yz);if(D.currentTarget.dispatchEvent(P),!P.defaultPrevented){const $=T().filter(ie=>ie.focusable),H=$.find(ie=>ie.active),X=$.find(ie=>ie.id===y),re=[H,X,...$].filter(Boolean).map(ie=>ie.ref.current);mk(re,c)}}S.current=!1}),onBlur:Fe(e.onBlur,()=>x(!1))})})}),pk="RovingFocusGroupItem",hk=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...o}=e,s=yl(),u=a||s,l=bz(pk,n),c=l.currentTabStopId===u,d=ck(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=l;return v.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),E.jsx(n1.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:E.jsx(An.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...o,ref:t,onMouseDown:Fe(e.onMouseDown,m=>{r?l.onItemFocus(u):m.preventDefault()}),onFocus:Fe(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Fe(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){l.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const y=Sz(m,l.orientation,l.dir);if(y!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let g=d().filter(x=>x.focusable).map(x=>x.ref.current);if(y==="last")g.reverse();else if(y==="prev"||y==="next"){y==="prev"&&g.reverse();const x=g.indexOf(m.currentTarget);g=l.loop?Cz(g,x+1):g.slice(x+1)}setTimeout(()=>mk(g))}})})})});hk.displayName=pk;var Tz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _z(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sz(e,t,n){const r=_z(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Tz[r]}function mk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Cz(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Az=fk,kz=hk,Rz=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_s=new WeakMap,np=new WeakMap,rp={},r1=0,gk=function(e){return e&&(e.host||gk(e.parentNode))},Nz=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=gk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Pz=function(e,t,n,r){var i=Nz(t,Array.isArray(e)?e:[e]);rp[n]||(rp[n]=new WeakMap);var a=rp[n],o=[],s=new Set,u=new Set(i),l=function(d){!d||s.has(d)||(s.add(d),l(d.parentNode))};i.forEach(l);var c=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else try{var p=f.getAttribute(r),m=p!==null&&p!=="false",y=(_s.get(f)||0)+1,w=(a.get(f)||0)+1;_s.set(f,y),a.set(f,w),o.push(f),y===1&&m&&np.set(f,!0),w===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return c(t),s.clear(),r1++,function(){o.forEach(function(d){var f=_s.get(d)-1,p=a.get(d)-1;_s.set(d,f),a.set(d,p),f||(np.has(d)||d.removeAttribute(r),np.delete(d)),p||d.removeAttribute(n)}),r1--,r1||(_s=new WeakMap,_s=new WeakMap,np=new WeakMap,rp={})}},yk=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Rz(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Pz(r,i,n,"aria-hidden")):function(){return null}},ip="right-scroll-bar-position",ap="width-before-scroll-bar",Iz="with-scroll-bars-hidden",Oz="--removed-body-scroll-bar-size";function i1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Dz(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Lz=typeof window<"u"?v.useLayoutEffect:v.useEffect,vk=new WeakMap;function Mz(e,t){var n=Dz(null,function(r){return e.forEach(function(i){return i1(i,r)})});return Lz(function(){var r=vk.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||i1(s,null)}),a.forEach(function(s){i.has(s)||i1(s,o)})}vk.set(n,e)},[e]),n}function Fz(e){return e}function Bz(e,t){t===void 0&&(t=Fz);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var u=function(){var c=o;o=[],c.forEach(a)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(c){o.push(c),l()},filter:function(c){return o=o.filter(c),n}}}};return i}function xk(e){e===void 0&&(e={});var t=Bz(null);return t.options=Mt({async:!0,ssr:!1},e),t}var wk=function(e){var t=e.sideCar,n=il(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Mt({},n))};wk.isSideCarExport=!0;function bk(e,t){return e.useMedium(t),wk}var Ek=xk(),a1=function(){},op=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:a1,onWheelCapture:a1,onTouchMoveCapture:a1}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,y=e.allowPinchZoom,w=e.as,g=w===void 0?"div":w,x=e.gapMode,b=il(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,S=Mz([n,t]),_=Mt(Mt({},b),i);return v.createElement(v.Fragment,null,c&&v.createElement(T,{sideCar:Ek,removeScrollBar:l,shards:d,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:x}),o?v.cloneElement(v.Children.only(s),Mt(Mt({},_),{ref:S})):v.createElement(g,Mt({},_,{className:u,ref:S}),s))});op.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},op.classNames={fullWidth:ap,zeroRight:ip};var Tk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Tk();return t&&e.setAttribute("nonce",t),e}function Uz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hz(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var zz=function(){var e=0,t=null;return{add:function(n){e==0&&(t=jz())&&(Uz(t,n),Hz(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Vz=function(){var e=zz();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},$z=function(){var e=Vz(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Wz={left:0,top:0,right:0,gap:0},o1=function(e){return parseInt(e||"",10)||0},Yz=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[o1(n),o1(r),o1(i)]},qz=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wz;var t=Yz(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Gz=$z(),Ss="data-scroll-locked",Kz=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
342
342
  .`.concat(Iz,` {
343
343
  overflow: hidden `).concat(r,`;
344
344
  padding-right: `).concat(s,"px ").concat(r,`;
@@ -378,7 +378,7 @@ to {
378
378
  `)},_k=function(){var e=parseInt(document.body.getAttribute(Ss)||"0",10);return isFinite(e)?e:0},Xz=function(){v.useEffect(function(){return document.body.setAttribute(Ss,(_k()+1).toString()),function(){var e=_k()-1;e<=0?document.body.removeAttribute(Ss):document.body.setAttribute(Ss,e.toString())}},[])},Qz=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Xz();var a=v.useMemo(function(){return qz(i)},[i]);return v.createElement(Gz,{styles:Kz(a,!t,i,n?"":"!important")})};function Zz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Tk();return t&&e.setAttribute("nonce",t),e}function Jz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eV(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var tV=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Zz())&&(Jz(t,n),eV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nV=function(){var e=tV();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},s1=function(){var e=nV(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},u1=!1;if(typeof window<"u")try{var sp=Object.defineProperty({},"passive",{get:function(){return u1=!0,!0}});window.addEventListener("test",sp,sp),window.removeEventListener("test",sp,sp)}catch{u1=!1}var Cs=u1?{passive:!1}:!1,rV=function(e){return e.tagName==="TEXTAREA"},Sk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!rV(e)&&n[t]==="visible")},iV=function(e){return Sk(e,"overflowY")},aV=function(e){return Sk(e,"overflowX")},Ck=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Ak(e,r);if(i){var a=kk(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},oV=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},sV=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ak=function(e,t){return e==="v"?iV(t):aV(t)},kk=function(e,t){return e==="v"?oV(t):sV(t)},uV=function(e,t){return e==="h"&&t==="rtl"?-1:1},lV=function(e,t,n,r,i){var a=uV(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,u=t.contains(s),l=!1,c=o>0,d=0,f=0;do{var p=kk(e,s),m=p[0],y=p[1],w=p[2],g=y-w-a*m;(m||g)&&Ak(e,s)&&(d+=g,f+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(d)<1||!i)||!c&&(Math.abs(f)<1||!i))&&(l=!0),l},up=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rk=function(e){return[e.deltaX,e.deltaY]},Nk=function(e){return e&&"current"in e?e.current:e},cV=function(e,t){return e[0]===t[0]&&e[1]===t[1]},dV=function(e){return`
379
379
  .block-interactivity-`.concat(e,` {pointer-events: none;}
380
380
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
381
- `)},fV=0,As=[];function pV(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(fV++)[0],a=v.useState(s1)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=of([e.lockRef.current],(e.shards||[]).map(Nk),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(y,w){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var g=up(y),x=n.current,b="deltaX"in y?y.deltaX:x[0]-g[0],T="deltaY"in y?y.deltaY:x[1]-g[1],S,_=y.target,N=Math.abs(b)>Math.abs(T)?"h":"v";if("touches"in y&&N==="h"&&_.type==="range")return!1;var D=Ck(N,_);if(!D)return!0;if(D?S=N:(S=N==="v"?"h":"v",D=Ck(N,_)),!D)return!1;if(!r.current&&"changedTouches"in y&&(b||T)&&(r.current=S),!S)return!0;var V=r.current||S;return lV(V,w,y,V==="h"?b:T,!0)},[]),u=v.useCallback(function(y){var w=y;if(!(!As.length||As[As.length-1]!==a)){var g="deltaY"in w?Rk(w):up(w),x=t.current.filter(function(S){return S.name===w.type&&(S.target===w.target||w.target===S.shadowParent)&&cV(S.delta,g)})[0];if(x&&x.should){w.cancelable&&w.preventDefault();return}if(!x){var b=(o.current.shards||[]).map(Nk).filter(Boolean).filter(function(S){return S.contains(w.target)}),T=b.length>0?s(w,b[0]):!o.current.noIsolation;T&&w.cancelable&&w.preventDefault()}}},[]),l=v.useCallback(function(y,w,g,x){var b={name:y,delta:w,target:g,should:x,shadowParent:hV(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(T){return T!==b})},1)},[]),c=v.useCallback(function(y){n.current=up(y),r.current=void 0},[]),d=v.useCallback(function(y){l(y.type,Rk(y),y.target,s(y,e.lockRef.current))},[]),f=v.useCallback(function(y){l(y.type,up(y),y.target,s(y,e.lockRef.current))},[]);v.useEffect(function(){return As.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,Cs),document.addEventListener("touchmove",u,Cs),document.addEventListener("touchstart",c,Cs),function(){As=As.filter(function(y){return y!==a}),document.removeEventListener("wheel",u,Cs),document.removeEventListener("touchmove",u,Cs),document.removeEventListener("touchstart",c,Cs)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:dV(i)}):null,p?v.createElement(Qz,{gapMode:e.gapMode}):null)}function hV(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const mV=bk(Ek,pV);var Pk=v.forwardRef(function(e,t){return v.createElement(op,Mt({},e,{ref:t,sideCar:mV}))});Pk.classNames=op.classNames;var l1=["Enter"," "],gV=["ArrowDown","PageUp","Home"],Ik=["ArrowUp","PageDown","End"],yV=[...gV,...Ik],vV={ltr:[...l1,"ArrowRight"],rtl:[...l1,"ArrowLeft"]},xV={ltr:["ArrowLeft"],rtl:["ArrowRight"]},El="Menu",[Tl,wV,bV]=BA(El),[io,Ok]=ca(El,[bV,tk,dk]),lp=tk(),Dk=dk(),[EV,ks]=io(El),[TV,_l]=io(El),Lk=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=lp(t),[u,l]=v.useState(null),c=v.useRef(!1),d=Yt(a),f=jA(i);return v.useEffect(()=>{const p=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),E.jsx(cz,{...s,children:E.jsx(EV,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:l,children:E.jsx(TV,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:o,children:r})})})};Lk.displayName=El;var _V="MenuAnchor",c1=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=lp(n);return E.jsx(dz,{...i,...r,ref:t})});c1.displayName=_V;var SV="MenuPortal",[Gre,Mk]=io(SV,{forceMount:void 0}),ur="MenuContent",[CV,d1]=io(ur),Fk=v.forwardRef((e,t)=>{const n=Mk(ur,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ks(ur,e.__scopeMenu),o=_l(ur,e.__scopeMenu);return E.jsx(Tl.Provider,{scope:e.__scopeMenu,children:E.jsx(Jf,{present:r||a.open,children:E.jsx(Tl.Slot,{scope:e.__scopeMenu,children:o.modal?E.jsx(AV,{...i,ref:t}):E.jsx(kV,{...i,ref:t})})})})}),AV=v.forwardRef((e,t)=>{const n=ks(ur,e.__scopeMenu),r=v.useRef(null),i=Cn(t,r);return v.useEffect(()=>{const a=r.current;if(a)return yk(a)},[]),E.jsx(f1,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Fe(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),kV=v.forwardRef((e,t)=>{const n=ks(ur,e.__scopeMenu);return E.jsx(f1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),f1=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...y}=e,w=ks(ur,n),g=_l(ur,n),x=lp(n),b=Dk(n),T=wV(n),[S,_]=v.useState(null),N=v.useRef(null),D=Cn(t,N,w.onContentChange),V=v.useRef(0),P=v.useRef(""),$=v.useRef(0),H=v.useRef(null),X=v.useRef("right"),Y=v.useRef(0),re=m?Pk:v.Fragment,ie=m?{as:bl,allowPinchZoom:!0}:void 0,ee=B=>{var $e,Ve;const A=P.current+B,ae=T().filter(We=>!We.disabled),he=document.activeElement,O=($e=ae.find(We=>We.ref.current===he))==null?void 0:$e.textValue,Pe=ae.map(We=>We.textValue),ge=UV(Pe,A,O),xe=(Ve=ae.find(We=>We.textValue===ge))==null?void 0:Ve.ref.current;(function We(Ge){P.current=Ge,window.clearTimeout(V.current),Ge!==""&&(V.current=window.setTimeout(()=>We(""),1e3))})(A),xe&&setTimeout(()=>xe.focus())};v.useEffect(()=>()=>window.clearTimeout(V.current),[]),WA();const F=v.useCallback(B=>{var ae,he;return X.current===((ae=H.current)==null?void 0:ae.side)&&zV(B,(he=H.current)==null?void 0:he.area)},[]);return E.jsx(CV,{scope:n,searchRef:P,onItemEnter:v.useCallback(B=>{F(B)&&B.preventDefault()},[F]),onItemLeave:v.useCallback(B=>{var A;F(B)||((A=N.current)==null||A.focus(),_(null))},[F]),onTriggerLeave:v.useCallback(B=>{F(B)&&B.preventDefault()},[F]),pointerGraceTimerRef:$,onPointerGraceIntentChange:v.useCallback(B=>{H.current=B},[]),children:E.jsx(re,{...ie,children:E.jsx(GA,{asChild:!0,trapped:i,onMountAutoFocus:Fe(a,B=>{var A;B.preventDefault(),(A=N.current)==null||A.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:E.jsx(zA,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:E.jsx(Az,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:_,onEntryFocus:Fe(u,B=>{g.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:E.jsx(fz,{role:"menu","aria-orientation":"vertical","data-state":eR(w.open),"data-radix-menu-content":"",dir:g.dir,...x,...y,ref:D,style:{outline:"none",...y.style},onKeyDown:Fe(y.onKeyDown,B=>{const ae=B.target.closest("[data-radix-menu-content]")===B.currentTarget,he=B.ctrlKey||B.altKey||B.metaKey,O=B.key.length===1;ae&&(B.key==="Tab"&&B.preventDefault(),!he&&O&&ee(B.key));const Pe=N.current;if(B.target!==Pe||!yV.includes(B.key))return;B.preventDefault();const xe=T().filter($e=>!$e.disabled).map($e=>$e.ref.current);Ik.includes(B.key)&&xe.reverse(),BV(xe)}),onBlur:Fe(e.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(V.current),P.current="")}),onPointerMove:Fe(e.onPointerMove,Cl(B=>{const A=B.target,ae=Y.current!==B.clientX;if(B.currentTarget.contains(A)&&ae){const he=B.clientX>Y.current?"right":"left";X.current=he,Y.current=B.clientX}}))})})})})})})});Fk.displayName=ur;var RV="MenuGroup",p1=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(An.div,{role:"group",...r,ref:t})});p1.displayName=RV;var NV="MenuLabel",Bk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(An.div,{...r,ref:t})});Bk.displayName=NV;var cp="MenuItem",jk="menu.itemSelect",dp=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=v.useRef(null),o=_l(cp,e.__scopeMenu),s=d1(cp,e.__scopeMenu),u=Cn(t,a),l=v.useRef(!1),c=()=>{const d=a.current;if(!n&&d){const f=new CustomEvent(jk,{bubbles:!0,cancelable:!0});d.addEventListener(jk,p=>r==null?void 0:r(p),{once:!0}),FA(d,f),f.defaultPrevented?l.current=!1:o.onClose()}};return E.jsx(Uk,{...i,ref:u,disabled:n,onClick:Fe(e.onClick,c),onPointerDown:d=>{var f;(f=e.onPointerDown)==null||f.call(e,d),l.current=!0},onPointerUp:Fe(e.onPointerUp,d=>{var f;l.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:Fe(e.onKeyDown,d=>{const f=s.searchRef.current!=="";n||f&&d.key===" "||l1.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});dp.displayName=cp;var Uk=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=d1(cp,n),s=Dk(n),u=v.useRef(null),l=Cn(t,u),[c,d]=v.useState(!1),[f,p]=v.useState("");return v.useEffect(()=>{const m=u.current;m&&p((m.textContent??"").trim())},[a.children]),E.jsx(Tl.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:E.jsx(kz,{asChild:!0,...s,focusable:!r,children:E.jsx(An.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:l,onPointerMove:Fe(e.onPointerMove,Cl(m=>{r?o.onItemLeave(m):(o.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Fe(e.onPointerLeave,Cl(m=>o.onItemLeave(m))),onFocus:Fe(e.onFocus,()=>d(!0)),onBlur:Fe(e.onBlur,()=>d(!1))})})})}),PV="MenuCheckboxItem",Hk=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return E.jsx(Yk,{scope:e.__scopeMenu,checked:n,children:E.jsx(dp,{role:"menuitemcheckbox","aria-checked":fp(n)?"mixed":n,...i,ref:t,"data-state":m1(n),onSelect:Fe(i.onSelect,()=>r==null?void 0:r(fp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Hk.displayName=PV;var zk="MenuRadioGroup",[IV,OV]=io(zk,{value:void 0,onValueChange:()=>{}}),Vk=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=Yt(r);return E.jsx(IV,{scope:e.__scopeMenu,value:n,onValueChange:a,children:E.jsx(p1,{...i,ref:t})})});Vk.displayName=zk;var $k="MenuRadioItem",Wk=v.forwardRef((e,t)=>{const{value:n,...r}=e,i=OV($k,e.__scopeMenu),a=n===i.value;return E.jsx(Yk,{scope:e.__scopeMenu,checked:a,children:E.jsx(dp,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":m1(a),onSelect:Fe(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});Wk.displayName=$k;var h1="MenuItemIndicator",[Yk,DV]=io(h1,{checked:!1}),qk=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=DV(h1,n);return E.jsx(Jf,{present:r||fp(a.checked)||a.checked===!0,children:E.jsx(An.span,{...i,ref:t,"data-state":m1(a.checked)})})});qk.displayName=h1;var LV="MenuSeparator",Gk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(An.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Gk.displayName=LV;var MV="MenuArrow",Kk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=lp(n);return E.jsx(pz,{...i,...r,ref:t})});Kk.displayName=MV;var FV="MenuSub",[Kre,Xk]=io(FV),Sl="MenuSubTrigger",Qk=v.forwardRef((e,t)=>{const n=ks(Sl,e.__scopeMenu),r=_l(Sl,e.__scopeMenu),i=Xk(Sl,e.__scopeMenu),a=d1(Sl,e.__scopeMenu),o=v.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=a,l={__scopeMenu:e.__scopeMenu},c=v.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return v.useEffect(()=>c,[c]),v.useEffect(()=>{const d=s.current;return()=>{window.clearTimeout(d),u(null)}},[s,u]),E.jsx(c1,{asChild:!0,...l,children:E.jsx(Uk,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":eR(n.open),...e,ref:Zf(t,i.onTriggerChange),onClick:d=>{var f;(f=e.onClick)==null||f.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Fe(e.onPointerMove,Cl(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Fe(e.onPointerLeave,Cl(d=>{var p,m;c();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const y=(m=n.content)==null?void 0:m.dataset.side,w=y==="right",g=w?-5:5,x=f[w?"left":"right"],b=f[w?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x,y:f.top},{x:b,y:f.top},{x:b,y:f.bottom},{x,y:f.bottom}],side:y}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Fe(e.onKeyDown,d=>{var p;const f=a.searchRef.current!=="";e.disabled||f&&d.key===" "||vV[r.dir].includes(d.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),d.preventDefault())})})})});Qk.displayName=Sl;var Zk="MenuSubContent",Jk=v.forwardRef((e,t)=>{const n=Mk(ur,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ks(ur,e.__scopeMenu),o=_l(ur,e.__scopeMenu),s=Xk(Zk,e.__scopeMenu),u=v.useRef(null),l=Cn(t,u);return E.jsx(Tl.Provider,{scope:e.__scopeMenu,children:E.jsx(Jf,{present:r||a.open,children:E.jsx(Tl.Slot,{scope:e.__scopeMenu,children:E.jsx(f1,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{var d;o.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Fe(e.onFocusOutside,c=>{c.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Fe(e.onEscapeKeyDown,c=>{o.onClose(),c.preventDefault()}),onKeyDown:Fe(e.onKeyDown,c=>{var p;const d=c.currentTarget.contains(c.target),f=xV[o.dir].includes(c.key);d&&f&&(a.onOpenChange(!1),(p=s.trigger)==null||p.focus(),c.preventDefault())})})})})})});Jk.displayName=Zk;function eR(e){return e?"open":"closed"}function fp(e){return e==="indeterminate"}function m1(e){return fp(e)?"indeterminate":e?"checked":"unchecked"}function BV(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function jV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function UV(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=jV(e,Math.max(a,0));i.length===1&&(o=o.filter(l=>l!==n));const u=o.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function HV(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a].x,u=t[a].y,l=t[o].x,c=t[o].y;u>r!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function zV(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return HV(n,t)}function Cl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var VV=Lk,$V=c1,WV=Fk,YV=p1,qV=Bk,GV=dp,KV=Hk,XV=Vk,QV=Wk,ZV=qk,JV=Gk,e$=Kk,t$=Qk,n$=Jk,g1="DropdownMenu",[r$,Xre]=ca(g1,[Ok]),kn=Ok(),[i$,tR]=r$(g1),nR=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,u=kn(t),l=v.useRef(null),[c=!1,d]=$f({prop:i,defaultProp:a,onChange:o});return E.jsx(i$,{scope:t,triggerId:yl(),triggerRef:l,contentId:yl(),open:c,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(f=>!f),[d]),modal:s,children:E.jsx(VV,{...u,open:c,onOpenChange:d,dir:r,modal:s,children:n})})};nR.displayName=g1;var rR="DropdownMenuTrigger",iR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=tR(rR,n),o=kn(n);return E.jsx($V,{asChild:!0,...o,children:E.jsx(An.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Zf(t,a.triggerRef),onPointerDown:Fe(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:Fe(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});iR.displayName=rR;var aR="DropdownMenuContent",oR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=tR(aR,n),a=kn(n),o=v.useRef(!1);return E.jsx(WV,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Fe(e.onCloseAutoFocus,s=>{var u;o.current||(u=i.triggerRef.current)==null||u.focus(),o.current=!1,s.preventDefault()}),onInteractOutside:Fe(e.onInteractOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,c=u.button===2||l;(!i.modal||c)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});oR.displayName=aR;var a$="DropdownMenuGroup",sR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(YV,{...i,...r,ref:t})});sR.displayName=a$;var o$="DropdownMenuLabel",uR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(qV,{...i,...r,ref:t})});uR.displayName=o$;var s$="DropdownMenuItem",lR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(GV,{...i,...r,ref:t})});lR.displayName=s$;var u$="DropdownMenuCheckboxItem",cR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(KV,{...i,...r,ref:t})});cR.displayName=u$;var l$="DropdownMenuRadioGroup",c$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(XV,{...i,...r,ref:t})});c$.displayName=l$;var d$="DropdownMenuRadioItem",dR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(QV,{...i,...r,ref:t})});dR.displayName=d$;var f$="DropdownMenuItemIndicator",fR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(ZV,{...i,...r,ref:t})});fR.displayName=f$;var p$="DropdownMenuSeparator",pR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(JV,{...i,...r,ref:t})});pR.displayName=p$;var h$="DropdownMenuArrow",m$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(e$,{...i,...r,ref:t})});m$.displayName=h$;var g$="DropdownMenuSubTrigger",hR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(t$,{...i,...r,ref:t})});hR.displayName=g$;var y$="DropdownMenuSubContent",mR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(n$,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mR.displayName=y$;var v$=nR,x$=iR,gR=oR,w$=sR,yR=uR,vR=lR,xR=cR,wR=dR,bR=fR,ER=pR,TR=hR,_R=mR;const b$=v$,E$=x$,T$=w$,_$=v.forwardRef(({className:e,inset:t,children:n,...r},i)=>E.jsxs(TR,{ref:i,className:Le("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,E.jsx(x_,{className:"ml-auto"})]}));_$.displayName=TR.displayName;const S$=v.forwardRef(({className:e,...t},n)=>E.jsx(_R,{ref:n,className:Le("z-50 min-w-[8rem] overflow-hidden rounded-2xl border bg-background p-1 text-foreground shadow-2xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));S$.displayName=_R.displayName;const SR=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>E.jsx(gR,{ref:r,sideOffset:t,className:Le("z-50 min-w-[8rem] overflow-hidden rounded-2xl border bg-background p-1 text-foreground shadow-2xl","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));SR.displayName=gR.displayName;const CR=v.forwardRef(({className:e,inset:t,...n},r)=>E.jsx(vt,{children:E.jsx(vR,{ref:r,className:Le("relative flex cursor-default select-none items-center gap-2 rounded-xl px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n})}));CR.displayName=vR.displayName;const C$=v.forwardRef(({className:e,children:t,checked:n,...r},i)=>E.jsxs(xR,{ref:i,className:Le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[E.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(bR,{children:E.jsx(tF,{className:"h-4 w-4"})})}),t]}));C$.displayName=xR.displayName;const A$=v.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(wR,{ref:r,className:Le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[E.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(bR,{children:E.jsx(aF,{className:"h-2 w-2 fill-current"})})}),t]}));A$.displayName=wR.displayName;const k$=v.forwardRef(({className:e,inset:t,...n},r)=>E.jsx(yR,{ref:r,className:Le("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));k$.displayName=yR.displayName;const R$=v.forwardRef(({className:e,...t},n)=>E.jsx(ER,{ref:n,className:Le("-mx-1 my-1 h-px bg-muted",e),...t}));R$.displayName=ER.displayName;function AR({className:e,...t}){return E.jsx("div",{className:Le("animate-pulse rounded-md bg-secondary",e),...t})}function N$(){const e=Ts(),[t,n]=v.useState(!1),{toChatScreen:r}=gl();return E.jsxs(b$,{open:t,onOpenChange:n,children:[E.jsx(E$,{asChild:!0,children:E.jsx(sr,{variant:"ghost",size:"fit",className:"rounded-full",children:E.jsx(oF,{className:"size-4"})})}),E.jsx(SR,{align:"end",className:"min-w-56",children:E.jsx(T$,{children:E.jsxs(CR,{onSelect:()=>{n(!1),r()},children:[E.jsx(ss.div,{initial:{opacity:0,x:-4,rotate:360},animate:{opacity:1,x:0,rotate:0},children:E.jsx(dF,{})}),e.get("new-conversation")]})})})]})}function kR(){var a,o;const{routerState:{screen:e},toSessionsScreen:t}=gl(),{data:n,isLoading:r}=Nf(),i=Qf();return E.jsx("header",{className:"p-2 border-b bg-background",children:E.jsxs("div",{dir:i,className:"flex items-center rtl:flex-row-reverse gap-2",children:[e==="chat"&&E.jsx(sr,{variant:"ghost",size:"fit",className:"rounded-full",onClick:t,children:E.jsx(nF,{className:"size-4"})}),E.jsx("div",{className:Le("flex-1",e==="sessions"&&"pl-2"),children:E.jsx(ir,{mode:"wait",children:r||!((a=n==null?void 0:n.data)!=null&&a.organizationName)?E.jsx(vt,{snapExit:!0,children:E.jsx(AR,{className:"h-5 w-1/2"})},"skeleton"):E.jsx(vt,{children:E.jsx("h2",{className:"font-semibold",children:(o=n==null?void 0:n.data)==null?void 0:o.organizationName})},"organization-name")})}),E.jsx(N$,{})]})})}function P$(e){const t=[];let n=null;return e.forEach(r=>{var i,a,o,s;(!n||((i=n[0])==null?void 0:i.type)!==r.type)&&(n=[],t.push(n)),((a=n[0])==null?void 0:a.type)==="FROM_AGENT"&&r.type==="FROM_AGENT"&&((o=r.agent)==null?void 0:o.id)!==((s=n[0].agent)==null?void 0:s.id)&&(n=[],t.push(n)),n.push(r)}),t}function I$(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_USER"}function O$(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_BOT"}function D$(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_AGENT"}function RR(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Qre(){}function Zre(){}const pn=ga(/[A-Za-z]/),rn=ga(/[\dA-Za-z]/),L$=ga(/[#-'*+\--9=?A-Z^-~]/);function pp(e){return e!==null&&(e<32||e===127)}const y1=ga(/\d/),M$=ga(/[\dA-Fa-f]/),F$=ga(/[!-/:-@[-`{-~]/);function me(e){return e!==null&&e<-2}function Je(e){return e!==null&&(e<0||e===32)}function De(e){return e===-2||e===-1||e===32}const hp=ga(new RegExp("\\p{P}|\\p{S}","u")),ao=ga(/\s/);function ga(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function B$(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const mp=function(e){if(e==null)return z$;if(typeof e=="function")return gp(e);if(typeof e=="object")return Array.isArray(e)?j$(e):U$(e);if(typeof e=="string")return H$(e);throw new Error("Expected function, string, or object as test")};function j$(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mp(e[n]);return gp(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function U$(e){const t=e;return gp(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function H$(e){return gp(t);function t(n){return n&&n.type===e}}function gp(e){return t;function t(n,r,i){return!!(V$(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function z$(){return!0}function V$(e){return e!==null&&typeof e=="object"&&"type"in e}function Jre(e){return e}const NR=[],$$=!0,v1=!1,W$="skip";function PR(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=mp(i),o=r?-1:1;s(e,void 0,[])();function s(u,l,c){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=NR,m,y,w;if((!t||a(u,l,c[c.length-1]||void 0))&&(p=Y$(n(u,c)),p[0]===v1))return p;if("children"in u&&u.children){const g=u;if(g.children&&p[0]!==W$)for(y=(r?g.children.length:-1)+o,w=c.concat(g);y>-1&&y<g.children.length;){const x=g.children[y];if(m=s(x,y,w)(),m[0]===v1)return m;y=typeof m[1]=="number"?m[1]:y+o}}return p}}}function Y$(e){return Array.isArray(e)?e:typeof e=="number"?[$$,e]:e==null?NR:[e]}function q$(e,t,n){const i=mp((n||{}).ignore||[]),a=G$(t);let o=-1;for(;++o<a.length;)PR(e,"text",s);function s(l,c){let d=-1,f;for(;++d<c.length;){const p=c[d],m=f?f.children:void 0;if(i(p,m?m.indexOf(p):void 0,f))return;f=p}if(f)return u(l,c)}function u(l,c){const d=c[c.length-1],f=a[o][0],p=a[o][1];let m=0;const w=d.children.indexOf(l);let g=!1,x=[];f.lastIndex=0;let b=f.exec(l.value);for(;b;){const T=b.index,S={index:b.index,input:b.input,stack:[...c,l]};let _=p(...b,S);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?f.lastIndex=T+1:(m!==T&&x.push({type:"text",value:l.value.slice(m,T)}),Array.isArray(_)?x.push(..._):_&&x.push(_),m=T+b[0].length,g=!0),!f.global)break;b=f.exec(l.value)}return g?(m<l.value.length&&x.push({type:"text",value:l.value.slice(m)}),d.children.splice(w,1,...x)):x=[l],w+x.length}}function G$(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([K$(i[0]),X$(i[1])])}return t}function K$(e){return typeof e=="string"?new RegExp(B$(e),"g"):e}function X$(e){return typeof e=="function"?e:function(){return e}}const x1="phrasing",w1=["autolink","link","image","label"];function Q$(){return{transforms:[iW],enter:{literalAutolink:J$,literalAutolinkEmail:b1,literalAutolinkHttp:b1,literalAutolinkWww:b1},exit:{literalAutolink:rW,literalAutolinkEmail:nW,literalAutolinkHttp:eW,literalAutolinkWww:tW}}}function Z$(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:x1,notInConstruct:w1},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:x1,notInConstruct:w1},{character:":",before:"[ps]",after:"\\/",inConstruct:x1,notInConstruct:w1}]}}function J$(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function b1(e){this.config.enter.autolinkProtocol.call(this,e)}function eW(e){this.config.exit.autolinkProtocol.call(this,e)}function tW(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function nW(e){this.config.exit.autolinkEmail.call(this,e)}function rW(e){this.exit(e)}function iW(e){q$(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aW],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),oW]],{ignore:["link","linkReference"]})}function aW(e,t,n,r,i){let a="";if(!IR(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!sW(n)))return!1;const o=uW(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function oW(e,t,n,r){return!IR(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function sW(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function uW(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=RR(e,"(");let a=RR(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function IR(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ao(n)||hp(n))&&(!t||n!==47)}function kr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}OR.peek=xW;function lW(){return{enter:{gfmFootnoteDefinition:dW,gfmFootnoteDefinitionLabelString:fW,gfmFootnoteCall:mW,gfmFootnoteCallString:gW},exit:{gfmFootnoteDefinition:hW,gfmFootnoteDefinitionLabelString:pW,gfmFootnoteCall:vW,gfmFootnoteCallString:yW}}}function cW(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:wW,footnoteReference:OR}}}function dW(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function fW(){this.buffer()}function pW(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=kr(this.sliceSerialize(e)).toLowerCase()}function hW(e){this.exit(e)}function mW(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function gW(){this.buffer()}function yW(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=kr(this.sliceSerialize(e)).toLowerCase()}function vW(e){this.exit(e)}function OR(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function xW(){return"["}function wW(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteDefinition"),s=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),bW)),o(),a}function bW(e,t,n){return t===0?e:(n?"":" ")+e}const EW=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];DR.peek=AW;function TW(){return{canContainEols:["delete"],enter:{strikethrough:SW},exit:{strikethrough:CW}}}function _W(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:EW}],handlers:{delete:DR}}}function SW(e){this.enter({type:"delete",children:[]},e)}function CW(e){this.exit(e)}function DR(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function AW(){return"~"}function kW(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||NW,i=[],a=[],o=[],s=[];let u=0,l=-1;for(;++l<e.length;){const m=[],y=[];let w=-1;for(e[l].length>u&&(u=e[l].length);++w<e[l].length;){const g=RW(e[l][w]);if(t.alignDelimiters!==!1){const x=r(g);y[w]=x,(s[w]===void 0||x>s[w])&&(s[w]=x)}m.push(g)}a[l]=m,o[l]=y}let c=-1;if(typeof n=="object"&&"length"in n)for(;++c<u;)i[c]=LR(n[c]);else{const m=LR(n);for(;++c<u;)i[c]=m}c=-1;const d=[],f=[];for(;++c<u;){const m=i[c];let y="",w="";m===99?(y=":",w=":"):m===108?y=":":m===114&&(w=":");let g=t.alignDelimiters===!1?1:Math.max(1,s[c]-y.length-w.length);const x=y+"-".repeat(g)+w;t.alignDelimiters!==!1&&(g=y.length+g+w.length,g>s[c]&&(s[c]=g),f[c]=g),d[c]=x}a.splice(1,0,d),o.splice(1,0,f),l=-1;const p=[];for(;++l<a.length;){const m=a[l],y=o[l];c=-1;const w=[];for(;++c<u;){const g=m[c]||"";let x="",b="";if(t.alignDelimiters!==!1){const T=s[c]-(y[c]||0),S=i[c];S===114?x=" ".repeat(T):S===99?T%2?(x=" ".repeat(T/2+.5),b=" ".repeat(T/2-.5)):(x=" ".repeat(T/2),b=x):b=" ".repeat(T)}t.delimiterStart!==!1&&!c&&w.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&g==="")&&(t.delimiterStart!==!1||c)&&w.push(" "),t.alignDelimiters!==!1&&w.push(x),w.push(g),t.alignDelimiters!==!1&&w.push(b),t.padding!==!1&&w.push(" "),(t.delimiterEnd!==!1||c!==u-1)&&w.push("|")}p.push(t.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return p.join(`
381
+ `)},fV=0,As=[];function pV(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(fV++)[0],a=v.useState(s1)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=of([e.lockRef.current],(e.shards||[]).map(Nk),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(y,w){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var g=up(y),x=n.current,b="deltaX"in y?y.deltaX:x[0]-g[0],T="deltaY"in y?y.deltaY:x[1]-g[1],S,_=y.target,N=Math.abs(b)>Math.abs(T)?"h":"v";if("touches"in y&&N==="h"&&_.type==="range")return!1;var D=Ck(N,_);if(!D)return!0;if(D?S=N:(S=N==="v"?"h":"v",D=Ck(N,_)),!D)return!1;if(!r.current&&"changedTouches"in y&&(b||T)&&(r.current=S),!S)return!0;var V=r.current||S;return lV(V,w,y,V==="h"?b:T,!0)},[]),u=v.useCallback(function(y){var w=y;if(!(!As.length||As[As.length-1]!==a)){var g="deltaY"in w?Rk(w):up(w),x=t.current.filter(function(S){return S.name===w.type&&(S.target===w.target||w.target===S.shadowParent)&&cV(S.delta,g)})[0];if(x&&x.should){w.cancelable&&w.preventDefault();return}if(!x){var b=(o.current.shards||[]).map(Nk).filter(Boolean).filter(function(S){return S.contains(w.target)}),T=b.length>0?s(w,b[0]):!o.current.noIsolation;T&&w.cancelable&&w.preventDefault()}}},[]),l=v.useCallback(function(y,w,g,x){var b={name:y,delta:w,target:g,should:x,shadowParent:hV(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(T){return T!==b})},1)},[]),c=v.useCallback(function(y){n.current=up(y),r.current=void 0},[]),d=v.useCallback(function(y){l(y.type,Rk(y),y.target,s(y,e.lockRef.current))},[]),f=v.useCallback(function(y){l(y.type,up(y),y.target,s(y,e.lockRef.current))},[]);v.useEffect(function(){return As.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,Cs),document.addEventListener("touchmove",u,Cs),document.addEventListener("touchstart",c,Cs),function(){As=As.filter(function(y){return y!==a}),document.removeEventListener("wheel",u,Cs),document.removeEventListener("touchmove",u,Cs),document.removeEventListener("touchstart",c,Cs)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:dV(i)}):null,p?v.createElement(Qz,{gapMode:e.gapMode}):null)}function hV(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const mV=bk(Ek,pV);var Pk=v.forwardRef(function(e,t){return v.createElement(op,Mt({},e,{ref:t,sideCar:mV}))});Pk.classNames=op.classNames;var l1=["Enter"," "],gV=["ArrowDown","PageUp","Home"],Ik=["ArrowUp","PageDown","End"],yV=[...gV,...Ik],vV={ltr:[...l1,"ArrowRight"],rtl:[...l1,"ArrowLeft"]},xV={ltr:["ArrowLeft"],rtl:["ArrowRight"]},El="Menu",[Tl,wV,bV]=BA(El),[io,Ok]=ca(El,[bV,tk,dk]),lp=tk(),Dk=dk(),[EV,ks]=io(El),[TV,_l]=io(El),Lk=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=lp(t),[u,l]=v.useState(null),c=v.useRef(!1),d=Yt(a),f=jA(i);return v.useEffect(()=>{const p=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),E.jsx(cz,{...s,children:E.jsx(EV,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:l,children:E.jsx(TV,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:o,children:r})})})};Lk.displayName=El;var _V="MenuAnchor",c1=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=lp(n);return E.jsx(dz,{...i,...r,ref:t})});c1.displayName=_V;var SV="MenuPortal",[Gre,Mk]=io(SV,{forceMount:void 0}),ur="MenuContent",[CV,d1]=io(ur),Fk=v.forwardRef((e,t)=>{const n=Mk(ur,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ks(ur,e.__scopeMenu),o=_l(ur,e.__scopeMenu);return E.jsx(Tl.Provider,{scope:e.__scopeMenu,children:E.jsx(Jf,{present:r||a.open,children:E.jsx(Tl.Slot,{scope:e.__scopeMenu,children:o.modal?E.jsx(AV,{...i,ref:t}):E.jsx(kV,{...i,ref:t})})})})}),AV=v.forwardRef((e,t)=>{const n=ks(ur,e.__scopeMenu),r=v.useRef(null),i=Cn(t,r);return v.useEffect(()=>{const a=r.current;if(a)return yk(a)},[]),E.jsx(f1,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Fe(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),kV=v.forwardRef((e,t)=>{const n=ks(ur,e.__scopeMenu);return E.jsx(f1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),f1=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...y}=e,w=ks(ur,n),g=_l(ur,n),x=lp(n),b=Dk(n),T=wV(n),[S,_]=v.useState(null),N=v.useRef(null),D=Cn(t,N,w.onContentChange),V=v.useRef(0),P=v.useRef(""),$=v.useRef(0),H=v.useRef(null),X=v.useRef("right"),Y=v.useRef(0),re=m?Pk:v.Fragment,ie=m?{as:bl,allowPinchZoom:!0}:void 0,ee=B=>{var $e,Ve;const A=P.current+B,ae=T().filter(We=>!We.disabled),he=document.activeElement,O=($e=ae.find(We=>We.ref.current===he))==null?void 0:$e.textValue,Pe=ae.map(We=>We.textValue),ge=UV(Pe,A,O),xe=(Ve=ae.find(We=>We.textValue===ge))==null?void 0:Ve.ref.current;(function We(Ge){P.current=Ge,window.clearTimeout(V.current),Ge!==""&&(V.current=window.setTimeout(()=>We(""),1e3))})(A),xe&&setTimeout(()=>xe.focus())};v.useEffect(()=>()=>window.clearTimeout(V.current),[]),WA();const F=v.useCallback(B=>{var ae,he;return X.current===((ae=H.current)==null?void 0:ae.side)&&zV(B,(he=H.current)==null?void 0:he.area)},[]);return E.jsx(CV,{scope:n,searchRef:P,onItemEnter:v.useCallback(B=>{F(B)&&B.preventDefault()},[F]),onItemLeave:v.useCallback(B=>{var A;F(B)||((A=N.current)==null||A.focus(),_(null))},[F]),onTriggerLeave:v.useCallback(B=>{F(B)&&B.preventDefault()},[F]),pointerGraceTimerRef:$,onPointerGraceIntentChange:v.useCallback(B=>{H.current=B},[]),children:E.jsx(re,{...ie,children:E.jsx(GA,{asChild:!0,trapped:i,onMountAutoFocus:Fe(a,B=>{var A;B.preventDefault(),(A=N.current)==null||A.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:E.jsx(zA,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:E.jsx(Az,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:_,onEntryFocus:Fe(u,B=>{g.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:E.jsx(fz,{role:"menu","aria-orientation":"vertical","data-state":eR(w.open),"data-radix-menu-content":"",dir:g.dir,...x,...y,ref:D,style:{outline:"none",...y.style},onKeyDown:Fe(y.onKeyDown,B=>{const ae=B.target.closest("[data-radix-menu-content]")===B.currentTarget,he=B.ctrlKey||B.altKey||B.metaKey,O=B.key.length===1;ae&&(B.key==="Tab"&&B.preventDefault(),!he&&O&&ee(B.key));const Pe=N.current;if(B.target!==Pe||!yV.includes(B.key))return;B.preventDefault();const xe=T().filter($e=>!$e.disabled).map($e=>$e.ref.current);Ik.includes(B.key)&&xe.reverse(),BV(xe)}),onBlur:Fe(e.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(V.current),P.current="")}),onPointerMove:Fe(e.onPointerMove,Cl(B=>{const A=B.target,ae=Y.current!==B.clientX;if(B.currentTarget.contains(A)&&ae){const he=B.clientX>Y.current?"right":"left";X.current=he,Y.current=B.clientX}}))})})})})})})});Fk.displayName=ur;var RV="MenuGroup",p1=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(An.div,{role:"group",...r,ref:t})});p1.displayName=RV;var NV="MenuLabel",Bk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(An.div,{...r,ref:t})});Bk.displayName=NV;var cp="MenuItem",jk="menu.itemSelect",dp=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=v.useRef(null),o=_l(cp,e.__scopeMenu),s=d1(cp,e.__scopeMenu),u=Cn(t,a),l=v.useRef(!1),c=()=>{const d=a.current;if(!n&&d){const f=new CustomEvent(jk,{bubbles:!0,cancelable:!0});d.addEventListener(jk,p=>r==null?void 0:r(p),{once:!0}),FA(d,f),f.defaultPrevented?l.current=!1:o.onClose()}};return E.jsx(Uk,{...i,ref:u,disabled:n,onClick:Fe(e.onClick,c),onPointerDown:d=>{var f;(f=e.onPointerDown)==null||f.call(e,d),l.current=!0},onPointerUp:Fe(e.onPointerUp,d=>{var f;l.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:Fe(e.onKeyDown,d=>{const f=s.searchRef.current!=="";n||f&&d.key===" "||l1.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});dp.displayName=cp;var Uk=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=d1(cp,n),s=Dk(n),u=v.useRef(null),l=Cn(t,u),[c,d]=v.useState(!1),[f,p]=v.useState("");return v.useEffect(()=>{const m=u.current;m&&p((m.textContent??"").trim())},[a.children]),E.jsx(Tl.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:E.jsx(kz,{asChild:!0,...s,focusable:!r,children:E.jsx(An.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:l,onPointerMove:Fe(e.onPointerMove,Cl(m=>{r?o.onItemLeave(m):(o.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Fe(e.onPointerLeave,Cl(m=>o.onItemLeave(m))),onFocus:Fe(e.onFocus,()=>d(!0)),onBlur:Fe(e.onBlur,()=>d(!1))})})})}),PV="MenuCheckboxItem",Hk=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return E.jsx(Yk,{scope:e.__scopeMenu,checked:n,children:E.jsx(dp,{role:"menuitemcheckbox","aria-checked":fp(n)?"mixed":n,...i,ref:t,"data-state":m1(n),onSelect:Fe(i.onSelect,()=>r==null?void 0:r(fp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Hk.displayName=PV;var zk="MenuRadioGroup",[IV,OV]=io(zk,{value:void 0,onValueChange:()=>{}}),Vk=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=Yt(r);return E.jsx(IV,{scope:e.__scopeMenu,value:n,onValueChange:a,children:E.jsx(p1,{...i,ref:t})})});Vk.displayName=zk;var $k="MenuRadioItem",Wk=v.forwardRef((e,t)=>{const{value:n,...r}=e,i=OV($k,e.__scopeMenu),a=n===i.value;return E.jsx(Yk,{scope:e.__scopeMenu,checked:a,children:E.jsx(dp,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":m1(a),onSelect:Fe(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});Wk.displayName=$k;var h1="MenuItemIndicator",[Yk,DV]=io(h1,{checked:!1}),qk=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=DV(h1,n);return E.jsx(Jf,{present:r||fp(a.checked)||a.checked===!0,children:E.jsx(An.span,{...i,ref:t,"data-state":m1(a.checked)})})});qk.displayName=h1;var LV="MenuSeparator",Gk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(An.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Gk.displayName=LV;var MV="MenuArrow",Kk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=lp(n);return E.jsx(pz,{...i,...r,ref:t})});Kk.displayName=MV;var FV="MenuSub",[Kre,Xk]=io(FV),Sl="MenuSubTrigger",Qk=v.forwardRef((e,t)=>{const n=ks(Sl,e.__scopeMenu),r=_l(Sl,e.__scopeMenu),i=Xk(Sl,e.__scopeMenu),a=d1(Sl,e.__scopeMenu),o=v.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=a,l={__scopeMenu:e.__scopeMenu},c=v.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return v.useEffect(()=>c,[c]),v.useEffect(()=>{const d=s.current;return()=>{window.clearTimeout(d),u(null)}},[s,u]),E.jsx(c1,{asChild:!0,...l,children:E.jsx(Uk,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":eR(n.open),...e,ref:Zf(t,i.onTriggerChange),onClick:d=>{var f;(f=e.onClick)==null||f.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Fe(e.onPointerMove,Cl(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Fe(e.onPointerLeave,Cl(d=>{var p,m;c();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const y=(m=n.content)==null?void 0:m.dataset.side,w=y==="right",g=w?-5:5,x=f[w?"left":"right"],b=f[w?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x,y:f.top},{x:b,y:f.top},{x:b,y:f.bottom},{x,y:f.bottom}],side:y}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Fe(e.onKeyDown,d=>{var p;const f=a.searchRef.current!=="";e.disabled||f&&d.key===" "||vV[r.dir].includes(d.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),d.preventDefault())})})})});Qk.displayName=Sl;var Zk="MenuSubContent",Jk=v.forwardRef((e,t)=>{const n=Mk(ur,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ks(ur,e.__scopeMenu),o=_l(ur,e.__scopeMenu),s=Xk(Zk,e.__scopeMenu),u=v.useRef(null),l=Cn(t,u);return E.jsx(Tl.Provider,{scope:e.__scopeMenu,children:E.jsx(Jf,{present:r||a.open,children:E.jsx(Tl.Slot,{scope:e.__scopeMenu,children:E.jsx(f1,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{var d;o.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Fe(e.onFocusOutside,c=>{c.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Fe(e.onEscapeKeyDown,c=>{o.onClose(),c.preventDefault()}),onKeyDown:Fe(e.onKeyDown,c=>{var p;const d=c.currentTarget.contains(c.target),f=xV[o.dir].includes(c.key);d&&f&&(a.onOpenChange(!1),(p=s.trigger)==null||p.focus(),c.preventDefault())})})})})})});Jk.displayName=Zk;function eR(e){return e?"open":"closed"}function fp(e){return e==="indeterminate"}function m1(e){return fp(e)?"indeterminate":e?"checked":"unchecked"}function BV(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function jV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function UV(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=jV(e,Math.max(a,0));i.length===1&&(o=o.filter(l=>l!==n));const u=o.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function HV(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a].x,u=t[a].y,l=t[o].x,c=t[o].y;u>r!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function zV(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return HV(n,t)}function Cl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var VV=Lk,$V=c1,WV=Fk,YV=p1,qV=Bk,GV=dp,KV=Hk,XV=Vk,QV=Wk,ZV=qk,JV=Gk,e$=Kk,t$=Qk,n$=Jk,g1="DropdownMenu",[r$,Xre]=ca(g1,[Ok]),kn=Ok(),[i$,tR]=r$(g1),nR=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,u=kn(t),l=v.useRef(null),[c=!1,d]=$f({prop:i,defaultProp:a,onChange:o});return E.jsx(i$,{scope:t,triggerId:yl(),triggerRef:l,contentId:yl(),open:c,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(f=>!f),[d]),modal:s,children:E.jsx(VV,{...u,open:c,onOpenChange:d,dir:r,modal:s,children:n})})};nR.displayName=g1;var rR="DropdownMenuTrigger",iR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=tR(rR,n),o=kn(n);return E.jsx($V,{asChild:!0,...o,children:E.jsx(An.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Zf(t,a.triggerRef),onPointerDown:Fe(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:Fe(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});iR.displayName=rR;var aR="DropdownMenuContent",oR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=tR(aR,n),a=kn(n),o=v.useRef(!1);return E.jsx(WV,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Fe(e.onCloseAutoFocus,s=>{var u;o.current||(u=i.triggerRef.current)==null||u.focus(),o.current=!1,s.preventDefault()}),onInteractOutside:Fe(e.onInteractOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,c=u.button===2||l;(!i.modal||c)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});oR.displayName=aR;var a$="DropdownMenuGroup",sR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(YV,{...i,...r,ref:t})});sR.displayName=a$;var o$="DropdownMenuLabel",uR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(qV,{...i,...r,ref:t})});uR.displayName=o$;var s$="DropdownMenuItem",lR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(GV,{...i,...r,ref:t})});lR.displayName=s$;var u$="DropdownMenuCheckboxItem",cR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(KV,{...i,...r,ref:t})});cR.displayName=u$;var l$="DropdownMenuRadioGroup",c$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(XV,{...i,...r,ref:t})});c$.displayName=l$;var d$="DropdownMenuRadioItem",dR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(QV,{...i,...r,ref:t})});dR.displayName=d$;var f$="DropdownMenuItemIndicator",fR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(ZV,{...i,...r,ref:t})});fR.displayName=f$;var p$="DropdownMenuSeparator",pR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(JV,{...i,...r,ref:t})});pR.displayName=p$;var h$="DropdownMenuArrow",m$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(e$,{...i,...r,ref:t})});m$.displayName=h$;var g$="DropdownMenuSubTrigger",hR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(t$,{...i,...r,ref:t})});hR.displayName=g$;var y$="DropdownMenuSubContent",mR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kn(n);return E.jsx(n$,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mR.displayName=y$;var v$=nR,x$=iR,gR=oR,w$=sR,yR=uR,vR=lR,xR=cR,wR=dR,bR=fR,ER=pR,TR=hR,_R=mR;const b$=v$,E$=x$,T$=w$,_$=v.forwardRef(({className:e,inset:t,children:n,...r},i)=>E.jsxs(TR,{ref:i,className:Le("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,E.jsx(x2,{className:"ml-auto"})]}));_$.displayName=TR.displayName;const S$=v.forwardRef(({className:e,...t},n)=>E.jsx(_R,{ref:n,className:Le("z-50 min-w-[8rem] overflow-hidden rounded-2xl border bg-background p-1 text-foreground shadow-2xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));S$.displayName=_R.displayName;const SR=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>E.jsx(gR,{ref:r,sideOffset:t,className:Le("z-50 min-w-[8rem] overflow-hidden rounded-2xl border bg-background p-1 text-foreground shadow-2xl","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));SR.displayName=gR.displayName;const CR=v.forwardRef(({className:e,inset:t,...n},r)=>E.jsx(vt,{children:E.jsx(vR,{ref:r,className:Le("relative flex cursor-default select-none items-center gap-2 rounded-xl px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n})}));CR.displayName=vR.displayName;const C$=v.forwardRef(({className:e,children:t,checked:n,...r},i)=>E.jsxs(xR,{ref:i,className:Le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[E.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(bR,{children:E.jsx(tF,{className:"h-4 w-4"})})}),t]}));C$.displayName=xR.displayName;const A$=v.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(wR,{ref:r,className:Le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[E.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(bR,{children:E.jsx(aF,{className:"h-2 w-2 fill-current"})})}),t]}));A$.displayName=wR.displayName;const k$=v.forwardRef(({className:e,inset:t,...n},r)=>E.jsx(yR,{ref:r,className:Le("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));k$.displayName=yR.displayName;const R$=v.forwardRef(({className:e,...t},n)=>E.jsx(ER,{ref:n,className:Le("-mx-1 my-1 h-px bg-muted",e),...t}));R$.displayName=ER.displayName;function AR({className:e,...t}){return E.jsx("div",{className:Le("animate-pulse rounded-md bg-secondary",e),...t})}function N$(){const e=Ts(),[t,n]=v.useState(!1),{toChatScreen:r}=gl();return E.jsxs(b$,{open:t,onOpenChange:n,children:[E.jsx(E$,{asChild:!0,children:E.jsx(sr,{variant:"ghost",size:"fit",className:"rounded-full",children:E.jsx(oF,{className:"size-4"})})}),E.jsx(SR,{align:"end",className:"min-w-56",children:E.jsx(T$,{children:E.jsxs(CR,{onSelect:()=>{n(!1),r()},children:[E.jsx(ss.div,{initial:{opacity:0,x:-4,rotate:360},animate:{opacity:1,x:0,rotate:0},children:E.jsx(dF,{})}),e.get("new-conversation")]})})})]})}function kR(){var a,o;const{routerState:{screen:e},toSessionsScreen:t}=gl(),{data:n,isLoading:r}=Nf(),i=Qf();return E.jsx("header",{className:"p-2 border-b bg-background",children:E.jsxs("div",{dir:i,className:"flex items-center rtl:flex-row-reverse gap-2",children:[e==="chat"&&E.jsx(sr,{variant:"ghost",size:"fit",className:"rounded-full",onClick:t,children:E.jsx(nF,{className:"size-4"})}),E.jsx("div",{className:Le("flex-1",e==="sessions"&&"pl-2"),children:E.jsx(ir,{mode:"wait",children:r||!((a=n==null?void 0:n.data)!=null&&a.organizationName)?E.jsx(vt,{snapExit:!0,children:E.jsx(AR,{className:"h-5 w-1/2"})},"skeleton"):E.jsx(vt,{children:E.jsx("h2",{className:"font-semibold",children:(o=n==null?void 0:n.data)==null?void 0:o.organizationName})},"organization-name")})}),E.jsx(N$,{})]})})}function P$(e){const t=[];let n=null;return e.forEach(r=>{var i,a,o,s;(!n||((i=n[0])==null?void 0:i.type)!==r.type)&&(n=[],t.push(n)),((a=n[0])==null?void 0:a.type)==="FROM_AGENT"&&r.type==="FROM_AGENT"&&((o=r.agent)==null?void 0:o.id)!==((s=n[0].agent)==null?void 0:s.id)&&(n=[],t.push(n)),n.push(r)}),t}function I$(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_USER"}function O$(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_BOT"}function D$(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_AGENT"}function RR(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Qre(){}function Zre(){}const pn=ga(/[A-Za-z]/),rn=ga(/[\dA-Za-z]/),L$=ga(/[#-'*+\--9=?A-Z^-~]/);function pp(e){return e!==null&&(e<32||e===127)}const y1=ga(/\d/),M$=ga(/[\dA-Fa-f]/),F$=ga(/[!-/:-@[-`{-~]/);function me(e){return e!==null&&e<-2}function Je(e){return e!==null&&(e<0||e===32)}function De(e){return e===-2||e===-1||e===32}const hp=ga(new RegExp("\\p{P}|\\p{S}","u")),ao=ga(/\s/);function ga(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function B$(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const mp=function(e){if(e==null)return z$;if(typeof e=="function")return gp(e);if(typeof e=="object")return Array.isArray(e)?j$(e):U$(e);if(typeof e=="string")return H$(e);throw new Error("Expected function, string, or object as test")};function j$(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mp(e[n]);return gp(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function U$(e){const t=e;return gp(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function H$(e){return gp(t);function t(n){return n&&n.type===e}}function gp(e){return t;function t(n,r,i){return!!(V$(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function z$(){return!0}function V$(e){return e!==null&&typeof e=="object"&&"type"in e}function Jre(e){return e}const NR=[],$$=!0,v1=!1,W$="skip";function PR(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=mp(i),o=r?-1:1;s(e,void 0,[])();function s(u,l,c){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=NR,m,y,w;if((!t||a(u,l,c[c.length-1]||void 0))&&(p=Y$(n(u,c)),p[0]===v1))return p;if("children"in u&&u.children){const g=u;if(g.children&&p[0]!==W$)for(y=(r?g.children.length:-1)+o,w=c.concat(g);y>-1&&y<g.children.length;){const x=g.children[y];if(m=s(x,y,w)(),m[0]===v1)return m;y=typeof m[1]=="number"?m[1]:y+o}}return p}}}function Y$(e){return Array.isArray(e)?e:typeof e=="number"?[$$,e]:e==null?NR:[e]}function q$(e,t,n){const i=mp((n||{}).ignore||[]),a=G$(t);let o=-1;for(;++o<a.length;)PR(e,"text",s);function s(l,c){let d=-1,f;for(;++d<c.length;){const p=c[d],m=f?f.children:void 0;if(i(p,m?m.indexOf(p):void 0,f))return;f=p}if(f)return u(l,c)}function u(l,c){const d=c[c.length-1],f=a[o][0],p=a[o][1];let m=0;const w=d.children.indexOf(l);let g=!1,x=[];f.lastIndex=0;let b=f.exec(l.value);for(;b;){const T=b.index,S={index:b.index,input:b.input,stack:[...c,l]};let _=p(...b,S);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?f.lastIndex=T+1:(m!==T&&x.push({type:"text",value:l.value.slice(m,T)}),Array.isArray(_)?x.push(..._):_&&x.push(_),m=T+b[0].length,g=!0),!f.global)break;b=f.exec(l.value)}return g?(m<l.value.length&&x.push({type:"text",value:l.value.slice(m)}),d.children.splice(w,1,...x)):x=[l],w+x.length}}function G$(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([K$(i[0]),X$(i[1])])}return t}function K$(e){return typeof e=="string"?new RegExp(B$(e),"g"):e}function X$(e){return typeof e=="function"?e:function(){return e}}const x1="phrasing",w1=["autolink","link","image","label"];function Q$(){return{transforms:[iW],enter:{literalAutolink:J$,literalAutolinkEmail:b1,literalAutolinkHttp:b1,literalAutolinkWww:b1},exit:{literalAutolink:rW,literalAutolinkEmail:nW,literalAutolinkHttp:eW,literalAutolinkWww:tW}}}function Z$(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:x1,notInConstruct:w1},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:x1,notInConstruct:w1},{character:":",before:"[ps]",after:"\\/",inConstruct:x1,notInConstruct:w1}]}}function J$(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function b1(e){this.config.enter.autolinkProtocol.call(this,e)}function eW(e){this.config.exit.autolinkProtocol.call(this,e)}function tW(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function nW(e){this.config.exit.autolinkEmail.call(this,e)}function rW(e){this.exit(e)}function iW(e){q$(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aW],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),oW]],{ignore:["link","linkReference"]})}function aW(e,t,n,r,i){let a="";if(!IR(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!sW(n)))return!1;const o=uW(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function oW(e,t,n,r){return!IR(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function sW(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function uW(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=RR(e,"(");let a=RR(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function IR(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ao(n)||hp(n))&&(!t||n!==47)}function kr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}OR.peek=xW;function lW(){return{enter:{gfmFootnoteDefinition:dW,gfmFootnoteDefinitionLabelString:fW,gfmFootnoteCall:mW,gfmFootnoteCallString:gW},exit:{gfmFootnoteDefinition:hW,gfmFootnoteDefinitionLabelString:pW,gfmFootnoteCall:vW,gfmFootnoteCallString:yW}}}function cW(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:wW,footnoteReference:OR}}}function dW(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function fW(){this.buffer()}function pW(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=kr(this.sliceSerialize(e)).toLowerCase()}function hW(e){this.exit(e)}function mW(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function gW(){this.buffer()}function yW(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=kr(this.sliceSerialize(e)).toLowerCase()}function vW(e){this.exit(e)}function OR(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function xW(){return"["}function wW(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteDefinition"),s=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),bW)),o(),a}function bW(e,t,n){return t===0?e:(n?"":" ")+e}const EW=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];DR.peek=AW;function TW(){return{canContainEols:["delete"],enter:{strikethrough:SW},exit:{strikethrough:CW}}}function _W(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:EW}],handlers:{delete:DR}}}function SW(e){this.enter({type:"delete",children:[]},e)}function CW(e){this.exit(e)}function DR(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function AW(){return"~"}function kW(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||NW,i=[],a=[],o=[],s=[];let u=0,l=-1;for(;++l<e.length;){const m=[],y=[];let w=-1;for(e[l].length>u&&(u=e[l].length);++w<e[l].length;){const g=RW(e[l][w]);if(t.alignDelimiters!==!1){const x=r(g);y[w]=x,(s[w]===void 0||x>s[w])&&(s[w]=x)}m.push(g)}a[l]=m,o[l]=y}let c=-1;if(typeof n=="object"&&"length"in n)for(;++c<u;)i[c]=LR(n[c]);else{const m=LR(n);for(;++c<u;)i[c]=m}c=-1;const d=[],f=[];for(;++c<u;){const m=i[c];let y="",w="";m===99?(y=":",w=":"):m===108?y=":":m===114&&(w=":");let g=t.alignDelimiters===!1?1:Math.max(1,s[c]-y.length-w.length);const x=y+"-".repeat(g)+w;t.alignDelimiters!==!1&&(g=y.length+g+w.length,g>s[c]&&(s[c]=g),f[c]=g),d[c]=x}a.splice(1,0,d),o.splice(1,0,f),l=-1;const p=[];for(;++l<a.length;){const m=a[l],y=o[l];c=-1;const w=[];for(;++c<u;){const g=m[c]||"";let x="",b="";if(t.alignDelimiters!==!1){const T=s[c]-(y[c]||0),S=i[c];S===114?x=" ".repeat(T):S===99?T%2?(x=" ".repeat(T/2+.5),b=" ".repeat(T/2-.5)):(x=" ".repeat(T/2),b=x):b=" ".repeat(T)}t.delimiterStart!==!1&&!c&&w.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&g==="")&&(t.delimiterStart!==!1||c)&&w.push(" "),t.alignDelimiters!==!1&&w.push(x),w.push(g),t.alignDelimiters!==!1&&w.push(b),t.padding!==!1&&w.push(" "),(t.delimiterEnd!==!1||c!==u-1)&&w.push("|")}p.push(t.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return p.join(`
382
382
  `)}function RW(e){return e==null?"":String(e)}function NW(e){return e.length}function LR(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const MR={}.hasOwnProperty;function FR(e,t){const n=t||{};function r(i,...a){let o=r.invalid;const s=r.handlers;if(i&&MR.call(i,e)){const u=String(i[e]);o=MR.call(s,u)?s[u]:r.unknown}if(o)return o.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function PW(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),IW);return i(),o}function IW(e,t,n){return">"+(n?"":" ")+e}function OW(e,t){return BR(e,t.inConstruct,!0)&&!BR(e,t.notInConstruct,!1)}function BR(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function jR(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
383
383
  `&&OW(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
384
384
  `}function DW(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function LW(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function MW(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function FW(e,t,n,r){const i=MW(n),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(LW(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(a,BW);return d(),f}const s=n.createTracker(r),u=i.repeat(Math.max(DW(a,i)+1,3)),l=n.enter("codeFenced");let c=s.move(u);if(e.lang){const d=n.enter(`codeFencedLang${o}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${o}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
@@ -406,7 +406,7 @@ to {
406
406
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
407
407
  `}),n}function wN(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function bN(e,t){const n=TX(e,t),r=n.one(e,void 0),i=bX(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
408
408
  `},i),a}function kX(e,t){return e&&"run"in e?async function(n,r){const i=bN(n,{file:r,...t});await e.run(i,r)}:function(n,r){return bN(n,{file:r,...e||t})}}function EN(e){if(e)throw e}var Rp=Object.prototype.hasOwnProperty,TN=Object.prototype.toString,_N=Object.defineProperty,SN=Object.getOwnPropertyDescriptor,CN=function(t){return typeof Array.isArray=="function"?Array.isArray(t):TN.call(t)==="[object Array]"},AN=function(t){if(!t||TN.call(t)!=="[object Object]")return!1;var n=Rp.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Rp.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Rp.call(t,i)},kN=function(t,n){_N&&n.name==="__proto__"?_N(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},RN=function(t,n){if(n==="__proto__")if(Rp.call(t,n)){if(SN)return SN(t,n).value}else return;return t[n]},RX=function e(){var t,n,r,i,a,o,s=arguments[0],u=1,l=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<l;++u)if(t=arguments[u],t!=null)for(n in t)r=RN(s,n),i=RN(t,n),s!==i&&(c&&i&&(AN(i)||(a=CN(i)))?(a?(a=!1,o=r&&CN(r)?r:[]):o=r&&AN(r)?r:{},kN(s,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&kN(s,{name:n,newValue:i}));return s};const Y1=Ct(RX);function q1(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function NX(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(u,...l){const c=e[++a];let d=-1;if(u){o(u);return}for(;++d<i.length;)(l[d]===null||l[d]===void 0)&&(l[d]=i[d]);i=l,c?PX(c,s)(...l):o(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function PX(e,t){let n;return r;function r(...o){const s=e.length>o.length;let u;s&&o.push(i);try{u=e.apply(this,o)}catch(l){const c=l;if(s&&n)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(o,...s){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const Kr={basename:IX,dirname:OX,extname:DX,join:LX,sep:"/"};function IX(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ml(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function OX(e){if(Ml(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function DX(e){Ml(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function LX(...e){let t=-1,n;for(;++t<e.length;)Ml(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":MX(n)}function MX(e){Ml(e);const t=e.codePointAt(0)===47;let n=FX(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function FX(e,t){let n="",r=0,i=-1,a=0,o=-1,s,u;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Ml(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const BX={cwd:jX};function jX(){return"/"}function G1(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function UX(e){if(typeof e=="string")e=new URL(e);else if(!G1(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return HX(e)}function HX(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const K1=["history","path","basename","stem","extname","dirname"];class NN{constructor(t){let n;t?G1(t)?n={path:t}:typeof t=="string"||zX(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":BX.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<K1.length;){const a=K1[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)K1.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Kr.basename(this.path):void 0}set basename(t){Q1(t,"basename"),X1(t,"basename"),this.path=Kr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Kr.dirname(this.path):void 0}set dirname(t){PN(this.basename,"dirname"),this.path=Kr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Kr.extname(this.path):void 0}set extname(t){if(X1(t,"extname"),PN(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Kr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){G1(t)&&(t=UX(t)),Q1(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Kr.basename(this.path,this.extname):void 0}set stem(t){Q1(t,"stem"),X1(t,"stem"),this.path=Kr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new an(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function X1(e,t){if(e&&e.includes(Kr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Kr.sep+"`")}function Q1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function PN(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function zX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const VX=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},$X={}.hasOwnProperty;class Z1 extends VX{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=NX()}copy(){const t=new Z1;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Y1(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(tv("data",this.frozen),this.namespace[t]=n,this):$X.call(this.namespace,t)&&this.namespace[t]||void 0:t?(tv("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Np(t),r=this.parser||this.Parser;return J1("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),J1("process",this.parser||this.Parser),ev("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const s=Np(t),u=r.parse(s);r.run(u,s,function(c,d,f){if(c||!d||!f)return l(c);const p=d,m=r.stringify(p,f);qX(m)?f.value=m:f.result=m,l(c,f)});function l(c,d){c||!d?o(c):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),J1("processSync",this.parser||this.Parser),ev("processSync",this.compiler||this.Compiler),this.process(t,i),ON("processSync","process",n),r;function i(a,o){n=!0,EN(a),r=o}}run(t,n,r){IN(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,s){const u=Np(n);i.run(t,u,l);function l(c,d,f){const p=d||t;c?s(c):o?o(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),ON("runSync","run",r),i;function a(o,s){EN(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=Np(n),i=this.compiler||this.Compiler;return ev("stringify",i),IN(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(tv("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...d]=l;u(c,d)}else o(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function o(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(l.plugins),l.settings&&(i.settings=Y1(!0,i.settings,l.settings))}function s(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const d=l[c];a(d)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===l){f=d;break}if(f===-1)r.push([l,...c]);else if(c.length>0){let[p,...m]=c;const y=r[f][1];q1(y)&&q1(p)&&(p=Y1(!0,y,p)),r[f]=[l,p,...m]}}}}const WX=new Z1().freeze();function J1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ev(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function tv(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function IN(e){if(!q1(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ON(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Np(e){return YX(e)?e:new NN(e)}function YX(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function qX(e){return typeof e=="string"||GX(e)}function GX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const KX="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",DN=[],LN={allowDangerousHtml:!0},XX=/^(https?|ircs?|mailto|xmpp)$/i,QX=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ZX(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||DN,u=e.remarkPlugins||DN,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...LN}:LN,c=e.skipHtml,d=e.unwrapDisallowed,f=e.urlTransform||JX,p=WX().use(zK).use(u).use(kX,l).use(s),m=new NN;typeof r=="string"&&(m.value=r);for(const x of QX)Object.hasOwn(e,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+KX+x.id,void 0);const y=p.parse(m);let w=p.runSync(y,m);return i&&(w={type:"element",tagName:"div",properties:{className:i},children:w.type==="root"?w.children:[w]}),yp(w,g),iK(w,{Fragment:E.Fragment,components:a,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function g(x,b,T){if(x.type==="raw"&&T&&typeof b=="number")return c?T.children.splice(b,1):T.children[b]={type:"text",value:x.value},b;if(x.type==="element"){let S;for(S in U1)if(Object.hasOwn(U1,S)&&Object.hasOwn(x.properties,S)){const _=x.properties[S],N=U1[S];(N===null||N.includes(x.tagName))&&(x.properties[S]=f(String(_||""),S,x))}}if(x.type==="element"){let S=t?!t.includes(x.tagName):o?o.includes(x.tagName):!1;if(!S&&n&&typeof b=="number"&&(S=!n(x,b,T)),S&&T&&typeof b=="number")return d&&x.children?T.children.splice(b,1,...x.children):T.children.splice(b,1),b}}}function JX(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||XX.test(e.slice(0,t))?e:""}const MN=yn.memo(ZX,(e,t)=>e.children===t.children&&e.className===t.className),FN=/[#.]/g;function eQ(e,t){const n=e||"",r={};let i=0,a,o;for(;i<n.length;){FN.lastIndex=i;const s=FN.exec(n),u=n.slice(i,s?s.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:o=u,i+=u.length),s&&(a=s[0],i++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}const nv={}.hasOwnProperty;function BN(e,t,n){const r=n&&iQ(n);function i(a,o,...s){let u=-1,l;if(a==null){l={type:"root",children:[]};const c=o;s.unshift(c)}else if(l=eQ(a,t),l.tagName=l.tagName.toLowerCase(),r&&nv.call(r,l.tagName)&&(l.tagName=r[l.tagName]),tQ(o))s.unshift(o);else{let c;for(c in o)nv.call(o,c)&&nQ(e,l.properties,c,o[c])}for(;++u<s.length;)rv(l.children,s[u]);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function tQ(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const o of a)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function nQ(e,t,n,r){const i=Ep(e,n);let a=-1,o;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;o=r}else typeof r=="boolean"?o=r:typeof r=="string"?i.spaceSeparated?o=H3(r):i.commaSeparated?o=A3(r):i.commaOrSpaceSeparated?o=H3(A3(r).join(" ")):o=jN(i,i.property,r):Array.isArray(r)?o=r.concat():o=i.property==="style"?rQ(r):String(r);if(Array.isArray(o)){const s=[];for(;++a<o.length;){const u=jN(i,i.property,o[a]);s[a]=u}o=s}if(i.property==="className"&&Array.isArray(t.className)){const s=o;o=t.className.concat(s)}t[i.property]=o}}function rv(e,t){let n=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)rv(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?rv(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function jN(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Pl(n)===Pl(t)))return!0}return n}function rQ(e){const t=[];let n;for(n in e)nv.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function iQ(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const aQ=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],oQ=BN(Il,"div"),sQ=BN(ya,"g",aQ);function uQ(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let o=0;for(;;){let s=n[o];if(s===void 0){const u=UN(t,n[o-1]);s=u===-1?t.length+1:u+1,n[o]=s}if(s>a)return{line:o+1,column:a-(o>0?n[o-1]:0)+1,offset:a};o++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const s=n[n.length-1],u=UN(t,s),l=u===-1?t.length+1:u+1;if(s===l)break;n.push(l)}const o=(a.line>1?n[a.line-2]:0)+a.column-1;if(o<n[a.line-1])return o}}}function UN(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
409
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const lo={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},HN={}.hasOwnProperty,lQ=Object.prototype;function cQ(e,t){const n=t||{};return iv({file:n.file||void 0,location:!1,schema:n.space==="svg"?ya:Il,verbose:n.verbose||!1},e)}function iv(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Pp(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:zN(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),o=uQ(a),s=o.toPoint(0),u=o.toPoint(a.length);n.position={start:s,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Pp(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Pp(e,r,n),n}default:return n=dQ(e,t),n}}function zN(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=iv(e,t[n]);r.push(i)}return r}function dQ(e,t){const n=e.schema;e.schema=t.namespaceURI===lo.svg?ya:Il;let r=-1;const i={};for(;++r<t.attrs.length;){const s=t.attrs[r],u=(s.prefix?s.prefix+":":"")+s.name;HN.call(lQ,u)||(i[u]=s.value)}const o=(e.schema.space==="svg"?sQ:oQ)(t.tagName,i,zN(e,t.childNodes));if(Pp(e,t,o),o.tagName==="template"){const s=t,u=s.sourceCodeLocation,l=u&&u.startTag&&Ls(u.startTag),c=u&&u.endTag&&Ls(u.endTag),d=iv(e,s.content);l&&c&&e.file&&(d.position={start:l.end,end:c.start}),o.content=d}return e.schema=n,o}function Pp(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=fQ(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function fQ(e,t,n){const r=Ls(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let o;if(n.attrs)for(o in n.attrs)HN.call(n.attrs,o)&&(a[Ep(e.schema,o).property]=Ls(n.attrs[o]));n.startTag;const s=Ls(n.startTag),u=n.endTag?Ls(n.endTag):void 0,l={opening:s};u&&(l.closing=u),l.properties=a,t.data={position:l}}}return r}function Ls(e){const t=VN({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=VN({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function VN(e){return e.line&&e.column?e:void 0}const pQ={},hQ={}.hasOwnProperty,$N=FR("type",{handlers:{root:gQ,element:bQ,text:xQ,comment:wQ,doctype:vQ}});function mQ(e,t){const r=(t||pQ).space;return $N(e,r==="svg"?ya:Il)}function gQ(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=av(e.children,n,t),Ms(e,n),n}function yQ(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=av(e.children,n,t),Ms(e,n),n}function vQ(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ms(e,t),t}function xQ(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ms(e,t),t}function wQ(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ms(e,t),t}function bQ(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ya);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&hQ.call(e.properties,a)){const u=EQ(r,a,e.properties[a]);u&&i.push(u)}}const o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:lo[o],childNodes:[],parentNode:null};return s.childNodes=av(e.children,s,r),Ms(e,s),e.tagName==="template"&&e.content&&(s.content=yQ(e.content,r)),s}function EQ(e,t,n){const r=Ep(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?k3(n):z3(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=lo[r.space]}return i}function av(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=$N(e[r],n);a.parentNode=t,i.push(a)}return i}function Ms(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const TQ=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],_Q=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),ut="�";var C;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(C||(C={}));const Nn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function WN(e){return e>=55296&&e<=57343}function SQ(e){return e>=56320&&e<=57343}function CQ(e,t){return(e-55296)*1024+9216+t}function YN(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function qN(e){return e>=64976&&e<=65007||_Q.has(e)}var U;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(U||(U={}));const AQ=65536;class kQ{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=AQ,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,o=i+n,s=a+n;return{code:t,startLine:r,endLine:r,startCol:o,endCol:o,startOffset:s,endOffset:s}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(SQ(n))return this.pos++,this._addGap(),CQ(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,C.EOF;return this._err(U.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,C.EOF;const r=this.html.charCodeAt(n);return r===C.CARRIAGE_RETURN?C.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,C.EOF;let t=this.html.charCodeAt(this.pos);return t===C.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,C.LINE_FEED):t===C.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,WN(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===C.LINE_FEED||t===C.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){YN(t)?this._err(U.controlCharacterInInputStream):qN(t)&&this._err(U.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ie;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ie||(Ie={}));function GN(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const KN=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),RQ=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var ov;const NQ=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),PQ=(ov=String.fromCodePoint)!==null&&ov!==void 0?ov:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function IQ(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=NQ.get(e))!==null&&t!==void 0?t:e}var Ft;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ft||(Ft={}));const OQ=32;var xa;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(xa||(xa={}));function sv(e){return e>=Ft.ZERO&&e<=Ft.NINE}function DQ(e){return e>=Ft.UPPER_A&&e<=Ft.UPPER_F||e>=Ft.LOWER_A&&e<=Ft.LOWER_F}function LQ(e){return e>=Ft.UPPER_A&&e<=Ft.UPPER_Z||e>=Ft.LOWER_A&&e<=Ft.LOWER_Z||sv(e)}function MQ(e){return e===Ft.EQUALS||LQ(e)}var Bt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Bt||(Bt={}));var Si;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Si||(Si={}));class XN{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Bt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Si.Strict}startEntity(t){this.decodeMode=t,this.state=Bt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Bt.EntityStart:return t.charCodeAt(n)===Ft.NUM?(this.state=Bt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Bt.NamedEntity,this.stateNamedEntity(t,n));case Bt.NumericStart:return this.stateNumericStart(t,n);case Bt.NumericDecimal:return this.stateNumericDecimal(t,n);case Bt.NumericHex:return this.stateNumericHex(t,n);case Bt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|OQ)===Ft.LOWER_X?(this.state=Bt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Bt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(sv(i)||DQ(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(sv(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ft.SEMI)this.consumed+=1;else if(this.decodeMode===Si.Strict)return 0;return this.emitCodePoint(IQ(this.result),this.consumed),this.errors&&(t!==Ft.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&xa.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const o=t.charCodeAt(n);if(this.treeIndex=FQ(r,i,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return this.result===0||this.decodeMode===Si.Attribute&&(a===0||MQ(o))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&xa.VALUE_LENGTH)>>14,a!==0){if(o===Ft.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Si.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&xa.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~xa.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Bt.NamedEntity:return this.result!==0&&(this.decodeMode!==Si.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Bt.NumericDecimal:return this.emitNumericEntity(0,2);case Bt.NumericHex:return this.emitNumericEntity(0,3);case Bt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Bt.EntityStart:return 0}}}function QN(e){let t="";const n=new XN(e,r=>t+=PQ(r));return function(i,a){let o=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(o,s),n.startEntity(a);const l=n.write(i,s+1);if(l<0){o=s+n.end();break}o=s+l,s=l===0?o+1:o}const u=t+i.slice(o);return t="",u}}function FQ(e,t,n,r){const i=(t&xa.BRANCH_LENGTH)>>7,a=t&xa.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let o=n,s=o+i-1;for(;o<=s;){const u=o+s>>>1,l=e[u];if(l<r)o=u+1;else if(l>r)s=u-1;else return e[u+i]}return-1}QN(KN),QN(RQ);var G;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(G||(G={}));var co;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(co||(co={}));var fr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(fr||(fr={}));var M;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(M||(M={}));var h;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(h||(h={}));const BQ=new Map([[M.A,h.A],[M.ADDRESS,h.ADDRESS],[M.ANNOTATION_XML,h.ANNOTATION_XML],[M.APPLET,h.APPLET],[M.AREA,h.AREA],[M.ARTICLE,h.ARTICLE],[M.ASIDE,h.ASIDE],[M.B,h.B],[M.BASE,h.BASE],[M.BASEFONT,h.BASEFONT],[M.BGSOUND,h.BGSOUND],[M.BIG,h.BIG],[M.BLOCKQUOTE,h.BLOCKQUOTE],[M.BODY,h.BODY],[M.BR,h.BR],[M.BUTTON,h.BUTTON],[M.CAPTION,h.CAPTION],[M.CENTER,h.CENTER],[M.CODE,h.CODE],[M.COL,h.COL],[M.COLGROUP,h.COLGROUP],[M.DD,h.DD],[M.DESC,h.DESC],[M.DETAILS,h.DETAILS],[M.DIALOG,h.DIALOG],[M.DIR,h.DIR],[M.DIV,h.DIV],[M.DL,h.DL],[M.DT,h.DT],[M.EM,h.EM],[M.EMBED,h.EMBED],[M.FIELDSET,h.FIELDSET],[M.FIGCAPTION,h.FIGCAPTION],[M.FIGURE,h.FIGURE],[M.FONT,h.FONT],[M.FOOTER,h.FOOTER],[M.FOREIGN_OBJECT,h.FOREIGN_OBJECT],[M.FORM,h.FORM],[M.FRAME,h.FRAME],[M.FRAMESET,h.FRAMESET],[M.H1,h.H1],[M.H2,h.H2],[M.H3,h.H3],[M.H4,h.H4],[M.H5,h.H5],[M.H6,h.H6],[M.HEAD,h.HEAD],[M.HEADER,h.HEADER],[M.HGROUP,h.HGROUP],[M.HR,h.HR],[M.HTML,h.HTML],[M.I,h.I],[M.IMG,h.IMG],[M.IMAGE,h.IMAGE],[M.INPUT,h.INPUT],[M.IFRAME,h.IFRAME],[M.KEYGEN,h.KEYGEN],[M.LABEL,h.LABEL],[M.LI,h.LI],[M.LINK,h.LINK],[M.LISTING,h.LISTING],[M.MAIN,h.MAIN],[M.MALIGNMARK,h.MALIGNMARK],[M.MARQUEE,h.MARQUEE],[M.MATH,h.MATH],[M.MENU,h.MENU],[M.META,h.META],[M.MGLYPH,h.MGLYPH],[M.MI,h.MI],[M.MO,h.MO],[M.MN,h.MN],[M.MS,h.MS],[M.MTEXT,h.MTEXT],[M.NAV,h.NAV],[M.NOBR,h.NOBR],[M.NOFRAMES,h.NOFRAMES],[M.NOEMBED,h.NOEMBED],[M.NOSCRIPT,h.NOSCRIPT],[M.OBJECT,h.OBJECT],[M.OL,h.OL],[M.OPTGROUP,h.OPTGROUP],[M.OPTION,h.OPTION],[M.P,h.P],[M.PARAM,h.PARAM],[M.PLAINTEXT,h.PLAINTEXT],[M.PRE,h.PRE],[M.RB,h.RB],[M.RP,h.RP],[M.RT,h.RT],[M.RTC,h.RTC],[M.RUBY,h.RUBY],[M.S,h.S],[M.SCRIPT,h.SCRIPT],[M.SEARCH,h.SEARCH],[M.SECTION,h.SECTION],[M.SELECT,h.SELECT],[M.SOURCE,h.SOURCE],[M.SMALL,h.SMALL],[M.SPAN,h.SPAN],[M.STRIKE,h.STRIKE],[M.STRONG,h.STRONG],[M.STYLE,h.STYLE],[M.SUB,h.SUB],[M.SUMMARY,h.SUMMARY],[M.SUP,h.SUP],[M.TABLE,h.TABLE],[M.TBODY,h.TBODY],[M.TEMPLATE,h.TEMPLATE],[M.TEXTAREA,h.TEXTAREA],[M.TFOOT,h.TFOOT],[M.TD,h.TD],[M.TH,h.TH],[M.THEAD,h.THEAD],[M.TITLE,h.TITLE],[M.TR,h.TR],[M.TRACK,h.TRACK],[M.TT,h.TT],[M.U,h.U],[M.UL,h.UL],[M.SVG,h.SVG],[M.VAR,h.VAR],[M.WBR,h.WBR],[M.XMP,h.XMP]]);function Fs(e){var t;return(t=BQ.get(e))!==null&&t!==void 0?t:h.UNKNOWN}const K=h,jQ={[G.HTML]:new Set([K.ADDRESS,K.APPLET,K.AREA,K.ARTICLE,K.ASIDE,K.BASE,K.BASEFONT,K.BGSOUND,K.BLOCKQUOTE,K.BODY,K.BR,K.BUTTON,K.CAPTION,K.CENTER,K.COL,K.COLGROUP,K.DD,K.DETAILS,K.DIR,K.DIV,K.DL,K.DT,K.EMBED,K.FIELDSET,K.FIGCAPTION,K.FIGURE,K.FOOTER,K.FORM,K.FRAME,K.FRAMESET,K.H1,K.H2,K.H3,K.H4,K.H5,K.H6,K.HEAD,K.HEADER,K.HGROUP,K.HR,K.HTML,K.IFRAME,K.IMG,K.INPUT,K.LI,K.LINK,K.LISTING,K.MAIN,K.MARQUEE,K.MENU,K.META,K.NAV,K.NOEMBED,K.NOFRAMES,K.NOSCRIPT,K.OBJECT,K.OL,K.P,K.PARAM,K.PLAINTEXT,K.PRE,K.SCRIPT,K.SECTION,K.SELECT,K.SOURCE,K.STYLE,K.SUMMARY,K.TABLE,K.TBODY,K.TD,K.TEMPLATE,K.TEXTAREA,K.TFOOT,K.TH,K.THEAD,K.TITLE,K.TR,K.TRACK,K.UL,K.WBR,K.XMP]),[G.MATHML]:new Set([K.MI,K.MO,K.MN,K.MS,K.MTEXT,K.ANNOTATION_XML]),[G.SVG]:new Set([K.TITLE,K.FOREIGN_OBJECT,K.DESC]),[G.XLINK]:new Set,[G.XML]:new Set,[G.XMLNS]:new Set},uv=new Set([K.H1,K.H2,K.H3,K.H4,K.H5,K.H6]);M.STYLE,M.SCRIPT,M.XMP,M.IFRAME,M.NOEMBED,M.NOFRAMES,M.PLAINTEXT;var R;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(R||(R={}));const _t={DATA:R.DATA,RCDATA:R.RCDATA,RAWTEXT:R.RAWTEXT,SCRIPT_DATA:R.SCRIPT_DATA,PLAINTEXT:R.PLAINTEXT,CDATA_SECTION:R.CDATA_SECTION};function UQ(e){return e>=C.DIGIT_0&&e<=C.DIGIT_9}function Fl(e){return e>=C.LATIN_CAPITAL_A&&e<=C.LATIN_CAPITAL_Z}function HQ(e){return e>=C.LATIN_SMALL_A&&e<=C.LATIN_SMALL_Z}function wa(e){return HQ(e)||Fl(e)}function ZN(e){return wa(e)||UQ(e)}function Ip(e){return e+32}function JN(e){return e===C.SPACE||e===C.LINE_FEED||e===C.TABULATION||e===C.FORM_FEED}function eP(e){return JN(e)||e===C.SOLIDUS||e===C.GREATER_THAN_SIGN}function zQ(e){return e===C.NULL?U.nullCharacterReference:e>1114111?U.characterReferenceOutsideUnicodeRange:WN(e)?U.surrogateCharacterReference:qN(e)?U.noncharacterCharacterReference:YN(e)||e===C.CARRIAGE_RETURN?U.controlCharacterReference:null}class VQ{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=R.DATA,this.returnState=R.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new kQ(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new XN(KN,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(U.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(U.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=zQ(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Ie.START_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ie.END_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ie.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ie.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(GN(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(U.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Fs(t.tagName),t.type===Ie.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(U.endTagWithAttributes),t.selfClosing&&this._err(U.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ie.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ie.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ie.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ie.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=JN(t)?Ie.WHITESPACE_CHARACTER:t===C.NULL?Ie.NULL_CHARACTER:Ie.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ie.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=R.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Si.Attribute:Si.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===R.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case R.DATA:{this._stateData(t);break}case R.RCDATA:{this._stateRcdata(t);break}case R.RAWTEXT:{this._stateRawtext(t);break}case R.SCRIPT_DATA:{this._stateScriptData(t);break}case R.PLAINTEXT:{this._statePlaintext(t);break}case R.TAG_OPEN:{this._stateTagOpen(t);break}case R.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case R.TAG_NAME:{this._stateTagName(t);break}case R.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case R.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case R.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case R.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case R.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case R.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case R.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case R.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case R.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case R.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case R.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case R.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case R.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case R.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case R.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case R.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case R.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case R.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case R.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case R.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case R.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case R.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case R.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case R.BOGUS_COMMENT:{this._stateBogusComment(t);break}case R.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case R.COMMENT_START:{this._stateCommentStart(t);break}case R.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case R.COMMENT:{this._stateComment(t);break}case R.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case R.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case R.COMMENT_END:{this._stateCommentEnd(t);break}case R.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case R.DOCTYPE:{this._stateDoctype(t);break}case R.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case R.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case R.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case R.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case R.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case R.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case R.CDATA_SECTION:{this._stateCdataSection(t);break}case R.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case R.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case R.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case R.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=R.TAG_OPEN;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitCodePoint(t);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case C.AMPERSAND:{this._startCharacterReference();break}case C.LESS_THAN_SIGN:{this.state=R.RCDATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ut);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case C.LESS_THAN_SIGN:{this.state=R.RAWTEXT_LESS_THAN_SIGN;break}case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ut);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ut);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ut);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(wa(t))this._createStartTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case C.EXCLAMATION_MARK:{this.state=R.MARKUP_DECLARATION_OPEN;break}case C.SOLIDUS:{this.state=R.END_TAG_OPEN;break}case C.QUESTION_MARK:{this._err(U.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t);break}case C.EOF:{this._err(U.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(U.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=R.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(wa(t))this._createEndTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case C.GREATER_THAN_SIGN:{this._err(U.missingEndTagName),this.state=R.DATA;break}case C.EOF:{this._err(U.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(U.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=R.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.tagName+=ut;break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Fl(t)?Ip(t):t)}}_stateRcdataLessThanSign(t){t===C.SOLIDUS?this.state=R.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){wa(t)?(this.state=R.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=R.BEFORE_ATTRIBUTE_NAME,!1;case C.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=R.SELF_CLOSING_START_TAG,!1;case C.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=R.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===C.SOLIDUS?this.state=R.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){wa(t)?(this.state=R.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case C.SOLIDUS:{this.state=R.SCRIPT_DATA_END_TAG_OPEN;break}case C.EXCLAMATION_MARK:{this.state=R.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=R.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){wa(t)?(this.state=R.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===C.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===C.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ut);break}case C.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(ut);break}case C.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(ut);break}case C.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===C.SOLIDUS?this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:wa(t)?(this._emitChars("<"),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){wa(t)?(this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Nn.SCRIPT,!1)&&eP(this.preprocessor.peek(Nn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Nn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ut);break}case C.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ut);break}case C.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ut);break}case C.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===C.SOLIDUS?(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Nn.SCRIPT,!1)&&eP(this.preprocessor.peek(Nn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Nn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._err(U.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=R.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this._leaveAttrName(),this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._leaveAttrName(),this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:{this._err(U.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.name+=ut;break}default:this.currentAttr.name+=String.fromCodePoint(Fl(t)?Ip(t):t)}}_stateAfterAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case C.EQUALS_SIGN:{this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{this.state=R.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this.state=R.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(U.missingAttributeValue),this.state=R.DATA,this.emitCurrentTagToken();break}default:this.state=R.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case C.QUOTATION_MARK:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=ut;break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case C.APOSTROPHE:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=ut;break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=ut;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:case C.EQUALS_SIGN:case C.GRAVE_ACCENT:{this._err(U.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this._leaveAttrValue(),this.state=R.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._err(U.missingWhitespaceBetweenAttributes),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case C.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=R.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._err(U.unexpectedSolidusInTag),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case C.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.data+=ut;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Nn.DASH_DASH,!0)?(this._createCommentToken(Nn.DASH_DASH.length+1),this.state=R.COMMENT_START):this._consumeSequenceIfMatch(Nn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Nn.DOCTYPE.length+1),this.state=R.DOCTYPE):this._consumeSequenceIfMatch(Nn.CDATA_START,!0)?this.inForeignNode?this.state=R.CDATA_SECTION:(this._err(U.cdataInHtmlContent),this._createCommentToken(Nn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=R.BOGUS_COMMENT):this._ensureHibernation()||(this._err(U.incorrectlyOpenedComment),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case C.HYPHEN_MINUS:{this.state=R.COMMENT_START_DASH;break}case C.GREATER_THAN_SIGN:{this._err(U.abruptClosingOfEmptyComment),this.state=R.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case C.GREATER_THAN_SIGN:{this._err(U.abruptClosingOfEmptyComment),this.state=R.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=R.COMMENT_END_DASH;break}case C.LESS_THAN_SIGN:{n.data+="<",this.state=R.COMMENT_LESS_THAN_SIGN;break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.data+=ut;break}case C.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case C.EXCLAMATION_MARK:{n.data+="!",this.state=R.COMMENT_LESS_THAN_SIGN_BANG;break}case C.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===C.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=R.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===C.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=R.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==C.GREATER_THAN_SIGN&&t!==C.EOF&&this._err(U.nestedComment),this.state=R.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case C.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case C.EXCLAMATION_MARK:{this.state=R.COMMENT_END_BANG;break}case C.HYPHEN_MINUS:{n.data+="-";break}case C.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{n.data+="--!",this.state=R.COMMENT_END_DASH;break}case C.GREATER_THAN_SIGN:{this._err(U.incorrectlyClosedComment),this.state=R.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=R.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case C.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingWhitespaceBeforeDoctypeName),this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Fl(t))this._createDoctypeToken(String.fromCharCode(Ip(t))),this.state=R.DOCTYPE_NAME;else switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.NULL:{this._err(U.unexpectedNullCharacter),this._createDoctypeToken(ut),this.state=R.DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this._err(U.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=R.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=R.AFTER_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.name+=ut;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Fl(t)?Ip(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Nn.PUBLIC,!1)?this.state=R.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Nn.SYSTEM,!1)?this.state=R.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(U.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(U.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(U.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(U.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(U.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.publicId+=ut;break}case C.GREATER_THAN_SIGN:{this._err(U.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case C.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.publicId+=ut;break}case C.GREATER_THAN_SIGN:{this._err(U.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.QUOTATION_MARK:{this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(U.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(U.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.systemId+=ut;break}case C.GREATER_THAN_SIGN:{this._err(U.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case C.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.systemId+=ut;break}case C.GREATER_THAN_SIGN:{this._err(U.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.NULL:{this._err(U.unexpectedNullCharacter);break}case C.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case C.RIGHT_SQUARE_BRACKET:{this.state=R.CDATA_SECTION_BRACKET;break}case C.EOF:{this._err(U.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===C.RIGHT_SQUARE_BRACKET?this.state=R.CDATA_SECTION_END:(this._emitChars("]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case C.GREATER_THAN_SIGN:{this.state=R.DATA;break}case C.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(C.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ZN(this.preprocessor.peek(1))?R.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ZN(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===C.SEMICOLON&&this._err(U.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const tP=new Set([h.DD,h.DT,h.LI,h.OPTGROUP,h.OPTION,h.P,h.RB,h.RP,h.RT,h.RTC]),nP=new Set([...tP,h.CAPTION,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]),Op=new Set([h.APPLET,h.CAPTION,h.HTML,h.MARQUEE,h.OBJECT,h.TABLE,h.TD,h.TEMPLATE,h.TH]),$Q=new Set([...Op,h.OL,h.UL]),WQ=new Set([...Op,h.BUTTON]),rP=new Set([h.ANNOTATION_XML,h.MI,h.MN,h.MO,h.MS,h.MTEXT]),iP=new Set([h.DESC,h.FOREIGN_OBJECT,h.TITLE]),YQ=new Set([h.TR,h.TEMPLATE,h.HTML]),qQ=new Set([h.TBODY,h.TFOOT,h.THEAD,h.TEMPLATE,h.HTML]),GQ=new Set([h.TABLE,h.TEMPLATE,h.HTML]),KQ=new Set([h.TD,h.TH]);class XQ{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=h.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===h.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===G.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==G.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(n<0?0:n)}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(uv,G.HTML)}popUntilTableCellPopped(){this.popUntilPopped(KQ,G.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(GQ,G.HTML)}clearBackToTableBodyContext(){this.clearBackTo(qQ,G.HTML)}clearBackToTableRowContext(){this.clearBackTo(YQ,G.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===h.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===h.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case G.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case G.SVG:{if(iP.has(i))return!1;break}case G.MATHML:{if(rP.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Op)}hasInListItemScope(t){return this.hasInDynamicScope(t,$Q)}hasInButtonScope(t){return this.hasInDynamicScope(t,WQ)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case G.HTML:{if(uv.has(n))return!0;if(Op.has(n))return!1;break}case G.SVG:{if(iP.has(n))return!1;break}case G.MATHML:{if(rP.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===G.HTML)switch(this.tagIDs[n]){case t:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===G.HTML)switch(this.tagIDs[t]){case h.TBODY:case h.THEAD:case h.TFOOT:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===G.HTML)switch(this.tagIDs[n]){case t:return!0;case h.OPTION:case h.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;tP.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;nP.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&nP.has(this.currentTagId);)this.pop()}}const lv=3;var Xr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Xr||(Xr={}));const aP={type:Xr.Marker};class QQ{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let s=0;s<this.entries.length;s++){const u=this.entries[s];if(u.type===Xr.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===o){const c=this.treeAdapter.getAttrList(l);c.length===i&&r.push({idx:s,attrs:c})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<lv)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<lv)return;const i=new Map(n.map(o=>[o.name,o.value]));let a=0;for(let o=0;o<r.length;o++){const s=r[o];s.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=lv&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(aP)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Xr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Xr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(aP);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Xr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Xr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Xr.Element&&n.element===t)}}const ba={createDocument(){return{nodeName:"#document",mode:fr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};ba.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(ba.isTextNode(n)){n.value+=t;return}}ba.appendChild(e,ba.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ba.isTextNode(r)?r.value+=t:ba.insertBefore(e,ba.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},oP="html",ZQ="about:legacy-compat",JQ="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",sP=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],eZ=[...sP,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],tZ=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),uP=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],nZ=[...uP,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function lP(e,t){return t.some(n=>e.startsWith(n))}function rZ(e){return e.name===oP&&e.publicId===null&&(e.systemId===null||e.systemId===ZQ)}function iZ(e){if(e.name!==oP)return fr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===JQ)return fr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),tZ.has(n))return fr.QUIRKS;let r=t===null?eZ:sP;if(lP(n,r))return fr.QUIRKS;if(r=t===null?uP:nZ,lP(n,r))return fr.LIMITED_QUIRKS}return fr.NO_QUIRKS}const cP={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},aZ="definitionurl",oZ="definitionURL",sZ=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),uZ=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:G.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:G.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:G.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:G.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:G.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:G.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:G.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:G.XML}],["xml:space",{prefix:"xml",name:"space",namespace:G.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:G.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:G.XMLNS}]]),lZ=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),cZ=new Set([h.B,h.BIG,h.BLOCKQUOTE,h.BODY,h.BR,h.CENTER,h.CODE,h.DD,h.DIV,h.DL,h.DT,h.EM,h.EMBED,h.H1,h.H2,h.H3,h.H4,h.H5,h.H6,h.HEAD,h.HR,h.I,h.IMG,h.LI,h.LISTING,h.MENU,h.META,h.NOBR,h.OL,h.P,h.PRE,h.RUBY,h.S,h.SMALL,h.SPAN,h.STRONG,h.STRIKE,h.SUB,h.SUP,h.TABLE,h.TT,h.U,h.UL,h.VAR]);function dZ(e){const t=e.tagID;return t===h.FONT&&e.attrs.some(({name:r})=>r===co.COLOR||r===co.SIZE||r===co.FACE)||cZ.has(t)}function dP(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===aZ){e.attrs[t].name=oZ;break}}function fP(e){for(let t=0;t<e.attrs.length;t++){const n=sZ.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function cv(e){for(let t=0;t<e.attrs.length;t++){const n=uZ.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function fZ(e){const t=lZ.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Fs(e.tagName))}function pZ(e,t){return t===G.MATHML&&(e===h.MI||e===h.MO||e===h.MN||e===h.MS||e===h.MTEXT)}function hZ(e,t,n){if(t===G.MATHML&&e===h.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===co.ENCODING){const i=n[r].value.toLowerCase();return i===cP.TEXT_HTML||i===cP.APPLICATION_XML}}return t===G.SVG&&(e===h.FOREIGN_OBJECT||e===h.DESC||e===h.TITLE)}function mZ(e,t,n,r){return(!r||r===G.HTML)&&hZ(e,t,n)||(!r||r===G.MATHML)&&pZ(e,t)}const gZ="hidden",yZ=8,vZ=3;var I;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(I||(I={}));const xZ={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},pP=new Set([h.TABLE,h.TBODY,h.TFOOT,h.THEAD,h.TR]),hP={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ba,onParseError:null};class mP{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=I.INITIAL,this.originalInsertionMode=I.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...hP,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new VQ(this.options,this),this.activeFormattingElements=new QQ(this.treeAdapter),this.fragmentContextID=r?Fs(this.treeAdapter.getTagName(r)):h.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new XQ(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...hP,...n};t??(t=r.treeAdapter.createElement(M.TEMPLATE,G.HTML,[]));const i=r.treeAdapter.createElement("documentmock",G.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===h.TEMPLATE&&a.tmplInsertionModeStack.unshift(I.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:xZ,o={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(o)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,o;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,o=this.fragmentContextID):{current:a,currentTagId:o}=this.openElements,this._setContextModes(a,o)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===G.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,G.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=I.TEXT}switchToPlaintextParsing(){this.insertionMode=I.TEXT,this.originalInsertionMode=I.IN_BODY,this.tokenizer.state=_t.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===M.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==G.HTML))switch(this.fragmentContextID){case h.TITLE:case h.TEXTAREA:{this.tokenizer.state=_t.RCDATA;break}case h.STYLE:case h.XMP:case h.IFRAME:case h.NOEMBED:case h.NOFRAMES:case h.NOSCRIPT:{this.tokenizer.state=_t.RAWTEXT;break}case h.SCRIPT:{this.tokenizer.state=_t.SCRIPT_DATA;break}case h.PLAINTEXT:{this.tokenizer.state=_t.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const o=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,G.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,G.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(M.HTML,G.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,h.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,o=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:u,endCol:l,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:u,endCol:l,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===Ie.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===h.SVG&&this.treeAdapter.getTagName(n)===M.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===G.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===h.MGLYPH||t.tagID===h.MALIGNMARK)&&!this._isIntegrationPoint(r,n,G.HTML)}_processToken(t){switch(t.type){case Ie.CHARACTER:{this.onCharacter(t);break}case Ie.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ie.COMMENT:{this.onComment(t);break}case Ie.DOCTYPE:{this.onDoctype(t);break}case Ie.START_TAG:{this._processStartTag(t);break}case Ie.END_TAG:{this.onEndTag(t);break}case Ie.EOF:{this.onEof(t);break}case Ie.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return mZ(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Xr.Marker||this.openElements.contains(i.element)),r=n<0?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=I.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(h.P),this.openElements.popUntilTagNamePopped(h.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case h.TR:{this.insertionMode=I.IN_ROW;return}case h.TBODY:case h.THEAD:case h.TFOOT:{this.insertionMode=I.IN_TABLE_BODY;return}case h.CAPTION:{this.insertionMode=I.IN_CAPTION;return}case h.COLGROUP:{this.insertionMode=I.IN_COLUMN_GROUP;return}case h.TABLE:{this.insertionMode=I.IN_TABLE;return}case h.BODY:{this.insertionMode=I.IN_BODY;return}case h.FRAMESET:{this.insertionMode=I.IN_FRAMESET;return}case h.SELECT:{this._resetInsertionModeForSelect(t);return}case h.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case h.HTML:{this.insertionMode=this.headElement?I.AFTER_HEAD:I.BEFORE_HEAD;return}case h.TD:case h.TH:{if(t>0){this.insertionMode=I.IN_CELL;return}break}case h.HEAD:{if(t>0){this.insertionMode=I.IN_HEAD;return}break}}this.insertionMode=I.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===h.TEMPLATE)break;if(r===h.TABLE){this.insertionMode=I.IN_SELECT_IN_TABLE;return}}this.insertionMode=I.IN_SELECT}_isElementCausesFosterParenting(t){return pP.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case h.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===G.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case h.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return jQ[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){KJ(this,t);return}switch(this.insertionMode){case I.INITIAL:{Bl(this,t);break}case I.BEFORE_HTML:{jl(this,t);break}case I.BEFORE_HEAD:{Ul(this,t);break}case I.IN_HEAD:{Hl(this,t);break}case I.IN_HEAD_NO_SCRIPT:{zl(this,t);break}case I.AFTER_HEAD:{Vl(this,t);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:{yP(this,t);break}case I.TEXT:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{hv(this,t);break}case I.IN_TABLE_TEXT:{SP(this,t);break}case I.IN_COLUMN_GROUP:{Mp(this,t);break}case I.AFTER_BODY:{jp(this,t);break}case I.AFTER_AFTER_BODY:{Up(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){GJ(this,t);return}switch(this.insertionMode){case I.INITIAL:{Bl(this,t);break}case I.BEFORE_HTML:{jl(this,t);break}case I.BEFORE_HEAD:{Ul(this,t);break}case I.IN_HEAD:{Hl(this,t);break}case I.IN_HEAD_NO_SCRIPT:{zl(this,t);break}case I.AFTER_HEAD:{Vl(this,t);break}case I.TEXT:{this._insertCharacters(t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{hv(this,t);break}case I.IN_COLUMN_GROUP:{Mp(this,t);break}case I.AFTER_BODY:{jp(this,t);break}case I.AFTER_AFTER_BODY:{Up(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){fv(this,t);return}switch(this.insertionMode){case I.INITIAL:case I.BEFORE_HTML:case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_TEMPLATE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{fv(this,t);break}case I.IN_TABLE_TEXT:{Yl(this,t);break}case I.AFTER_BODY:{CZ(this,t);break}case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{AZ(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case I.INITIAL:{kZ(this,t);break}case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:{this._err(t,U.misplacedDoctype);break}case I.IN_TABLE_TEXT:{Yl(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,U.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?XJ(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case I.INITIAL:{Bl(this,t);break}case I.BEFORE_HTML:{RZ(this,t);break}case I.BEFORE_HEAD:{PZ(this,t);break}case I.IN_HEAD:{Rr(this,t);break}case I.IN_HEAD_NO_SCRIPT:{DZ(this,t);break}case I.AFTER_HEAD:{MZ(this,t);break}case I.IN_BODY:{on(this,t);break}case I.IN_TABLE:{Bs(this,t);break}case I.IN_TABLE_TEXT:{Yl(this,t);break}case I.IN_CAPTION:{IJ(this,t);break}case I.IN_COLUMN_GROUP:{mv(this,t);break}case I.IN_TABLE_BODY:{Fp(this,t);break}case I.IN_ROW:{Bp(this,t);break}case I.IN_CELL:{LJ(this,t);break}case I.IN_SELECT:{kP(this,t);break}case I.IN_SELECT_IN_TABLE:{FJ(this,t);break}case I.IN_TEMPLATE:{jJ(this,t);break}case I.AFTER_BODY:{HJ(this,t);break}case I.IN_FRAMESET:{zJ(this,t);break}case I.AFTER_FRAMESET:{$J(this,t);break}case I.AFTER_AFTER_BODY:{YJ(this,t);break}case I.AFTER_AFTER_FRAMESET:{qJ(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?QJ(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case I.INITIAL:{Bl(this,t);break}case I.BEFORE_HTML:{NZ(this,t);break}case I.BEFORE_HEAD:{IZ(this,t);break}case I.IN_HEAD:{OZ(this,t);break}case I.IN_HEAD_NO_SCRIPT:{LZ(this,t);break}case I.AFTER_HEAD:{FZ(this,t);break}case I.IN_BODY:{Lp(this,t);break}case I.TEXT:{EJ(this,t);break}case I.IN_TABLE:{$l(this,t);break}case I.IN_TABLE_TEXT:{Yl(this,t);break}case I.IN_CAPTION:{OJ(this,t);break}case I.IN_COLUMN_GROUP:{DJ(this,t);break}case I.IN_TABLE_BODY:{gv(this,t);break}case I.IN_ROW:{AP(this,t);break}case I.IN_CELL:{MJ(this,t);break}case I.IN_SELECT:{RP(this,t);break}case I.IN_SELECT_IN_TABLE:{BJ(this,t);break}case I.IN_TEMPLATE:{UJ(this,t);break}case I.AFTER_BODY:{PP(this,t);break}case I.IN_FRAMESET:{VJ(this,t);break}case I.AFTER_FRAMESET:{WJ(this,t);break}case I.AFTER_AFTER_BODY:{Up(this,t);break}}}onEof(t){switch(this.insertionMode){case I.INITIAL:{Bl(this,t);break}case I.BEFORE_HTML:{jl(this,t);break}case I.BEFORE_HEAD:{Ul(this,t);break}case I.IN_HEAD:{Hl(this,t);break}case I.IN_HEAD_NO_SCRIPT:{zl(this,t);break}case I.AFTER_HEAD:{Vl(this,t);break}case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{TP(this,t);break}case I.TEXT:{TJ(this,t);break}case I.IN_TABLE_TEXT:{Yl(this,t);break}case I.IN_TEMPLATE:{NP(this,t);break}case I.AFTER_BODY:case I.IN_FRAMESET:case I.AFTER_FRAMESET:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{pv(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===C.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.TEXT:case I.IN_COLUMN_GROUP:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{this._insertCharacters(t);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:case I.AFTER_BODY:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{gP(this,t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{hv(this,t);break}case I.IN_TABLE_TEXT:{_P(this,t);break}}}}function wZ(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):EP(e,t),n}function bZ(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function EZ(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);const s=e.activeFormattingElements.getElementEntry(o),u=s&&a>=vZ;!s||u?(u&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(o)):(o=TZ(e,s),r===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function TZ(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function _Z(e,t,n){const r=e.treeAdapter.getTagName(t),i=Fs(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===h.TEMPLATE&&a===G.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function SZ(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function dv(e,t){for(let n=0;n<yZ;n++){const r=wZ(e,t);if(!r)break;const i=bZ(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=EZ(e,i,r.element),o=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),o&&_Z(e,o,a),SZ(e,i,r)}}function fv(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function CZ(e,t){e._appendCommentNode(t,e.openElements.items[0])}function AZ(e,t){e._appendCommentNode(t,e.document)}function pv(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(a);o&&!o.endTag&&e._setEndLocation(a,t)}}}}function kZ(e,t){e._setDocumentType(t);const n=t.forceQuirks?fr.QUIRKS:iZ(t);rZ(t)||e._err(t,U.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=I.BEFORE_HTML}function Bl(e,t){e._err(t,U.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,fr.QUIRKS),e.insertionMode=I.BEFORE_HTML,e._processToken(t)}function RZ(e,t){t.tagID===h.HTML?(e._insertElement(t,G.HTML),e.insertionMode=I.BEFORE_HEAD):jl(e,t)}function NZ(e,t){const n=t.tagID;(n===h.HTML||n===h.HEAD||n===h.BODY||n===h.BR)&&jl(e,t)}function jl(e,t){e._insertFakeRootElement(),e.insertionMode=I.BEFORE_HEAD,e._processToken(t)}function PZ(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.HEAD:{e._insertElement(t,G.HTML),e.headElement=e.openElements.current,e.insertionMode=I.IN_HEAD;break}default:Ul(e,t)}}function IZ(e,t){const n=t.tagID;n===h.HEAD||n===h.BODY||n===h.HTML||n===h.BR?Ul(e,t):e._err(t,U.endTagWithoutMatchingOpenElement)}function Ul(e,t){e._insertFakeElement(M.HEAD,h.HEAD),e.headElement=e.openElements.current,e.insertionMode=I.IN_HEAD,e._processToken(t)}function Rr(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case h.TITLE:{e._switchToTextParsing(t,_t.RCDATA);break}case h.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,_t.RAWTEXT):(e._insertElement(t,G.HTML),e.insertionMode=I.IN_HEAD_NO_SCRIPT);break}case h.NOFRAMES:case h.STYLE:{e._switchToTextParsing(t,_t.RAWTEXT);break}case h.SCRIPT:{e._switchToTextParsing(t,_t.SCRIPT_DATA);break}case h.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=I.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(I.IN_TEMPLATE);break}case h.HEAD:{e._err(t,U.misplacedStartTagForHeadElement);break}default:Hl(e,t)}}function OZ(e,t){switch(t.tagID){case h.HEAD:{e.openElements.pop(),e.insertionMode=I.AFTER_HEAD;break}case h.BODY:case h.BR:case h.HTML:{Hl(e,t);break}case h.TEMPLATE:{fo(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function fo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==h.TEMPLATE&&e._err(t,U.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,U.endTagWithoutMatchingOpenElement)}function Hl(e,t){e.openElements.pop(),e.insertionMode=I.AFTER_HEAD,e._processToken(t)}function DZ(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.BASEFONT:case h.BGSOUND:case h.HEAD:case h.LINK:case h.META:case h.NOFRAMES:case h.STYLE:{Rr(e,t);break}case h.NOSCRIPT:{e._err(t,U.nestedNoscriptInHead);break}default:zl(e,t)}}function LZ(e,t){switch(t.tagID){case h.NOSCRIPT:{e.openElements.pop(),e.insertionMode=I.IN_HEAD;break}case h.BR:{zl(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function zl(e,t){const n=t.type===Ie.EOF?U.openElementsLeftAfterEof:U.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=I.IN_HEAD,e._processToken(t)}function MZ(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.BODY:{e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=I.IN_BODY;break}case h.FRAMESET:{e._insertElement(t,G.HTML),e.insertionMode=I.IN_FRAMESET;break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{e._err(t,U.abandonedHeadElementChild),e.openElements.push(e.headElement,h.HEAD),Rr(e,t),e.openElements.remove(e.headElement);break}case h.HEAD:{e._err(t,U.misplacedStartTagForHeadElement);break}default:Vl(e,t)}}function FZ(e,t){switch(t.tagID){case h.BODY:case h.HTML:case h.BR:{Vl(e,t);break}case h.TEMPLATE:{fo(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function Vl(e,t){e._insertFakeElement(M.BODY,h.BODY),e.insertionMode=I.IN_BODY,Dp(e,t)}function Dp(e,t){switch(t.type){case Ie.CHARACTER:{yP(e,t);break}case Ie.WHITESPACE_CHARACTER:{gP(e,t);break}case Ie.COMMENT:{fv(e,t);break}case Ie.START_TAG:{on(e,t);break}case Ie.END_TAG:{Lp(e,t);break}case Ie.EOF:{TP(e,t);break}}}function gP(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function yP(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function BZ(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function jZ(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function UZ(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,G.HTML),e.insertionMode=I.IN_FRAMESET)}function HZ(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function zZ(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),uv.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,G.HTML)}function VZ(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function $Z(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,G.HTML),n||(e.formElement=e.openElements.current))}function WZ(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===h.LI&&i===h.LI||(n===h.DD||n===h.DT)&&(i===h.DD||i===h.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==h.ADDRESS&&i!==h.DIV&&i!==h.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function YZ(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.tokenizer.state=_t.PLAINTEXT}function qZ(e,t){e.openElements.hasInScope(h.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1}function GZ(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(M.A);n&&(dv(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function KZ(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function XZ(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(h.NOBR)&&(dv(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function QZ(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function ZZ(e,t){e.treeAdapter.getDocumentMode(e.document)!==fr.QUIRKS&&e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=I.IN_TABLE}function vP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xP(e){const t=GN(e,co.TYPE);return t!=null&&t.toLowerCase()===gZ}function JZ(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),xP(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function eJ(e,t){e._appendElement(t,G.HTML),t.ackSelfClosing=!0}function tJ(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function nJ(e,t){t.tagName=M.IMG,t.tagID=h.IMG,vP(e,t)}function rJ(e,t){e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.tokenizer.state=_t.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=I.TEXT}function iJ(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,_t.RAWTEXT)}function aJ(e,t){e.framesetOk=!1,e._switchToTextParsing(t,_t.RAWTEXT)}function wP(e,t){e._switchToTextParsing(t,_t.RAWTEXT)}function oJ(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===I.IN_TABLE||e.insertionMode===I.IN_CAPTION||e.insertionMode===I.IN_TABLE_BODY||e.insertionMode===I.IN_ROW||e.insertionMode===I.IN_CELL?I.IN_SELECT_IN_TABLE:I.IN_SELECT}function sJ(e,t){e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function uJ(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,G.HTML)}function lJ(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(h.RTC),e._insertElement(t,G.HTML)}function cJ(e,t){e._reconstructActiveFormattingElements(),dP(t),cv(t),t.selfClosing?e._appendElement(t,G.MATHML):e._insertElement(t,G.MATHML),t.ackSelfClosing=!0}function dJ(e,t){e._reconstructActiveFormattingElements(),fP(t),cv(t),t.selfClosing?e._appendElement(t,G.SVG):e._insertElement(t,G.SVG),t.ackSelfClosing=!0}function bP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function on(e,t){switch(t.tagID){case h.I:case h.S:case h.B:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.SMALL:case h.STRIKE:case h.STRONG:{KZ(e,t);break}case h.A:{GZ(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{zZ(e,t);break}case h.P:case h.DL:case h.OL:case h.UL:case h.DIV:case h.DIR:case h.NAV:case h.MAIN:case h.MENU:case h.ASIDE:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.DETAILS:case h.ADDRESS:case h.ARTICLE:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{HZ(e,t);break}case h.LI:case h.DD:case h.DT:{WZ(e,t);break}case h.BR:case h.IMG:case h.WBR:case h.AREA:case h.EMBED:case h.KEYGEN:{vP(e,t);break}case h.HR:{tJ(e,t);break}case h.RB:case h.RTC:{uJ(e,t);break}case h.RT:case h.RP:{lJ(e,t);break}case h.PRE:case h.LISTING:{VZ(e,t);break}case h.XMP:{iJ(e,t);break}case h.SVG:{dJ(e,t);break}case h.HTML:{BZ(e,t);break}case h.BASE:case h.LINK:case h.META:case h.STYLE:case h.TITLE:case h.SCRIPT:case h.BGSOUND:case h.BASEFONT:case h.TEMPLATE:{Rr(e,t);break}case h.BODY:{jZ(e,t);break}case h.FORM:{$Z(e,t);break}case h.NOBR:{XZ(e,t);break}case h.MATH:{cJ(e,t);break}case h.TABLE:{ZZ(e,t);break}case h.INPUT:{JZ(e,t);break}case h.PARAM:case h.TRACK:case h.SOURCE:{eJ(e,t);break}case h.IMAGE:{nJ(e,t);break}case h.BUTTON:{qZ(e,t);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{QZ(e,t);break}case h.IFRAME:{aJ(e,t);break}case h.SELECT:{oJ(e,t);break}case h.OPTION:case h.OPTGROUP:{sJ(e,t);break}case h.NOEMBED:case h.NOFRAMES:{wP(e,t);break}case h.FRAMESET:{UZ(e,t);break}case h.TEXTAREA:{rJ(e,t);break}case h.NOSCRIPT:{e.options.scriptingEnabled?wP(e,t):bP(e,t);break}case h.PLAINTEXT:{YZ(e,t);break}case h.COL:case h.TH:case h.TD:case h.TR:case h.HEAD:case h.FRAME:case h.TBODY:case h.TFOOT:case h.THEAD:case h.CAPTION:case h.COLGROUP:break;default:bP(e,t)}}function fJ(e,t){if(e.openElements.hasInScope(h.BODY)&&(e.insertionMode=I.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function pJ(e,t){e.openElements.hasInScope(h.BODY)&&(e.insertionMode=I.AFTER_BODY,PP(e,t))}function hJ(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function mJ(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(h.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(h.FORM):n&&e.openElements.remove(n))}function gJ(e){e.openElements.hasInButtonScope(h.P)||e._insertFakeElement(M.P,h.P),e._closePElement()}function yJ(e){e.openElements.hasInListItemScope(h.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(h.LI),e.openElements.popUntilTagNamePopped(h.LI))}function vJ(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function xJ(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function wJ(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function bJ(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(M.BR,h.BR),e.openElements.pop(),e.framesetOk=!1}function EP(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],o=e.openElements.tagIDs[i];if(r===o&&(r!==h.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,o))break}}function Lp(e,t){switch(t.tagID){case h.A:case h.B:case h.I:case h.S:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.NOBR:case h.SMALL:case h.STRIKE:case h.STRONG:{dv(e,t);break}case h.P:{gJ(e);break}case h.DL:case h.UL:case h.OL:case h.DIR:case h.DIV:case h.NAV:case h.PRE:case h.MAIN:case h.MENU:case h.ASIDE:case h.BUTTON:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.ADDRESS:case h.ARTICLE:case h.DETAILS:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.LISTING:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{hJ(e,t);break}case h.LI:{yJ(e);break}case h.DD:case h.DT:{vJ(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{xJ(e);break}case h.BR:{bJ(e);break}case h.BODY:{fJ(e,t);break}case h.HTML:{pJ(e,t);break}case h.FORM:{mJ(e);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{wJ(e,t);break}case h.TEMPLATE:{fo(e,t);break}default:EP(e,t)}}function TP(e,t){e.tmplInsertionModeStack.length>0?NP(e,t):pv(e,t)}function EJ(e,t){var n;t.tagID===h.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function TJ(e,t){e._err(t,U.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function hv(e,t){if(pP.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=I.IN_TABLE_TEXT,t.type){case Ie.CHARACTER:{SP(e,t);break}case Ie.WHITESPACE_CHARACTER:{_P(e,t);break}}else Wl(e,t)}function _J(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,G.HTML),e.insertionMode=I.IN_CAPTION}function SJ(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=I.IN_COLUMN_GROUP}function CJ(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(M.COLGROUP,h.COLGROUP),e.insertionMode=I.IN_COLUMN_GROUP,mv(e,t)}function AJ(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=I.IN_TABLE_BODY}function kJ(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(M.TBODY,h.TBODY),e.insertionMode=I.IN_TABLE_BODY,Fp(e,t)}function RJ(e,t){e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function NJ(e,t){xP(t)?e._appendElement(t,G.HTML):Wl(e,t),t.ackSelfClosing=!0}function PJ(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,G.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Bs(e,t){switch(t.tagID){case h.TD:case h.TH:case h.TR:{kJ(e,t);break}case h.STYLE:case h.SCRIPT:case h.TEMPLATE:{Rr(e,t);break}case h.COL:{CJ(e,t);break}case h.FORM:{PJ(e,t);break}case h.TABLE:{RJ(e,t);break}case h.TBODY:case h.TFOOT:case h.THEAD:{AJ(e,t);break}case h.INPUT:{NJ(e,t);break}case h.CAPTION:{_J(e,t);break}case h.COLGROUP:{SJ(e,t);break}default:Wl(e,t)}}function $l(e,t){switch(t.tagID){case h.TABLE:{e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode());break}case h.TEMPLATE:{fo(e,t);break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:Wl(e,t)}}function Wl(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Dp(e,t),e.fosterParentingEnabled=n}function _P(e,t){e.pendingCharacterTokens.push(t)}function SP(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Yl(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Wl(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const CP=new Set([h.CAPTION,h.COL,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]);function IJ(e,t){const n=t.tagID;CP.has(n)?e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_TABLE,Bs(e,t)):on(e,t)}function OJ(e,t){const n=t.tagID;switch(n){case h.CAPTION:case h.TABLE:{e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_TABLE,n===h.TABLE&&$l(e,t));break}case h.BODY:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:Lp(e,t)}}function mv(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.COL:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case h.TEMPLATE:{Rr(e,t);break}default:Mp(e,t)}}function DJ(e,t){switch(t.tagID){case h.COLGROUP:{e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=I.IN_TABLE);break}case h.TEMPLATE:{fo(e,t);break}case h.COL:break;default:Mp(e,t)}}function Mp(e,t){e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=I.IN_TABLE,e._processToken(t))}function Fp(e,t){switch(t.tagID){case h.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,G.HTML),e.insertionMode=I.IN_ROW;break}case h.TH:case h.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(M.TR,h.TR),e.insertionMode=I.IN_ROW,Bp(e,t);break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE,Bs(e,t));break}default:Bs(e,t)}}function gv(e,t){const n=t.tagID;switch(t.tagID){case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE);break}case h.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE,$l(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:case h.TR:break;default:$l(e,t)}}function Bp(e,t){switch(t.tagID){case h.TH:case h.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,G.HTML),e.insertionMode=I.IN_CELL,e.activeFormattingElements.insertMarker();break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,Fp(e,t));break}default:Bs(e,t)}}function AP(e,t){switch(t.tagID){case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY);break}case h.TABLE:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,gv(e,t));break}case h.TBODY:case h.TFOOT:case h.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(h.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,gv(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:break;default:$l(e,t)}}function LJ(e,t){const n=t.tagID;CP.has(n)?(e.openElements.hasInTableScope(h.TD)||e.openElements.hasInTableScope(h.TH))&&(e._closeTableCell(),Bp(e,t)):on(e,t)}function MJ(e,t){const n=t.tagID;switch(n){case h.TD:case h.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_ROW);break}case h.TABLE:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),AP(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:break;default:Lp(e,t)}}function kP(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._insertElement(t,G.HTML);break}case h.OPTGROUP:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._insertElement(t,G.HTML);break}case h.HR:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case h.INPUT:case h.KEYGEN:case h.TEXTAREA:case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),t.tagID!==h.SELECT&&e._processStartTag(t));break}case h.SCRIPT:case h.TEMPLATE:{Rr(e,t);break}}}function RP(e,t){switch(t.tagID){case h.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===h.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===h.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop();break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop();break}case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode());break}case h.TEMPLATE:{fo(e,t);break}}}function FJ(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e._processStartTag(t)):kP(e,t)}function BJ(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e.onEndTag(t)):RP(e,t)}function jJ(e,t){switch(t.tagID){case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{Rr(e,t);break}case h.CAPTION:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.tmplInsertionModeStack[0]=I.IN_TABLE,e.insertionMode=I.IN_TABLE,Bs(e,t);break}case h.COL:{e.tmplInsertionModeStack[0]=I.IN_COLUMN_GROUP,e.insertionMode=I.IN_COLUMN_GROUP,mv(e,t);break}case h.TR:{e.tmplInsertionModeStack[0]=I.IN_TABLE_BODY,e.insertionMode=I.IN_TABLE_BODY,Fp(e,t);break}case h.TD:case h.TH:{e.tmplInsertionModeStack[0]=I.IN_ROW,e.insertionMode=I.IN_ROW,Bp(e,t);break}default:e.tmplInsertionModeStack[0]=I.IN_BODY,e.insertionMode=I.IN_BODY,on(e,t)}}function UJ(e,t){t.tagID===h.TEMPLATE&&fo(e,t)}function NP(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):pv(e,t)}function HJ(e,t){t.tagID===h.HTML?on(e,t):jp(e,t)}function PP(e,t){var n;if(t.tagID===h.HTML){if(e.fragmentContext||(e.insertionMode=I.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===h.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else jp(e,t)}function jp(e,t){e.insertionMode=I.IN_BODY,Dp(e,t)}function zJ(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.FRAMESET:{e._insertElement(t,G.HTML);break}case h.FRAME:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case h.NOFRAMES:{Rr(e,t);break}}}function VJ(e,t){t.tagID===h.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==h.FRAMESET&&(e.insertionMode=I.AFTER_FRAMESET))}function $J(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.NOFRAMES:{Rr(e,t);break}}}function WJ(e,t){t.tagID===h.HTML&&(e.insertionMode=I.AFTER_AFTER_FRAMESET)}function YJ(e,t){t.tagID===h.HTML?on(e,t):Up(e,t)}function Up(e,t){e.insertionMode=I.IN_BODY,Dp(e,t)}function qJ(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.NOFRAMES:{Rr(e,t);break}}}function GJ(e,t){t.chars=ut,e._insertCharacters(t)}function KJ(e,t){e._insertCharacters(t),e.framesetOk=!1}function IP(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==G.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function XJ(e,t){if(dZ(t))IP(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===G.MATHML?dP(t):r===G.SVG&&(fZ(t),fP(t)),cv(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function QJ(e,t){if(t.tagID===h.P||t.tagID===h.BR){IP(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===G.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}M.AREA,M.BASE,M.BASEFONT,M.BGSOUND,M.BR,M.COL,M.EMBED,M.FRAME,M.HR,M.IMG,M.INPUT,M.KEYGEN,M.LINK,M.META,M.PARAM,M.SOURCE,M.TRACK,M.WBR;const ZJ=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,JJ=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),OP={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function DP(e,t){const n=lee(e),r=FR("type",{handlers:{root:eee,element:tee,text:nee,comment:MP,doctype:ree,raw:aee},unknown:oee}),i={parser:n?new mP(OP):mP.getFragmentParser(void 0,OP),handle(s){r(s,i)},stitches:!1,options:t||{}};r(e,i),js(i,Gr());const a=n?i.parser.document:i.parser.getFragment(),o=cQ(a,{file:i.options.file});return i.stitches&&yp(o,"comment",function(s,u,l){const c=s;if(c.value.stitch&&l&&u!==void 0){const d=l.children;return d[u]=c.value.stitch,u}}),o.type==="root"&&o.children.length===1&&o.children[0].type===e.type?o.children[0]:o}function LP(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function eee(e,t){LP(e.children,t)}function tee(e,t){see(e,t),LP(e.children,t),uee(e,t)}function nee(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ie.CHARACTER,chars:e.value,location:ql(e)};js(t,Gr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ree(e,t){const n={type:Ie.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ql(e)};js(t,Gr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function iee(e,t){t.stitches=!0;const n=cee(e);if("children"in e&&"children"in n){const r=DP({type:"root",children:e.children},t.options);n.children=r.children}MP({type:"comment",value:{stitch:n}},t)}function MP(e,t){const n=e.value,r={type:Ie.COMMENT,data:n,location:ql(e)};js(t,Gr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function aee(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,FP(t,Gr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(ZJ,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function oee(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))iee(n,t);else{let r="";throw JJ.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function js(e,t){FP(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=_t.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function FP(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function see(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===_t.PLAINTEXT)return;js(t,Gr(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:lo.html;i===lo.html&&n==="svg"&&(i=lo.svg);const a=mQ({...e,children:[]},{space:i===lo.svg?"svg":"html"}),o={type:Ie.START_TAG,tagName:n,tagID:Fs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ql(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function uee(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&TQ.includes(n)||t.parser.tokenizer.state===_t.PLAINTEXT)return;js(t,Tp(e));const r={type:Ie.END_TAG,tagName:n,tagID:Fs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ql(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===_t.RCDATA||t.parser.tokenizer.state===_t.RAWTEXT||t.parser.tokenizer.state===_t.SCRIPT_DATA)&&(t.parser.tokenizer.state=_t.DATA)}function lee(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ql(e){const t=Gr(e)||{line:void 0,column:void 0,offset:void 0},n=Tp(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function cee(e){return"children"in e?Ds({...e,children:[]}):Ds(e)}function BP(e){return function(t,n){return DP(t,{...e,file:n})}}function jP({attachment:e}){const{name:t,size:n,type:r,url:i}=e,a=r.startsWith("image/"),o=r.startsWith("video/"),s=r.startsWith("audio/");return E.jsxs("div",{className:"size-fit gap-2 border shrink-0 rounded-2xl overflow-hidden",children:[a&&E.jsx("img",{loading:"lazy",src:i,className:"object-cover size-16"}),o&&E.jsxs("video",{controls:!0,children:[E.jsx("source",{src:i,type:r}),"Your browser does not support the video tag."]}),s&&E.jsxs("audio",{controls:!0,className:"w-full mt-2 rounded-md border",children:[E.jsx("source",{src:i,type:r}),"Your browser does not support the audio tag."]}),!a&&!o&&!s&&E.jsxs("div",{className:"flex items-center gap-2 p-2",children:[E.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 line-clamp-2 underline hover:text-blue-600",children:t}),E.jsxs("span",{className:"text-sm text-gray-500 whitespace-nowrap",children:[(n/1024).toFixed(2)," KB"]})]})]})}function yv({data:e,id:t,type:n,attachments:r}){const{message:i,variant:a="default"}=e;return a==="error"?E.jsx("div",{children:E.jsx("div",{className:"flex flex-row flex-wrap items-center justify-start",children:E.jsx("div",{className:"leading-snug text-sm text-destructive",children:i})})}):E.jsxs("div",{className:"flex flex-col items-start gap-1",children:[E.jsx("div",{className:"gap-1 flex flex-row flex-wrap items-center justify-start",children:r==null?void 0:r.map(o=>E.jsx(jP,{attachment:o},o.id))}),i.length>0&&E.jsx(MN,{"data-type":n,"data-id":t,remarkPlugins:[C3],rehypePlugins:[BP],components:{a:({children:o,...s})=>E.jsx("a",{target:"_top",...s,children:o})},className:Le("w-fit p-2 rounded-2xl bg-secondary border shadow-sm","leading-snug text-sm prose prose-sm prose-a:decoration-primary prose-a:underline"),children:i})]})}function UP(e){const{componentStore:t}=ar();if(e.data.action){const r=t.getComponent(e.data.action.name);if(r)return E.jsx(r,{...e,id:e.id})}const n=t.getComponent(e.component);return n?E.jsx(n,{...e,id:e.id}):E.jsx(yv,{...e})}var vv="Avatar",[dee,lie]=ca(vv),[fee,HP]=dee(vv),zP=v.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=v.useState("idle");return E.jsx(fee,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:E.jsx(zn.span,{...r,ref:t})})});zP.displayName=vv;var VP="AvatarImage",$P=v.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=HP(VP,n),s=pee(r,a.referrerPolicy),u=Yt(l=>{i(l),o.onImageLoadingStatusChange(l)});return or(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?E.jsx(zn.img,{...a,ref:t,src:r}):null});$P.displayName=VP;var WP="AvatarFallback",YP=v.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=HP(WP,n),[o,s]=v.useState(r===void 0);return v.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),o&&a.imageLoadingStatus!=="loaded"?E.jsx(zn.span,{...i,ref:t}):null});YP.displayName=WP;function pee(e,t){const[n,r]=v.useState("idle");return or(()=>{if(!e){r("error");return}let i=!0;const a=new window.Image,o=s=>()=>{i&&r(s)};return r("loading"),a.onload=o("loaded"),a.onerror=o("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var qP=zP,GP=$P,KP=YP;const Gl=v.forwardRef(({className:e,...t},n)=>E.jsx(qP,{ref:n,className:Le("relative flex size-6 aspect-square shrink-0 overflow-hidden rounded-full border bg-secondary",e),...t}));Gl.displayName=qP.displayName;const Hp=v.forwardRef(({className:e,...t},n)=>E.jsx(GP,{ref:n,className:Le("aspect-square h-full w-full",e),...t}));Hp.displayName=GP.displayName;const zp=v.forwardRef(({className:e,...t},n)=>E.jsx(KP,{ref:n,className:Le("flex size-full text-xs items-center justify-center rounded-lg",e),...t}));zp.displayName=KP.displayName;function hee({message:e}){var t;return E.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.attachments&&e.attachments.length>0&&E.jsx("div",{className:"flex gap-1 flex-wrap justify-end",children:(t=e.attachments)==null?void 0:t.map(n=>E.jsx(jP,{attachment:n},n.id))}),e.content.length>0&&E.jsx("div",{className:Le("w-fit p-2 rounded-2xl text-sm","bg-primary text-primary-foreground border shadow-sm"),children:e.content})]})}function mee({messages:e}){var n,r,i,a,o,s;const{user:t}=ms();return E.jsxs("div",{className:Le("group","flex flex-col gap-2 justify-end items-end"),children:[E.jsxs(Gl,{className:"bg-primary text-primary-foreground",children:[E.jsx(Hp,{src:(n=t==null?void 0:t.data)==null?void 0:n.avatarUrl,alt:((r=t==null?void 0:t.data)==null?void 0:r.name)||"User avatar"}),((i=t==null?void 0:t.data)==null?void 0:i.name)&&E.jsx(zp,{children:(s=(o=(a=t==null?void 0:t.data)==null?void 0:a.name)==null?void 0:o.slice(0,1))==null?void 0:s.toUpperCase()})]}),e.map(u=>E.jsx(hee,{message:u},u.id))]})}function gee({messages:e,agent:t}){var n,r;return E.jsxs("div",{className:Le("flex flex-col items-start gap-2"),children:[E.jsx(Kf,{content:t==null?void 0:t.name,side:"right",align:"end",children:E.jsxs(Gl,{children:[E.jsx(Hp,{src:(t==null?void 0:t.avatar)??"",alt:"Agent Icon"}),(t==null?void 0:t.name)&&E.jsx(zp,{children:(r=(n=t==null?void 0:t.name)==null?void 0:n.slice(0,1))==null?void 0:r.toUpperCase()})]})}),e.map(i=>E.jsx(UP,{...i},i.id))]})}function yee(){const{messagesState:{messages:e}}=gs(),{isAwaitingBotReply:t}=fC(),{componentStore:n}=ar(),r=ms(),i=v.useMemo(()=>P$(e),[e.length]),a=!r.initialMessages||r.initialMessages.length===0?["Hello, how can I help you?"]:r.initialMessages,o=n.getComponent("loading"),s=v.useRef(null);function u(){setTimeout(()=>{const l=s.current;l&&(l.scrollTop=l.scrollHeight)},0)}return v.useEffect(()=>{u()},[e]),E.jsxs("div",{"data-messages":!0,ref:s,className:"max-h-full scroll-smooth relative flex-1 p-2 space-y-2 overflow-auto",children:[e.length===0&&a.map((l,c)=>E.jsx(UP,{component:"bot_message",data:{message:l},id:`initial-${c}`,type:"FROM_BOT",agent:r.bot,timestamp:Date.now().toString()},`${l}-${c}`)),i.map((l,c)=>{var f,p;if(!((f=l==null?void 0:l[0])==null?void 0:f.type))return null;if(I$(l))return E.jsx(mee,{messages:l},c);if(O$(l)||D$(l)){const m=(p=l[0])==null?void 0:p.agent;return E.jsx(gee,{messages:l,agent:m},c)}return null}),t&&E.jsx(o,{})]})}function XP({className:e}){return E.jsx(cF,{className:Le("size-4 animate-spin",e)})}function vee(){const{messagesState:{isInitialFetchLoading:e}}=gs(),{sessionState:{session:t}}=fl(),{observedElementRef:n}=I0({fallbackHeight:wE}),r=v.useRef((t==null?void 0:t.id)||"chat").current;return E.jsx("div",{ref:n,className:Le(bg.widgetHeight,"w-full flex flex-col overflow-hidden bg-background"),children:E.jsxs("div",{className:"size-full justify-between flex flex-col",children:[E.jsx(kR,{}),E.jsx(ir,{mode:"wait",children:e?E.jsx(vt,{className:"flex flex-col items-center justify-center w-full flex-1",children:E.jsx(XP,{})},"loading"):E.jsxs(vt,{className:"flex flex-col w-full flex-1 overflow-auto",snapExit:!0,children:[E.jsx(yee,{}),E.jsx(LH,{})]},r)})]})})}var je;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(je||(je={}));var xv;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(xv||(xv={}));const se=je.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ea=e=>{switch(typeof e){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(e)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(e)?se.array:e===null?se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?se.promise:typeof Map<"u"&&e instanceof Map?se.map:typeof Set<"u"&&e instanceof Set?se.set:typeof Date<"u"&&e instanceof Date?se.date:se.object;default:return se.unknown}},Z=je.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),xee=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Yn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}static assert(t){if(!(t instanceof Yn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,je.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Yn.create=e=>new Yn(e);const Us=(e,t)=>{let n;switch(e.code){case Z.invalid_type:e.received===se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,je.jsonStringifyReplacer)}`;break;case Z.unrecognized_keys:n=`Unrecognized key(s) in object: ${je.joinValues(e.keys,", ")}`;break;case Z.invalid_union:n="Invalid input";break;case Z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${je.joinValues(e.options)}`;break;case Z.invalid_enum_value:n=`Invalid enum value. Expected ${je.joinValues(e.options)}, received '${e.received}'`;break;case Z.invalid_arguments:n="Invalid function arguments";break;case Z.invalid_return_type:n="Invalid function return type";break;case Z.invalid_date:n="Invalid date";break;case Z.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:je.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Z.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Z.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Z.custom:n="Invalid input";break;case Z.invalid_intersection_types:n="Intersection results could not be merged";break;case Z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Z.not_finite:n="Number must be finite";break;default:n=t.defaultError,je.assertNever(e)}return{message:n}};let QP=Us;function wee(e){QP=e}function Vp(){return QP}const $p=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},bee=[];function oe(e,t){const n=Vp(),r=$p({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Us?void 0:Us].filter(i=>!!i)});e.common.issues.push(r)}class sn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return we;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return sn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return we;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const we=Object.freeze({status:"aborted"}),Hs=e=>({status:"dirty",value:e}),hn=e=>({status:"valid",value:e}),wv=e=>e.status==="aborted",bv=e=>e.status==="dirty",Kl=e=>e.status==="valid",Xl=e=>typeof Promise<"u"&&e instanceof Promise;function Wp(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function ZP(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var pe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(pe||(pe={}));var Ql,Zl;class Qr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const JP=(e,t)=>{if(Kl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Yn(e.common.issues);return this._error=n,this._error}}};function Ae(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var u,l;const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class Ne{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Ea(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ea(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new sn,ctx:{common:t.parent.common,data:t.data,parsedType:Ea(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Xl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ea(t)},a=this._parseSync({data:t,path:i.path,parent:i});return JP(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ea(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Xl(i)?i:Promise.resolve(i));return JP(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:Z.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ir({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Jr.create(this,this._def)}nullable(){return Ca.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Pr.create(this,this._def)}promise(){return Ws.create(this,this._def)}or(t){return nc.create([this,t],this._def)}and(t){return rc.create(this,t,this._def)}transform(t){return new Ir({...Ae(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new uc({...Ae(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new _v({typeName:ve.ZodBranded,type:this,...Ae(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new lc({...Ae(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return cc.create(this,t)}readonly(){return dc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Eee=/^c[^\s-]{8,}$/i,Tee=/^[0-9a-z]+$/,_ee=/^[0-9A-HJKMNP-TV-Z]{26}$/,See=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Cee=/^[a-z0-9_-]{21}$/i,Aee=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,kee=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ree="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ev;const Nee=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Pee=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Iee=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,eI="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Oee=new RegExp(`^${eI}$`);function tI(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Dee(e){return new RegExp(`^${tI(e)}$`)}function nI(e){let t=`${eI}T${tI(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Lee(e,t){return!!((t==="v4"||!t)&&Nee.test(e)||(t==="v6"||!t)&&Pee.test(e))}class Nr extends Ne{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==se.string){const a=this._getOrReturnCtx(t);return oe(a,{code:Z.invalid_type,expected:se.string,received:a.parsedType}),we}const r=new sn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?oe(i,{code:Z.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&oe(i,{code:Z.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")kee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"email",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Ev||(Ev=new RegExp(Ree,"u")),Ev.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"emoji",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")See.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"uuid",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")Cee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"nanoid",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")Eee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"cuid",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")Tee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"cuid2",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")_ee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"ulid",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),oe(i,{validation:"url",code:Z.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"regex",code:Z.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?nI(a).test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?Oee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?Dee(a).test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?Aee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"duration",code:Z.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?Lee(t.data,a.version)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"ip",code:Z.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?Iee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"base64",code:Z.invalid_string,message:a.message}),r.dirty()):je.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:Z.invalid_string,...pe.errToObj(r)})}_addCheck(t){return new Nr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...pe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...pe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...pe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...pe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...pe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...pe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...pe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...pe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...pe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...pe.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...pe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...pe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...pe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...pe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...pe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...pe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...pe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...pe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...pe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...pe.errToObj(n)})}nonempty(t){return this.min(1,pe.errToObj(t))}trim(){return new Nr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Nr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Nr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Nr.create=e=>{var t;return new Nr({checks:[],typeName:ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ae(e)})};function Mee(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class Ta extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==se.number){const a=this._getOrReturnCtx(t);return oe(a,{code:Z.invalid_type,expected:se.number,received:a.parsedType}),we}let r;const i=new sn;for(const a of this._def.checks)a.kind==="int"?je.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?Mee(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_finite,message:a.message}),i.dirty()):je.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,pe.toString(n))}setLimit(t,n,r,i){return new Ta({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:pe.toString(i)}]})}_addCheck(t){return new Ta({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:pe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:pe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:pe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:pe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:pe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&je.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Ta.create=e=>new Ta({checks:[],typeName:ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ae(e)});class _a extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==se.bigint){const a=this._getOrReturnCtx(t);return oe(a,{code:Z.invalid_type,expected:se.bigint,received:a.parsedType}),we}let r;const i=new sn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):je.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,pe.toString(n))}setLimit(t,n,r,i){return new _a({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:pe.toString(i)}]})}_addCheck(t){return new _a({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:pe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}_a.create=e=>{var t;return new _a({checks:[],typeName:ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ae(e)})};class Jl extends Ne{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==se.boolean){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.boolean,received:r.parsedType}),we}return hn(t.data)}}Jl.create=e=>new Jl({typeName:ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ae(e)});class po extends Ne{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==se.date){const a=this._getOrReturnCtx(t);return oe(a,{code:Z.invalid_type,expected:se.date,received:a.parsedType}),we}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return oe(a,{code:Z.invalid_date}),we}const r=new sn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):je.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new po({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:pe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:pe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}po.create=e=>new po({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ve.ZodDate,...Ae(e)});class Yp extends Ne{_parse(t){if(this._getType(t)!==se.symbol){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.symbol,received:r.parsedType}),we}return hn(t.data)}}Yp.create=e=>new Yp({typeName:ve.ZodSymbol,...Ae(e)});class ec extends Ne{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.undefined,received:r.parsedType}),we}return hn(t.data)}}ec.create=e=>new ec({typeName:ve.ZodUndefined,...Ae(e)});class tc extends Ne{_parse(t){if(this._getType(t)!==se.null){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.null,received:r.parsedType}),we}return hn(t.data)}}tc.create=e=>new tc({typeName:ve.ZodNull,...Ae(e)});class zs extends Ne{constructor(){super(...arguments),this._any=!0}_parse(t){return hn(t.data)}}zs.create=e=>new zs({typeName:ve.ZodAny,...Ae(e)});class ho extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(t){return hn(t.data)}}ho.create=e=>new ho({typeName:ve.ZodUnknown,...Ae(e)});class Ci extends Ne{_parse(t){const n=this._getOrReturnCtx(t);return oe(n,{code:Z.invalid_type,expected:se.never,received:n.parsedType}),we}}Ci.create=e=>new Ci({typeName:ve.ZodNever,...Ae(e)});class qp extends Ne{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.void,received:r.parsedType}),we}return hn(t.data)}}qp.create=e=>new qp({typeName:ve.ZodVoid,...Ae(e)});class Pr extends Ne{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==se.array)return oe(n,{code:Z.invalid_type,expected:se.array,received:n.parsedType}),we;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(oe(n,{code:o?Z.too_big:Z.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(oe(n,{code:Z.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(oe(n,{code:Z.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new Qr(n,o,n.path,s)))).then(o=>sn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new Qr(n,o,n.path,s)));return sn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new Pr({...this._def,minLength:{value:t,message:pe.toString(n)}})}max(t,n){return new Pr({...this._def,maxLength:{value:t,message:pe.toString(n)}})}length(t,n){return new Pr({...this._def,exactLength:{value:t,message:pe.toString(n)}})}nonempty(t){return this.min(1,t)}}Pr.create=(e,t)=>new Pr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Ae(t)});function Vs(e){if(e instanceof mt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Jr.create(Vs(r))}return new mt({...e._def,shape:()=>t})}else return e instanceof Pr?new Pr({...e._def,type:Vs(e.element)}):e instanceof Jr?Jr.create(Vs(e.unwrap())):e instanceof Ca?Ca.create(Vs(e.unwrap())):e instanceof Zr?Zr.create(e.items.map(t=>Vs(t))):e}class mt extends Ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=je.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==se.object){const l=this._getOrReturnCtx(t);return oe(l,{code:Z.invalid_type,expected:se.object,received:l.parsedType}),we}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ci&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const u=[];for(const l of o){const c=a[l],d=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Qr(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Ci){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(oe(i,{code:Z.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const d=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Qr(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const d=await c.key,f=await c.value;l.push({key:d,value:f,alwaysSet:c.alwaysSet})}return l}).then(l=>sn.mergeObjectSync(r,l)):sn.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return pe.errToObj,new mt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=pe.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new mt({...this._def,unknownKeys:"strip"})}passthrough(){return new mt({...this._def,unknownKeys:"passthrough"})}extend(t){return new mt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new mt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new mt({...this._def,catchall:t})}pick(t){const n={};return je.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new mt({...this._def,shape:()=>n})}omit(t){const n={};return je.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new mt({...this._def,shape:()=>n})}deepPartial(){return Vs(this)}partial(t){const n={};return je.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new mt({...this._def,shape:()=>n})}required(t){const n={};return je.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Jr;)a=a._def.innerType;n[r]=a}}),new mt({...this._def,shape:()=>n})}keyof(){return rI(je.objectKeys(this.shape))}}mt.create=(e,t)=>new mt({shape:()=>e,unknownKeys:"strip",catchall:Ci.create(),typeName:ve.ZodObject,...Ae(t)}),mt.strictCreate=(e,t)=>new mt({shape:()=>e,unknownKeys:"strict",catchall:Ci.create(),typeName:ve.ZodObject,...Ae(t)}),mt.lazycreate=(e,t)=>new mt({shape:e,unknownKeys:"strip",catchall:Ci.create(),typeName:ve.ZodObject,...Ae(t)});class nc extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Yn(s.ctx.common.issues));return oe(n,{code:Z.invalid_union,unionErrors:o}),we}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new Yn(u));return oe(n,{code:Z.invalid_union,unionErrors:s}),we}}get options(){return this._def.options}}nc.create=(e,t)=>new nc({options:e,typeName:ve.ZodUnion,...Ae(t)});const Ai=e=>e instanceof ac?Ai(e.schema):e instanceof Ir?Ai(e.innerType()):e instanceof oc?[e.value]:e instanceof Sa?e.options:e instanceof sc?je.objectValues(e.enum):e instanceof uc?Ai(e._def.innerType):e instanceof ec?[void 0]:e instanceof tc?[null]:e instanceof Jr?[void 0,...Ai(e.unwrap())]:e instanceof Ca?[null,...Ai(e.unwrap())]:e instanceof _v||e instanceof dc?Ai(e.unwrap()):e instanceof lc?Ai(e._def.innerType):[];class Gp extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.object)return oe(n,{code:Z.invalid_type,expected:se.object,received:n.parsedType}),we;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(oe(n,{code:Z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),we)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=Ai(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new Gp({typeName:ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Ae(r)})}}function Tv(e,t){const n=Ea(e),r=Ea(t);if(e===t)return{valid:!0,data:e};if(n===se.object&&r===se.object){const i=je.objectKeys(t),a=je.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=Tv(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===se.array&&r===se.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],u=Tv(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===se.date&&r===se.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class rc extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(wv(a)||wv(o))return we;const s=Tv(a.value,o.value);return s.valid?((bv(a)||bv(o))&&n.dirty(),{status:n.value,value:s.data}):(oe(r,{code:Z.invalid_intersection_types}),we)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}rc.create=(e,t,n)=>new rc({left:e,right:t,typeName:ve.ZodIntersection,...Ae(n)});class Zr extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.array)return oe(r,{code:Z.invalid_type,expected:se.array,received:r.parsedType}),we;if(r.data.length<this._def.items.length)return oe(r,{code:Z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),we;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:Z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new Qr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>sn.mergeArray(n,o)):sn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new Zr({...this._def,rest:t})}}Zr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Zr({items:e,typeName:ve.ZodTuple,rest:null,...Ae(t)})};class ic extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.object)return oe(r,{code:Z.invalid_type,expected:se.object,received:r.parsedType}),we;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new Qr(r,s,r.path,s)),value:o._parse(new Qr(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?sn.mergeObjectAsync(n,i):sn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ne?new ic({keyType:t,valueType:n,typeName:ve.ZodRecord,...Ae(r)}):new ic({keyType:Nr.create(),valueType:t,typeName:ve.ZodRecord,...Ae(n)})}}class Kp extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.map)return oe(r,{code:Z.invalid_type,expected:se.map,received:r.parsedType}),we;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new Qr(r,s,r.path,[l,"key"])),value:a._parse(new Qr(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return we;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of o){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return we;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}Kp.create=(e,t,n)=>new Kp({valueType:t,keyType:e,typeName:ve.ZodMap,...Ae(n)});class mo extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.set)return oe(r,{code:Z.invalid_type,expected:se.set,received:r.parsedType}),we;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(oe(r,{code:Z.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(oe(r,{code:Z.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return we;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new Qr(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new mo({...this._def,minSize:{value:t,message:pe.toString(n)}})}max(t,n){return new mo({...this._def,maxSize:{value:t,message:pe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}mo.create=(e,t)=>new mo({valueType:e,minSize:null,maxSize:null,typeName:ve.ZodSet,...Ae(t)});class $s extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.function)return oe(n,{code:Z.invalid_type,expected:se.function,received:n.parsedType}),we;function r(s,u){return $p({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Vp(),Us].filter(l=>!!l),issueData:{code:Z.invalid_arguments,argumentsError:u}})}function i(s,u){return $p({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Vp(),Us].filter(l=>!!l),issueData:{code:Z.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Ws){const s=this;return hn(async function(...u){const l=new Yn([]),c=await s._def.args.parseAsync(u,a).catch(p=>{throw l.addIssue(r(u,p)),l}),d=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(d,a).catch(p=>{throw l.addIssue(i(d,p)),l})})}else{const s=this;return hn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new Yn([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),d=s._def.returns.safeParse(c,a);if(!d.success)throw new Yn([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new $s({...this._def,args:Zr.create(t).rest(ho.create())})}returns(t){return new $s({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new $s({args:t||Zr.create([]).rest(ho.create()),returns:n||ho.create(),typeName:ve.ZodFunction,...Ae(r)})}}class ac extends Ne{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ac.create=(e,t)=>new ac({getter:e,typeName:ve.ZodLazy,...Ae(t)});class oc extends Ne{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return oe(n,{received:n.data,code:Z.invalid_literal,expected:this._def.value}),we}return{status:"valid",value:t.data}}get value(){return this._def.value}}oc.create=(e,t)=>new oc({value:e,typeName:ve.ZodLiteral,...Ae(t)});function rI(e,t){return new Sa({values:e,typeName:ve.ZodEnum,...Ae(t)})}class Sa extends Ne{constructor(){super(...arguments),Ql.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{expected:je.joinValues(r),received:n.parsedType,code:Z.invalid_type}),we}if(Wp(this,Ql)||ZP(this,Ql,new Set(this._def.values)),!Wp(this,Ql).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{received:n.data,code:Z.invalid_enum_value,options:r}),we}return hn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Sa.create(t,{...this._def,...n})}exclude(t,n=this._def){return Sa.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ql=new WeakMap,Sa.create=rI;class sc extends Ne{constructor(){super(...arguments),Zl.set(this,void 0)}_parse(t){const n=je.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==se.string&&r.parsedType!==se.number){const i=je.objectValues(n);return oe(r,{expected:je.joinValues(i),received:r.parsedType,code:Z.invalid_type}),we}if(Wp(this,Zl)||ZP(this,Zl,new Set(je.getValidEnumValues(this._def.values))),!Wp(this,Zl).has(t.data)){const i=je.objectValues(n);return oe(r,{received:r.data,code:Z.invalid_enum_value,options:i}),we}return hn(t.data)}get enum(){return this._def.values}}Zl=new WeakMap,sc.create=(e,t)=>new sc({values:e,typeName:ve.ZodNativeEnum,...Ae(t)});class Ws extends Ne{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.promise&&n.common.async===!1)return oe(n,{code:Z.invalid_type,expected:se.promise,received:n.parsedType}),we;const r=n.parsedType===se.promise?n.data:Promise.resolve(n.data);return hn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ws.create=(e,t)=>new Ws({type:e,typeName:ve.ZodPromise,...Ae(t)});class Ir extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{oe(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return we;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?we:u.status==="dirty"||n.value==="dirty"?Hs(u.value):u});{if(n.value==="aborted")return we;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?we:s.status==="dirty"||n.value==="dirty"?Hs(s.value):s}}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?we:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?we:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Kl(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Kl(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);je.assertNever(i)}}Ir.create=(e,t,n)=>new Ir({schema:e,typeName:ve.ZodEffects,effect:t,...Ae(n)}),Ir.createWithPreprocess=(e,t,n)=>new Ir({schema:t,effect:{type:"preprocess",transform:e},typeName:ve.ZodEffects,...Ae(n)});class Jr extends Ne{_parse(t){return this._getType(t)===se.undefined?hn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jr.create=(e,t)=>new Jr({innerType:e,typeName:ve.ZodOptional,...Ae(t)});class Ca extends Ne{_parse(t){return this._getType(t)===se.null?hn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ca.create=(e,t)=>new Ca({innerType:e,typeName:ve.ZodNullable,...Ae(t)});class uc extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}uc.create=(e,t)=>new uc({innerType:e,typeName:ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ae(t)});class lc extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Xl(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Yn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Yn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}lc.create=(e,t)=>new lc({innerType:e,typeName:ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ae(t)});class Xp extends Ne{_parse(t){if(this._getType(t)!==se.nan){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.nan,received:r.parsedType}),we}return{status:"valid",value:t.data}}}Xp.create=e=>new Xp({typeName:ve.ZodNaN,...Ae(e)});const Fee=Symbol("zod_brand");class _v extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class cc extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?we:a.status==="dirty"?(n.dirty(),Hs(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?we:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new cc({in:t,out:n,typeName:ve.ZodPipeline})}}class dc extends Ne{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Kl(i)&&(i.value=Object.freeze(i.value)),i);return Xl(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}dc.create=(e,t)=>new dc({innerType:e,typeName:ve.ZodReadonly,...Ae(t)});function iI(e,t={},n){return e?zs.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):zs.create()}const Bee={object:mt.lazycreate};var ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ve||(ve={}));const jee=(e,t={message:`Input not instance of ${e.name}`})=>iI(n=>n instanceof e,t),aI=Nr.create,oI=Ta.create,Uee=Xp.create,Hee=_a.create,sI=Jl.create,zee=po.create,Vee=Yp.create,$ee=ec.create,Wee=tc.create,Yee=zs.create,qee=ho.create,Gee=Ci.create,Kee=qp.create,Xee=Pr.create,Qee=mt.create,Zee=mt.strictCreate,Jee=nc.create,ete=Gp.create,tte=rc.create,nte=Zr.create,rte=ic.create,ite=Kp.create,ate=mo.create,ote=$s.create,ste=ac.create,ute=oc.create,lte=Sa.create,cte=sc.create,dte=Ws.create,uI=Ir.create,fte=Jr.create,pte=Ca.create,hte=Ir.createWithPreprocess,mte=cc.create;var Sv=Object.freeze({__proto__:null,defaultErrorMap:Us,setErrorMap:wee,getErrorMap:Vp,makeIssue:$p,EMPTY_PATH:bee,addIssueToContext:oe,ParseStatus:sn,INVALID:we,DIRTY:Hs,OK:hn,isAborted:wv,isDirty:bv,isValid:Kl,isAsync:Xl,get util(){return je},get objectUtil(){return xv},ZodParsedType:se,getParsedType:Ea,ZodType:Ne,datetimeRegex:nI,ZodString:Nr,ZodNumber:Ta,ZodBigInt:_a,ZodBoolean:Jl,ZodDate:po,ZodSymbol:Yp,ZodUndefined:ec,ZodNull:tc,ZodAny:zs,ZodUnknown:ho,ZodNever:Ci,ZodVoid:qp,ZodArray:Pr,ZodObject:mt,ZodUnion:nc,ZodDiscriminatedUnion:Gp,ZodIntersection:rc,ZodTuple:Zr,ZodRecord:ic,ZodMap:Kp,ZodSet:mo,ZodFunction:$s,ZodLazy:ac,ZodLiteral:oc,ZodEnum:Sa,ZodNativeEnum:sc,ZodPromise:Ws,ZodEffects:Ir,ZodTransformer:Ir,ZodOptional:Jr,ZodNullable:Ca,ZodDefault:uc,ZodCatch:lc,ZodNaN:Xp,BRAND:Fee,ZodBranded:_v,ZodPipeline:cc,ZodReadonly:dc,custom:iI,Schema:Ne,ZodSchema:Ne,late:Bee,get ZodFirstPartyTypeKind(){return ve},coerce:{string:e=>Nr.create({...e,coerce:!0}),number:e=>Ta.create({...e,coerce:!0}),boolean:e=>Jl.create({...e,coerce:!0}),bigint:e=>_a.create({...e,coerce:!0}),date:e=>po.create({...e,coerce:!0})},any:Yee,array:Xee,bigint:Hee,boolean:sI,date:zee,discriminatedUnion:ete,effect:uI,enum:lte,function:ote,instanceof:jee,intersection:tte,lazy:ste,literal:ute,map:ite,nan:Uee,nativeEnum:cte,never:Gee,null:Wee,nullable:pte,number:oI,object:Qee,oboolean:()=>sI().optional(),onumber:()=>oI().optional(),optional:fte,ostring:()=>aI().optional(),pipeline:mte,preprocess:hte,promise:dte,record:rte,set:ate,strictObject:Zee,string:aI,symbol:Vee,transformer:uI,tuple:nte,undefined:$ee,union:Jee,unknown:qee,void:Kee,NEVER:we,ZodIssueCode:Z,quotelessJson:xee,ZodError:Yn});const Cv=v.forwardRef(({className:e,type:t,...n},r)=>{const i=Qf();return E.jsx(Xf,{ref:r,children:E.jsx("input",{dir:i,type:t,className:Le("flex w-full rounded-xl border border-input bg-background p-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-primary-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition","rtl:placeholder:text-right",e),...n})})});Cv.displayName="Input";const gte=Sv.object({name:Sv.string().min(2),email:Sv.string().email()});function yte(){var s,u,l;const{createUnverifiedContact:e}=$7(),t=ms(),n=Ts(),{data:r}=Nf(),{observedElementRef:i}=I0({fallbackHeight:xE}),[a,o]=Oj(async c=>{c.preventDefault();const d=new FormData(c.currentTarget),f=Object.fromEntries(d.entries()),p=gte.safeParse(f);p.success&&await e({email:p.data.email,name:p.data.name})});return E.jsxs("div",{ref:i,className:Le(bg.widgetMinHeight,"h-fit bg-primary flex flex-col"),children:[E.jsxs("div",{dir:"auto",className:"flex-1 flex flex-col px-4 py-12 text-start space-y-4 relative z-10",children:[E.jsx("div",{className:"flex items-center justify-between w-full mb-2",children:(s=t.assets)!=null&&s.organizationLogo?E.jsx("img",{src:(u=t.assets)==null?void 0:u.organizationLogo,alt:"Company Logo",className:"h-8 w-auto object-contain"}):E.jsx("h2",{className:"font-bold text-xl text-primary-foreground",dir:"auto",children:(l=r==null?void 0:r.data)==null?void 0:l.organizationName})}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("h1",{className:"text-2xl font-bold text-primary-foreground",dir:"auto",children:n.get("welcome-title")}),E.jsx("p",{className:"text-primary-foreground/90 text-sm max-w-[320px] leading-relaxed",dir:"auto",children:n.get("welcome-description")})]})]}),E.jsx("div",{className:"p-2 bg-background rounded-t-3xl",dir:"auto",children:E.jsxs("form",{onSubmit:o,className:"space-y-2",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx(Cv,{required:!0,autoFocus:!0,placeholder:n.get("your-name"),name:"name",className:"rounded-3xl pl-3"}),E.jsx(Cv,{required:!0,type:"email",placeholder:n.get("your-email"),name:"email",className:"rounded-3xl pl-3"})]}),E.jsxs(sr,{disabled:a.loading,className:"w-full rounded-3xl",size:"lg",children:[a.loading?n.get("starting-chat"):n.get("start-chat"),E.jsx(w_,{className:"size-4 rtl:-scale-100"})]})]})})]})}function vte({session:e}){const{bot:t}=ms(),{toChatScreen:n}=gl(),r=e.assignee.kind==="human"?e.assignee.name||"Support Agent":(t==null?void 0:t.name)||"AI Support Agent",i=e.assignee.kind==="human"?e.assignee.avatarUrl||"":(t==null?void 0:t.avatar)||"";return E.jsxs(sr,{variant:"outline",size:"lg",className:"border-muted rounded-full p-2 flex text-start justify-between w-full whitespace-normal",onClick:()=>n(e.id),children:[E.jsxs("div",{className:"flex-1 flex gap-2 items-center",children:[E.jsx(ir,{mode:"wait",children:E.jsx(vt,{snapExit:!0,children:E.jsx(Gl,{className:"size-10",children:E.jsx(Hp,{src:i,alt:"Agent Icon"})})})}),E.jsxs("div",{children:[E.jsx(ir,{mode:"wait",children:E.jsx(vt,{snapExit:!0,children:r},r)}),E.jsx(ir,{mode:"wait",children:e.lastMessage?E.jsx(vt,{snapExit:!0,children:E.jsx(MN,{remarkPlugins:[C3],rehypePlugins:[BP],className:"line-clamp-1 overflow-hidden text-ellipsis text-xs text-muted-foreground",children:e.lastMessage})},e.lastMessage||"content"):E.jsx(vt,{className:"w-1/2",snapExit:!0,children:E.jsx(AR,{className:"h-4 w-full"})},"skeleton")})]})]}),E.jsx(x_,{className:"size-4 text-muted-foreground shrink-0"})]})}function xte(){const e=Ts(),{toChatScreen:t}=gl(),{sessionsState:{data:n,isInitialFetchLoading:r}}=fl();return E.jsx("div",{className:"flex-1 flex flex-col overflow-scroll p-2",children:E.jsx(ir,{mode:"wait",children:r?E.jsx(vt,{className:"flex-1 flex items-center justify-center",children:E.jsx(XP,{})},"loading"):E.jsx(vt,{className:"flex-1 flex flex-col gap-2 relative",children:n.length?E.jsxs(E.Fragment,{children:[E.jsx(ir,{children:n.map((i,a)=>E.jsx(vt,{snapExit:!0,children:E.jsx(vte,{session:i})},`${i.id}-${a}`))}),E.jsx("div",{className:"mt-auto w-full rounded-3xl sticky bottom-0 outline outline-8 outline-background",children:E.jsx(sr,{size:"lg",className:"w-full rounded-3xl",onClick:()=>t(),children:e.get("new-conversation")},"new-session")})]}):E.jsxs("div",{className:"flex-1 flex flex-col gap-2 items-center",children:[E.jsx("div",{className:"flex-1 flex items-center justify-center",children:E.jsx("p",{className:"text-muted-foreground",children:"No conversations yet"})}),E.jsx(sr,{size:"lg",className:"w-full rounded-3xl",onClick:()=>t(),children:e.get("new-conversation")},"new-session")]})},"sessions")})})}function wte(){const{observedElementRef:e}=I0({fallbackHeight:wE});return E.jsx("div",{ref:e,className:Le(bg.widgetHeight,"w-full flex flex-col overflow-hidden bg-background"),children:E.jsxs("div",{className:"size-full flex flex-col",children:[E.jsx(kR,{}),E.jsx(xte,{})]})})}function bte(){Nf();const{routerState:{screen:e}}=gl();return E.jsx("div",{className:"bg-background size-full",children:E.jsx(ir,{mode:"wait",children:(()=>{switch(e){case"welcome":return E.jsx(vt,{fadeIn:"right",className:"size-full",snapExit:!0,children:E.jsx(yte,{})},e);case"sessions":return E.jsx(vt,{fadeIn:"right",className:"size-full",snapExit:!0,children:E.jsx(wte,{})},e);case"chat":return E.jsx(vt,{fadeIn:"right",className:"size-full",snapExit:!0,children:E.jsx(vee,{})},e);default:return null}})()})})}var Av="focusScope.autoFocusOnMount",kv="focusScope.autoFocusOnUnmount",lI={bubbles:!1,cancelable:!0},Ete="FocusScope",cI=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,u]=v.useState(null),l=Yt(i),c=Yt(a),d=v.useRef(null),f=$r(t,y=>u(y)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let y=function(b){if(p.paused||!s)return;const T=b.target;s.contains(T)?d.current=T:Aa(d.current,{select:!0})},w=function(b){if(p.paused||!s)return;const T=b.relatedTarget;T!==null&&(s.contains(T)||Aa(d.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&Aa(s)};document.addEventListener("focusin",y),document.addEventListener("focusout",w);const x=new MutationObserver(g);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w),x.disconnect()}}},[r,s,p.paused]),v.useEffect(()=>{if(s){pI.add(p);const y=document.activeElement;if(!s.contains(y)){const g=new CustomEvent(Av,lI);s.addEventListener(Av,l),s.dispatchEvent(g),g.defaultPrevented||(Tte(kte(dI(s)),{select:!0}),document.activeElement===y&&Aa(s))}return()=>{s.removeEventListener(Av,l),setTimeout(()=>{const g=new CustomEvent(kv,lI);s.addEventListener(kv,c),s.dispatchEvent(g),g.defaultPrevented||Aa(y??document.body,{select:!0}),s.removeEventListener(kv,c),pI.remove(p)},0)}}},[s,l,c,p]);const m=v.useCallback(y=>{if(!n&&!r||p.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,g=document.activeElement;if(w&&g){const x=y.currentTarget,[b,T]=_te(x);b&&T?!y.shiftKey&&g===T?(y.preventDefault(),n&&Aa(b,{select:!0})):y.shiftKey&&g===b&&(y.preventDefault(),n&&Aa(T,{select:!0})):g===x&&y.preventDefault()}},[n,r,p.paused]);return E.jsx(zn.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});cI.displayName=Ete;function Tte(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Aa(r,{select:t}),document.activeElement!==n)return}function _te(e){const t=dI(e),n=fI(t,e),r=fI(t.reverse(),e);return[n,r]}function dI(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fI(e,t){for(const n of e)if(!Ste(n,{upTo:t}))return n}function Ste(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Cte(e){return e instanceof HTMLInputElement&&"select"in e}function Aa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Cte(e)&&t&&e.select()}}var pI=Ate();function Ate(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=hI(e,t),e.unshift(t)},remove(t){var n;e=hI(e,t),(n=e[0])==null||n.resume()}}}function hI(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kte(e){return e.filter(t=>t.tagName!=="A")}var Qp="right-scroll-bar-position",Zp="width-before-scroll-bar",Rte="with-scroll-bars-hidden",Nte="--removed-body-scroll-bar-size";function Rv(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Pte(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Ite=typeof window<"u"?v.useLayoutEffect:v.useEffect,mI=new WeakMap;function Ote(e,t){var n=Pte(null,function(r){return e.forEach(function(i){return Rv(i,r)})});return Ite(function(){var r=mI.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||Rv(s,null)}),a.forEach(function(s){i.has(s)||Rv(s,o)})}mI.set(n,e)},[e]),n}var gI=xk(),Nv=function(){},Jp=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Nv,onWheelCapture:Nv,onTouchMoveCapture:Nv}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,y=e.allowPinchZoom,w=e.as,g=w===void 0?"div":w,x=e.gapMode,b=il(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,S=Ote([n,t]),_=Mt(Mt({},b),i);return v.createElement(v.Fragment,null,c&&v.createElement(T,{sideCar:gI,removeScrollBar:l,shards:d,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:x}),o?v.cloneElement(v.Children.only(s),Mt(Mt({},_),{ref:S})):v.createElement(g,Mt({},_,{className:u,ref:S}),s))});Jp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Jp.classNames={fullWidth:Zp,zeroRight:Qp};var Dte={left:0,top:0,right:0,gap:0},Pv=function(e){return parseInt(e||"",10)||0},Lte=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Pv(n),Pv(r),Pv(i)]},Mte=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dte;var t=Lte(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Fte=s1(),Ys="data-scroll-locked",Bte=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
409
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const lo={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},HN={}.hasOwnProperty,lQ=Object.prototype;function cQ(e,t){const n=t||{};return iv({file:n.file||void 0,location:!1,schema:n.space==="svg"?ya:Il,verbose:n.verbose||!1},e)}function iv(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Pp(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:zN(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),o=uQ(a),s=o.toPoint(0),u=o.toPoint(a.length);n.position={start:s,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Pp(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Pp(e,r,n),n}default:return n=dQ(e,t),n}}function zN(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=iv(e,t[n]);r.push(i)}return r}function dQ(e,t){const n=e.schema;e.schema=t.namespaceURI===lo.svg?ya:Il;let r=-1;const i={};for(;++r<t.attrs.length;){const s=t.attrs[r],u=(s.prefix?s.prefix+":":"")+s.name;HN.call(lQ,u)||(i[u]=s.value)}const o=(e.schema.space==="svg"?sQ:oQ)(t.tagName,i,zN(e,t.childNodes));if(Pp(e,t,o),o.tagName==="template"){const s=t,u=s.sourceCodeLocation,l=u&&u.startTag&&Ls(u.startTag),c=u&&u.endTag&&Ls(u.endTag),d=iv(e,s.content);l&&c&&e.file&&(d.position={start:l.end,end:c.start}),o.content=d}return e.schema=n,o}function Pp(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=fQ(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function fQ(e,t,n){const r=Ls(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let o;if(n.attrs)for(o in n.attrs)HN.call(n.attrs,o)&&(a[Ep(e.schema,o).property]=Ls(n.attrs[o]));n.startTag;const s=Ls(n.startTag),u=n.endTag?Ls(n.endTag):void 0,l={opening:s};u&&(l.closing=u),l.properties=a,t.data={position:l}}}return r}function Ls(e){const t=VN({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=VN({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function VN(e){return e.line&&e.column?e:void 0}const pQ={},hQ={}.hasOwnProperty,$N=FR("type",{handlers:{root:gQ,element:bQ,text:xQ,comment:wQ,doctype:vQ}});function mQ(e,t){const r=(t||pQ).space;return $N(e,r==="svg"?ya:Il)}function gQ(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=av(e.children,n,t),Ms(e,n),n}function yQ(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=av(e.children,n,t),Ms(e,n),n}function vQ(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ms(e,t),t}function xQ(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ms(e,t),t}function wQ(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ms(e,t),t}function bQ(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ya);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&hQ.call(e.properties,a)){const u=EQ(r,a,e.properties[a]);u&&i.push(u)}}const o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:lo[o],childNodes:[],parentNode:null};return s.childNodes=av(e.children,s,r),Ms(e,s),e.tagName==="template"&&e.content&&(s.content=yQ(e.content,r)),s}function EQ(e,t,n){const r=Ep(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?k3(n):z3(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=lo[r.space]}return i}function av(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=$N(e[r],n);a.parentNode=t,i.push(a)}return i}function Ms(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const TQ=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],_Q=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),ut="�";var C;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(C||(C={}));const Nn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function WN(e){return e>=55296&&e<=57343}function SQ(e){return e>=56320&&e<=57343}function CQ(e,t){return(e-55296)*1024+9216+t}function YN(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function qN(e){return e>=64976&&e<=65007||_Q.has(e)}var U;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(U||(U={}));const AQ=65536;class kQ{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=AQ,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,o=i+n,s=a+n;return{code:t,startLine:r,endLine:r,startCol:o,endCol:o,startOffset:s,endOffset:s}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(SQ(n))return this.pos++,this._addGap(),CQ(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,C.EOF;return this._err(U.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,C.EOF;const r=this.html.charCodeAt(n);return r===C.CARRIAGE_RETURN?C.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,C.EOF;let t=this.html.charCodeAt(this.pos);return t===C.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,C.LINE_FEED):t===C.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,WN(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===C.LINE_FEED||t===C.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){YN(t)?this._err(U.controlCharacterInInputStream):qN(t)&&this._err(U.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ie;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ie||(Ie={}));function GN(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const KN=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),RQ=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var ov;const NQ=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),PQ=(ov=String.fromCodePoint)!==null&&ov!==void 0?ov:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function IQ(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=NQ.get(e))!==null&&t!==void 0?t:e}var Ft;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ft||(Ft={}));const OQ=32;var xa;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(xa||(xa={}));function sv(e){return e>=Ft.ZERO&&e<=Ft.NINE}function DQ(e){return e>=Ft.UPPER_A&&e<=Ft.UPPER_F||e>=Ft.LOWER_A&&e<=Ft.LOWER_F}function LQ(e){return e>=Ft.UPPER_A&&e<=Ft.UPPER_Z||e>=Ft.LOWER_A&&e<=Ft.LOWER_Z||sv(e)}function MQ(e){return e===Ft.EQUALS||LQ(e)}var Bt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Bt||(Bt={}));var Si;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Si||(Si={}));class XN{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Bt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Si.Strict}startEntity(t){this.decodeMode=t,this.state=Bt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Bt.EntityStart:return t.charCodeAt(n)===Ft.NUM?(this.state=Bt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Bt.NamedEntity,this.stateNamedEntity(t,n));case Bt.NumericStart:return this.stateNumericStart(t,n);case Bt.NumericDecimal:return this.stateNumericDecimal(t,n);case Bt.NumericHex:return this.stateNumericHex(t,n);case Bt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|OQ)===Ft.LOWER_X?(this.state=Bt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Bt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(sv(i)||DQ(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(sv(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ft.SEMI)this.consumed+=1;else if(this.decodeMode===Si.Strict)return 0;return this.emitCodePoint(IQ(this.result),this.consumed),this.errors&&(t!==Ft.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&xa.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const o=t.charCodeAt(n);if(this.treeIndex=FQ(r,i,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return this.result===0||this.decodeMode===Si.Attribute&&(a===0||MQ(o))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&xa.VALUE_LENGTH)>>14,a!==0){if(o===Ft.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Si.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&xa.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~xa.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Bt.NamedEntity:return this.result!==0&&(this.decodeMode!==Si.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Bt.NumericDecimal:return this.emitNumericEntity(0,2);case Bt.NumericHex:return this.emitNumericEntity(0,3);case Bt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Bt.EntityStart:return 0}}}function QN(e){let t="";const n=new XN(e,r=>t+=PQ(r));return function(i,a){let o=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(o,s),n.startEntity(a);const l=n.write(i,s+1);if(l<0){o=s+n.end();break}o=s+l,s=l===0?o+1:o}const u=t+i.slice(o);return t="",u}}function FQ(e,t,n,r){const i=(t&xa.BRANCH_LENGTH)>>7,a=t&xa.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let o=n,s=o+i-1;for(;o<=s;){const u=o+s>>>1,l=e[u];if(l<r)o=u+1;else if(l>r)s=u-1;else return e[u+i]}return-1}QN(KN),QN(RQ);var G;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(G||(G={}));var co;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(co||(co={}));var fr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(fr||(fr={}));var M;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(M||(M={}));var h;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(h||(h={}));const BQ=new Map([[M.A,h.A],[M.ADDRESS,h.ADDRESS],[M.ANNOTATION_XML,h.ANNOTATION_XML],[M.APPLET,h.APPLET],[M.AREA,h.AREA],[M.ARTICLE,h.ARTICLE],[M.ASIDE,h.ASIDE],[M.B,h.B],[M.BASE,h.BASE],[M.BASEFONT,h.BASEFONT],[M.BGSOUND,h.BGSOUND],[M.BIG,h.BIG],[M.BLOCKQUOTE,h.BLOCKQUOTE],[M.BODY,h.BODY],[M.BR,h.BR],[M.BUTTON,h.BUTTON],[M.CAPTION,h.CAPTION],[M.CENTER,h.CENTER],[M.CODE,h.CODE],[M.COL,h.COL],[M.COLGROUP,h.COLGROUP],[M.DD,h.DD],[M.DESC,h.DESC],[M.DETAILS,h.DETAILS],[M.DIALOG,h.DIALOG],[M.DIR,h.DIR],[M.DIV,h.DIV],[M.DL,h.DL],[M.DT,h.DT],[M.EM,h.EM],[M.EMBED,h.EMBED],[M.FIELDSET,h.FIELDSET],[M.FIGCAPTION,h.FIGCAPTION],[M.FIGURE,h.FIGURE],[M.FONT,h.FONT],[M.FOOTER,h.FOOTER],[M.FOREIGN_OBJECT,h.FOREIGN_OBJECT],[M.FORM,h.FORM],[M.FRAME,h.FRAME],[M.FRAMESET,h.FRAMESET],[M.H1,h.H1],[M.H2,h.H2],[M.H3,h.H3],[M.H4,h.H4],[M.H5,h.H5],[M.H6,h.H6],[M.HEAD,h.HEAD],[M.HEADER,h.HEADER],[M.HGROUP,h.HGROUP],[M.HR,h.HR],[M.HTML,h.HTML],[M.I,h.I],[M.IMG,h.IMG],[M.IMAGE,h.IMAGE],[M.INPUT,h.INPUT],[M.IFRAME,h.IFRAME],[M.KEYGEN,h.KEYGEN],[M.LABEL,h.LABEL],[M.LI,h.LI],[M.LINK,h.LINK],[M.LISTING,h.LISTING],[M.MAIN,h.MAIN],[M.MALIGNMARK,h.MALIGNMARK],[M.MARQUEE,h.MARQUEE],[M.MATH,h.MATH],[M.MENU,h.MENU],[M.META,h.META],[M.MGLYPH,h.MGLYPH],[M.MI,h.MI],[M.MO,h.MO],[M.MN,h.MN],[M.MS,h.MS],[M.MTEXT,h.MTEXT],[M.NAV,h.NAV],[M.NOBR,h.NOBR],[M.NOFRAMES,h.NOFRAMES],[M.NOEMBED,h.NOEMBED],[M.NOSCRIPT,h.NOSCRIPT],[M.OBJECT,h.OBJECT],[M.OL,h.OL],[M.OPTGROUP,h.OPTGROUP],[M.OPTION,h.OPTION],[M.P,h.P],[M.PARAM,h.PARAM],[M.PLAINTEXT,h.PLAINTEXT],[M.PRE,h.PRE],[M.RB,h.RB],[M.RP,h.RP],[M.RT,h.RT],[M.RTC,h.RTC],[M.RUBY,h.RUBY],[M.S,h.S],[M.SCRIPT,h.SCRIPT],[M.SEARCH,h.SEARCH],[M.SECTION,h.SECTION],[M.SELECT,h.SELECT],[M.SOURCE,h.SOURCE],[M.SMALL,h.SMALL],[M.SPAN,h.SPAN],[M.STRIKE,h.STRIKE],[M.STRONG,h.STRONG],[M.STYLE,h.STYLE],[M.SUB,h.SUB],[M.SUMMARY,h.SUMMARY],[M.SUP,h.SUP],[M.TABLE,h.TABLE],[M.TBODY,h.TBODY],[M.TEMPLATE,h.TEMPLATE],[M.TEXTAREA,h.TEXTAREA],[M.TFOOT,h.TFOOT],[M.TD,h.TD],[M.TH,h.TH],[M.THEAD,h.THEAD],[M.TITLE,h.TITLE],[M.TR,h.TR],[M.TRACK,h.TRACK],[M.TT,h.TT],[M.U,h.U],[M.UL,h.UL],[M.SVG,h.SVG],[M.VAR,h.VAR],[M.WBR,h.WBR],[M.XMP,h.XMP]]);function Fs(e){var t;return(t=BQ.get(e))!==null&&t!==void 0?t:h.UNKNOWN}const K=h,jQ={[G.HTML]:new Set([K.ADDRESS,K.APPLET,K.AREA,K.ARTICLE,K.ASIDE,K.BASE,K.BASEFONT,K.BGSOUND,K.BLOCKQUOTE,K.BODY,K.BR,K.BUTTON,K.CAPTION,K.CENTER,K.COL,K.COLGROUP,K.DD,K.DETAILS,K.DIR,K.DIV,K.DL,K.DT,K.EMBED,K.FIELDSET,K.FIGCAPTION,K.FIGURE,K.FOOTER,K.FORM,K.FRAME,K.FRAMESET,K.H1,K.H2,K.H3,K.H4,K.H5,K.H6,K.HEAD,K.HEADER,K.HGROUP,K.HR,K.HTML,K.IFRAME,K.IMG,K.INPUT,K.LI,K.LINK,K.LISTING,K.MAIN,K.MARQUEE,K.MENU,K.META,K.NAV,K.NOEMBED,K.NOFRAMES,K.NOSCRIPT,K.OBJECT,K.OL,K.P,K.PARAM,K.PLAINTEXT,K.PRE,K.SCRIPT,K.SECTION,K.SELECT,K.SOURCE,K.STYLE,K.SUMMARY,K.TABLE,K.TBODY,K.TD,K.TEMPLATE,K.TEXTAREA,K.TFOOT,K.TH,K.THEAD,K.TITLE,K.TR,K.TRACK,K.UL,K.WBR,K.XMP]),[G.MATHML]:new Set([K.MI,K.MO,K.MN,K.MS,K.MTEXT,K.ANNOTATION_XML]),[G.SVG]:new Set([K.TITLE,K.FOREIGN_OBJECT,K.DESC]),[G.XLINK]:new Set,[G.XML]:new Set,[G.XMLNS]:new Set},uv=new Set([K.H1,K.H2,K.H3,K.H4,K.H5,K.H6]);M.STYLE,M.SCRIPT,M.XMP,M.IFRAME,M.NOEMBED,M.NOFRAMES,M.PLAINTEXT;var R;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(R||(R={}));const _t={DATA:R.DATA,RCDATA:R.RCDATA,RAWTEXT:R.RAWTEXT,SCRIPT_DATA:R.SCRIPT_DATA,PLAINTEXT:R.PLAINTEXT,CDATA_SECTION:R.CDATA_SECTION};function UQ(e){return e>=C.DIGIT_0&&e<=C.DIGIT_9}function Fl(e){return e>=C.LATIN_CAPITAL_A&&e<=C.LATIN_CAPITAL_Z}function HQ(e){return e>=C.LATIN_SMALL_A&&e<=C.LATIN_SMALL_Z}function wa(e){return HQ(e)||Fl(e)}function ZN(e){return wa(e)||UQ(e)}function Ip(e){return e+32}function JN(e){return e===C.SPACE||e===C.LINE_FEED||e===C.TABULATION||e===C.FORM_FEED}function eP(e){return JN(e)||e===C.SOLIDUS||e===C.GREATER_THAN_SIGN}function zQ(e){return e===C.NULL?U.nullCharacterReference:e>1114111?U.characterReferenceOutsideUnicodeRange:WN(e)?U.surrogateCharacterReference:qN(e)?U.noncharacterCharacterReference:YN(e)||e===C.CARRIAGE_RETURN?U.controlCharacterReference:null}class VQ{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=R.DATA,this.returnState=R.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new kQ(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new XN(KN,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(U.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(U.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=zQ(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Ie.START_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ie.END_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ie.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ie.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(GN(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(U.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Fs(t.tagName),t.type===Ie.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(U.endTagWithAttributes),t.selfClosing&&this._err(U.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ie.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ie.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ie.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ie.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=JN(t)?Ie.WHITESPACE_CHARACTER:t===C.NULL?Ie.NULL_CHARACTER:Ie.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ie.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=R.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Si.Attribute:Si.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===R.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case R.DATA:{this._stateData(t);break}case R.RCDATA:{this._stateRcdata(t);break}case R.RAWTEXT:{this._stateRawtext(t);break}case R.SCRIPT_DATA:{this._stateScriptData(t);break}case R.PLAINTEXT:{this._statePlaintext(t);break}case R.TAG_OPEN:{this._stateTagOpen(t);break}case R.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case R.TAG_NAME:{this._stateTagName(t);break}case R.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case R.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case R.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case R.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case R.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case R.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case R.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case R.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case R.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case R.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case R.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case R.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case R.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case R.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case R.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case R.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case R.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case R.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case R.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case R.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case R.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case R.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case R.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case R.BOGUS_COMMENT:{this._stateBogusComment(t);break}case R.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case R.COMMENT_START:{this._stateCommentStart(t);break}case R.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case R.COMMENT:{this._stateComment(t);break}case R.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case R.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case R.COMMENT_END:{this._stateCommentEnd(t);break}case R.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case R.DOCTYPE:{this._stateDoctype(t);break}case R.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case R.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case R.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case R.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case R.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case R.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case R.CDATA_SECTION:{this._stateCdataSection(t);break}case R.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case R.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case R.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case R.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=R.TAG_OPEN;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitCodePoint(t);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case C.AMPERSAND:{this._startCharacterReference();break}case C.LESS_THAN_SIGN:{this.state=R.RCDATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ut);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case C.LESS_THAN_SIGN:{this.state=R.RAWTEXT_LESS_THAN_SIGN;break}case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ut);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ut);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ut);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(wa(t))this._createStartTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case C.EXCLAMATION_MARK:{this.state=R.MARKUP_DECLARATION_OPEN;break}case C.SOLIDUS:{this.state=R.END_TAG_OPEN;break}case C.QUESTION_MARK:{this._err(U.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t);break}case C.EOF:{this._err(U.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(U.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=R.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(wa(t))this._createEndTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case C.GREATER_THAN_SIGN:{this._err(U.missingEndTagName),this.state=R.DATA;break}case C.EOF:{this._err(U.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(U.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=R.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.tagName+=ut;break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Fl(t)?Ip(t):t)}}_stateRcdataLessThanSign(t){t===C.SOLIDUS?this.state=R.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){wa(t)?(this.state=R.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=R.BEFORE_ATTRIBUTE_NAME,!1;case C.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=R.SELF_CLOSING_START_TAG,!1;case C.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=R.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===C.SOLIDUS?this.state=R.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){wa(t)?(this.state=R.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case C.SOLIDUS:{this.state=R.SCRIPT_DATA_END_TAG_OPEN;break}case C.EXCLAMATION_MARK:{this.state=R.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=R.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){wa(t)?(this.state=R.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===C.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===C.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ut);break}case C.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(ut);break}case C.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(ut);break}case C.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===C.SOLIDUS?this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:wa(t)?(this._emitChars("<"),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){wa(t)?(this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Nn.SCRIPT,!1)&&eP(this.preprocessor.peek(Nn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Nn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ut);break}case C.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ut);break}case C.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ut);break}case C.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===C.SOLIDUS?(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Nn.SCRIPT,!1)&&eP(this.preprocessor.peek(Nn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Nn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._err(U.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=R.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this._leaveAttrName(),this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._leaveAttrName(),this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:{this._err(U.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.name+=ut;break}default:this.currentAttr.name+=String.fromCodePoint(Fl(t)?Ip(t):t)}}_stateAfterAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case C.EQUALS_SIGN:{this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{this.state=R.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this.state=R.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(U.missingAttributeValue),this.state=R.DATA,this.emitCurrentTagToken();break}default:this.state=R.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case C.QUOTATION_MARK:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=ut;break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case C.APOSTROPHE:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=ut;break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=ut;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:case C.EQUALS_SIGN:case C.GRAVE_ACCENT:{this._err(U.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this._leaveAttrValue(),this.state=R.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._err(U.missingWhitespaceBetweenAttributes),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case C.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=R.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._err(U.unexpectedSolidusInTag),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case C.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.data+=ut;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Nn.DASH_DASH,!0)?(this._createCommentToken(Nn.DASH_DASH.length+1),this.state=R.COMMENT_START):this._consumeSequenceIfMatch(Nn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Nn.DOCTYPE.length+1),this.state=R.DOCTYPE):this._consumeSequenceIfMatch(Nn.CDATA_START,!0)?this.inForeignNode?this.state=R.CDATA_SECTION:(this._err(U.cdataInHtmlContent),this._createCommentToken(Nn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=R.BOGUS_COMMENT):this._ensureHibernation()||(this._err(U.incorrectlyOpenedComment),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case C.HYPHEN_MINUS:{this.state=R.COMMENT_START_DASH;break}case C.GREATER_THAN_SIGN:{this._err(U.abruptClosingOfEmptyComment),this.state=R.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case C.GREATER_THAN_SIGN:{this._err(U.abruptClosingOfEmptyComment),this.state=R.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=R.COMMENT_END_DASH;break}case C.LESS_THAN_SIGN:{n.data+="<",this.state=R.COMMENT_LESS_THAN_SIGN;break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.data+=ut;break}case C.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case C.EXCLAMATION_MARK:{n.data+="!",this.state=R.COMMENT_LESS_THAN_SIGN_BANG;break}case C.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===C.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=R.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===C.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=R.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==C.GREATER_THAN_SIGN&&t!==C.EOF&&this._err(U.nestedComment),this.state=R.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case C.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case C.EXCLAMATION_MARK:{this.state=R.COMMENT_END_BANG;break}case C.HYPHEN_MINUS:{n.data+="-";break}case C.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{n.data+="--!",this.state=R.COMMENT_END_DASH;break}case C.GREATER_THAN_SIGN:{this._err(U.incorrectlyClosedComment),this.state=R.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=R.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case C.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingWhitespaceBeforeDoctypeName),this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Fl(t))this._createDoctypeToken(String.fromCharCode(Ip(t))),this.state=R.DOCTYPE_NAME;else switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.NULL:{this._err(U.unexpectedNullCharacter),this._createDoctypeToken(ut),this.state=R.DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this._err(U.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=R.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=R.AFTER_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.name+=ut;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Fl(t)?Ip(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Nn.PUBLIC,!1)?this.state=R.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Nn.SYSTEM,!1)?this.state=R.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(U.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(U.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(U.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(U.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(U.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.publicId+=ut;break}case C.GREATER_THAN_SIGN:{this._err(U.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case C.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.publicId+=ut;break}case C.GREATER_THAN_SIGN:{this._err(U.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case C.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.QUOTATION_MARK:{this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(U.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(U.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.systemId+=ut;break}case C.GREATER_THAN_SIGN:{this._err(U.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case C.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(U.unexpectedNullCharacter),n.systemId+=ut;break}case C.GREATER_THAN_SIGN:{this._err(U.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case C.NULL:{this._err(U.unexpectedNullCharacter);break}case C.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case C.RIGHT_SQUARE_BRACKET:{this.state=R.CDATA_SECTION_BRACKET;break}case C.EOF:{this._err(U.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===C.RIGHT_SQUARE_BRACKET?this.state=R.CDATA_SECTION_END:(this._emitChars("]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case C.GREATER_THAN_SIGN:{this.state=R.DATA;break}case C.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(C.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ZN(this.preprocessor.peek(1))?R.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ZN(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===C.SEMICOLON&&this._err(U.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const tP=new Set([h.DD,h.DT,h.LI,h.OPTGROUP,h.OPTION,h.P,h.RB,h.RP,h.RT,h.RTC]),nP=new Set([...tP,h.CAPTION,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]),Op=new Set([h.APPLET,h.CAPTION,h.HTML,h.MARQUEE,h.OBJECT,h.TABLE,h.TD,h.TEMPLATE,h.TH]),$Q=new Set([...Op,h.OL,h.UL]),WQ=new Set([...Op,h.BUTTON]),rP=new Set([h.ANNOTATION_XML,h.MI,h.MN,h.MO,h.MS,h.MTEXT]),iP=new Set([h.DESC,h.FOREIGN_OBJECT,h.TITLE]),YQ=new Set([h.TR,h.TEMPLATE,h.HTML]),qQ=new Set([h.TBODY,h.TFOOT,h.THEAD,h.TEMPLATE,h.HTML]),GQ=new Set([h.TABLE,h.TEMPLATE,h.HTML]),KQ=new Set([h.TD,h.TH]);class XQ{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=h.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===h.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===G.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==G.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(n<0?0:n)}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(uv,G.HTML)}popUntilTableCellPopped(){this.popUntilPopped(KQ,G.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(GQ,G.HTML)}clearBackToTableBodyContext(){this.clearBackTo(qQ,G.HTML)}clearBackToTableRowContext(){this.clearBackTo(YQ,G.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===h.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===h.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case G.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case G.SVG:{if(iP.has(i))return!1;break}case G.MATHML:{if(rP.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Op)}hasInListItemScope(t){return this.hasInDynamicScope(t,$Q)}hasInButtonScope(t){return this.hasInDynamicScope(t,WQ)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case G.HTML:{if(uv.has(n))return!0;if(Op.has(n))return!1;break}case G.SVG:{if(iP.has(n))return!1;break}case G.MATHML:{if(rP.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===G.HTML)switch(this.tagIDs[n]){case t:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===G.HTML)switch(this.tagIDs[t]){case h.TBODY:case h.THEAD:case h.TFOOT:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===G.HTML)switch(this.tagIDs[n]){case t:return!0;case h.OPTION:case h.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;tP.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;nP.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&nP.has(this.currentTagId);)this.pop()}}const lv=3;var Xr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Xr||(Xr={}));const aP={type:Xr.Marker};class QQ{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let s=0;s<this.entries.length;s++){const u=this.entries[s];if(u.type===Xr.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===o){const c=this.treeAdapter.getAttrList(l);c.length===i&&r.push({idx:s,attrs:c})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<lv)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<lv)return;const i=new Map(n.map(o=>[o.name,o.value]));let a=0;for(let o=0;o<r.length;o++){const s=r[o];s.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=lv&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(aP)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Xr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Xr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(aP);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Xr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Xr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Xr.Element&&n.element===t)}}const ba={createDocument(){return{nodeName:"#document",mode:fr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};ba.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(ba.isTextNode(n)){n.value+=t;return}}ba.appendChild(e,ba.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ba.isTextNode(r)?r.value+=t:ba.insertBefore(e,ba.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},oP="html",ZQ="about:legacy-compat",JQ="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",sP=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],eZ=[...sP,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],tZ=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),uP=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],nZ=[...uP,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function lP(e,t){return t.some(n=>e.startsWith(n))}function rZ(e){return e.name===oP&&e.publicId===null&&(e.systemId===null||e.systemId===ZQ)}function iZ(e){if(e.name!==oP)return fr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===JQ)return fr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),tZ.has(n))return fr.QUIRKS;let r=t===null?eZ:sP;if(lP(n,r))return fr.QUIRKS;if(r=t===null?uP:nZ,lP(n,r))return fr.LIMITED_QUIRKS}return fr.NO_QUIRKS}const cP={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},aZ="definitionurl",oZ="definitionURL",sZ=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),uZ=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:G.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:G.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:G.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:G.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:G.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:G.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:G.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:G.XML}],["xml:space",{prefix:"xml",name:"space",namespace:G.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:G.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:G.XMLNS}]]),lZ=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),cZ=new Set([h.B,h.BIG,h.BLOCKQUOTE,h.BODY,h.BR,h.CENTER,h.CODE,h.DD,h.DIV,h.DL,h.DT,h.EM,h.EMBED,h.H1,h.H2,h.H3,h.H4,h.H5,h.H6,h.HEAD,h.HR,h.I,h.IMG,h.LI,h.LISTING,h.MENU,h.META,h.NOBR,h.OL,h.P,h.PRE,h.RUBY,h.S,h.SMALL,h.SPAN,h.STRONG,h.STRIKE,h.SUB,h.SUP,h.TABLE,h.TT,h.U,h.UL,h.VAR]);function dZ(e){const t=e.tagID;return t===h.FONT&&e.attrs.some(({name:r})=>r===co.COLOR||r===co.SIZE||r===co.FACE)||cZ.has(t)}function dP(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===aZ){e.attrs[t].name=oZ;break}}function fP(e){for(let t=0;t<e.attrs.length;t++){const n=sZ.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function cv(e){for(let t=0;t<e.attrs.length;t++){const n=uZ.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function fZ(e){const t=lZ.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Fs(e.tagName))}function pZ(e,t){return t===G.MATHML&&(e===h.MI||e===h.MO||e===h.MN||e===h.MS||e===h.MTEXT)}function hZ(e,t,n){if(t===G.MATHML&&e===h.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===co.ENCODING){const i=n[r].value.toLowerCase();return i===cP.TEXT_HTML||i===cP.APPLICATION_XML}}return t===G.SVG&&(e===h.FOREIGN_OBJECT||e===h.DESC||e===h.TITLE)}function mZ(e,t,n,r){return(!r||r===G.HTML)&&hZ(e,t,n)||(!r||r===G.MATHML)&&pZ(e,t)}const gZ="hidden",yZ=8,vZ=3;var I;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(I||(I={}));const xZ={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},pP=new Set([h.TABLE,h.TBODY,h.TFOOT,h.THEAD,h.TR]),hP={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ba,onParseError:null};class mP{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=I.INITIAL,this.originalInsertionMode=I.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...hP,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new VQ(this.options,this),this.activeFormattingElements=new QQ(this.treeAdapter),this.fragmentContextID=r?Fs(this.treeAdapter.getTagName(r)):h.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new XQ(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...hP,...n};t??(t=r.treeAdapter.createElement(M.TEMPLATE,G.HTML,[]));const i=r.treeAdapter.createElement("documentmock",G.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===h.TEMPLATE&&a.tmplInsertionModeStack.unshift(I.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:xZ,o={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(o)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,o;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,o=this.fragmentContextID):{current:a,currentTagId:o}=this.openElements,this._setContextModes(a,o)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===G.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,G.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=I.TEXT}switchToPlaintextParsing(){this.insertionMode=I.TEXT,this.originalInsertionMode=I.IN_BODY,this.tokenizer.state=_t.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===M.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==G.HTML))switch(this.fragmentContextID){case h.TITLE:case h.TEXTAREA:{this.tokenizer.state=_t.RCDATA;break}case h.STYLE:case h.XMP:case h.IFRAME:case h.NOEMBED:case h.NOFRAMES:case h.NOSCRIPT:{this.tokenizer.state=_t.RAWTEXT;break}case h.SCRIPT:{this.tokenizer.state=_t.SCRIPT_DATA;break}case h.PLAINTEXT:{this.tokenizer.state=_t.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const o=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,G.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,G.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(M.HTML,G.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,h.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,o=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:u,endCol:l,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:u,endCol:l,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===Ie.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===h.SVG&&this.treeAdapter.getTagName(n)===M.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===G.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===h.MGLYPH||t.tagID===h.MALIGNMARK)&&!this._isIntegrationPoint(r,n,G.HTML)}_processToken(t){switch(t.type){case Ie.CHARACTER:{this.onCharacter(t);break}case Ie.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ie.COMMENT:{this.onComment(t);break}case Ie.DOCTYPE:{this.onDoctype(t);break}case Ie.START_TAG:{this._processStartTag(t);break}case Ie.END_TAG:{this.onEndTag(t);break}case Ie.EOF:{this.onEof(t);break}case Ie.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return mZ(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Xr.Marker||this.openElements.contains(i.element)),r=n<0?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=I.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(h.P),this.openElements.popUntilTagNamePopped(h.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case h.TR:{this.insertionMode=I.IN_ROW;return}case h.TBODY:case h.THEAD:case h.TFOOT:{this.insertionMode=I.IN_TABLE_BODY;return}case h.CAPTION:{this.insertionMode=I.IN_CAPTION;return}case h.COLGROUP:{this.insertionMode=I.IN_COLUMN_GROUP;return}case h.TABLE:{this.insertionMode=I.IN_TABLE;return}case h.BODY:{this.insertionMode=I.IN_BODY;return}case h.FRAMESET:{this.insertionMode=I.IN_FRAMESET;return}case h.SELECT:{this._resetInsertionModeForSelect(t);return}case h.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case h.HTML:{this.insertionMode=this.headElement?I.AFTER_HEAD:I.BEFORE_HEAD;return}case h.TD:case h.TH:{if(t>0){this.insertionMode=I.IN_CELL;return}break}case h.HEAD:{if(t>0){this.insertionMode=I.IN_HEAD;return}break}}this.insertionMode=I.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===h.TEMPLATE)break;if(r===h.TABLE){this.insertionMode=I.IN_SELECT_IN_TABLE;return}}this.insertionMode=I.IN_SELECT}_isElementCausesFosterParenting(t){return pP.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case h.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===G.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case h.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return jQ[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){KJ(this,t);return}switch(this.insertionMode){case I.INITIAL:{Bl(this,t);break}case I.BEFORE_HTML:{jl(this,t);break}case I.BEFORE_HEAD:{Ul(this,t);break}case I.IN_HEAD:{Hl(this,t);break}case I.IN_HEAD_NO_SCRIPT:{zl(this,t);break}case I.AFTER_HEAD:{Vl(this,t);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:{yP(this,t);break}case I.TEXT:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{hv(this,t);break}case I.IN_TABLE_TEXT:{SP(this,t);break}case I.IN_COLUMN_GROUP:{Mp(this,t);break}case I.AFTER_BODY:{jp(this,t);break}case I.AFTER_AFTER_BODY:{Up(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){GJ(this,t);return}switch(this.insertionMode){case I.INITIAL:{Bl(this,t);break}case I.BEFORE_HTML:{jl(this,t);break}case I.BEFORE_HEAD:{Ul(this,t);break}case I.IN_HEAD:{Hl(this,t);break}case I.IN_HEAD_NO_SCRIPT:{zl(this,t);break}case I.AFTER_HEAD:{Vl(this,t);break}case I.TEXT:{this._insertCharacters(t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{hv(this,t);break}case I.IN_COLUMN_GROUP:{Mp(this,t);break}case I.AFTER_BODY:{jp(this,t);break}case I.AFTER_AFTER_BODY:{Up(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){fv(this,t);return}switch(this.insertionMode){case I.INITIAL:case I.BEFORE_HTML:case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_TEMPLATE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{fv(this,t);break}case I.IN_TABLE_TEXT:{Yl(this,t);break}case I.AFTER_BODY:{CZ(this,t);break}case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{AZ(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case I.INITIAL:{kZ(this,t);break}case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:{this._err(t,U.misplacedDoctype);break}case I.IN_TABLE_TEXT:{Yl(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,U.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?XJ(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case I.INITIAL:{Bl(this,t);break}case I.BEFORE_HTML:{RZ(this,t);break}case I.BEFORE_HEAD:{PZ(this,t);break}case I.IN_HEAD:{Rr(this,t);break}case I.IN_HEAD_NO_SCRIPT:{DZ(this,t);break}case I.AFTER_HEAD:{MZ(this,t);break}case I.IN_BODY:{on(this,t);break}case I.IN_TABLE:{Bs(this,t);break}case I.IN_TABLE_TEXT:{Yl(this,t);break}case I.IN_CAPTION:{IJ(this,t);break}case I.IN_COLUMN_GROUP:{mv(this,t);break}case I.IN_TABLE_BODY:{Fp(this,t);break}case I.IN_ROW:{Bp(this,t);break}case I.IN_CELL:{LJ(this,t);break}case I.IN_SELECT:{kP(this,t);break}case I.IN_SELECT_IN_TABLE:{FJ(this,t);break}case I.IN_TEMPLATE:{jJ(this,t);break}case I.AFTER_BODY:{HJ(this,t);break}case I.IN_FRAMESET:{zJ(this,t);break}case I.AFTER_FRAMESET:{$J(this,t);break}case I.AFTER_AFTER_BODY:{YJ(this,t);break}case I.AFTER_AFTER_FRAMESET:{qJ(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?QJ(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case I.INITIAL:{Bl(this,t);break}case I.BEFORE_HTML:{NZ(this,t);break}case I.BEFORE_HEAD:{IZ(this,t);break}case I.IN_HEAD:{OZ(this,t);break}case I.IN_HEAD_NO_SCRIPT:{LZ(this,t);break}case I.AFTER_HEAD:{FZ(this,t);break}case I.IN_BODY:{Lp(this,t);break}case I.TEXT:{EJ(this,t);break}case I.IN_TABLE:{$l(this,t);break}case I.IN_TABLE_TEXT:{Yl(this,t);break}case I.IN_CAPTION:{OJ(this,t);break}case I.IN_COLUMN_GROUP:{DJ(this,t);break}case I.IN_TABLE_BODY:{gv(this,t);break}case I.IN_ROW:{AP(this,t);break}case I.IN_CELL:{MJ(this,t);break}case I.IN_SELECT:{RP(this,t);break}case I.IN_SELECT_IN_TABLE:{BJ(this,t);break}case I.IN_TEMPLATE:{UJ(this,t);break}case I.AFTER_BODY:{PP(this,t);break}case I.IN_FRAMESET:{VJ(this,t);break}case I.AFTER_FRAMESET:{WJ(this,t);break}case I.AFTER_AFTER_BODY:{Up(this,t);break}}}onEof(t){switch(this.insertionMode){case I.INITIAL:{Bl(this,t);break}case I.BEFORE_HTML:{jl(this,t);break}case I.BEFORE_HEAD:{Ul(this,t);break}case I.IN_HEAD:{Hl(this,t);break}case I.IN_HEAD_NO_SCRIPT:{zl(this,t);break}case I.AFTER_HEAD:{Vl(this,t);break}case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{TP(this,t);break}case I.TEXT:{TJ(this,t);break}case I.IN_TABLE_TEXT:{Yl(this,t);break}case I.IN_TEMPLATE:{NP(this,t);break}case I.AFTER_BODY:case I.IN_FRAMESET:case I.AFTER_FRAMESET:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{pv(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===C.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.TEXT:case I.IN_COLUMN_GROUP:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{this._insertCharacters(t);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:case I.AFTER_BODY:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{gP(this,t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{hv(this,t);break}case I.IN_TABLE_TEXT:{_P(this,t);break}}}}function wZ(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):EP(e,t),n}function bZ(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function EZ(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);const s=e.activeFormattingElements.getElementEntry(o),u=s&&a>=vZ;!s||u?(u&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(o)):(o=TZ(e,s),r===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function TZ(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function _Z(e,t,n){const r=e.treeAdapter.getTagName(t),i=Fs(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===h.TEMPLATE&&a===G.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function SZ(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function dv(e,t){for(let n=0;n<yZ;n++){const r=wZ(e,t);if(!r)break;const i=bZ(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=EZ(e,i,r.element),o=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),o&&_Z(e,o,a),SZ(e,i,r)}}function fv(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function CZ(e,t){e._appendCommentNode(t,e.openElements.items[0])}function AZ(e,t){e._appendCommentNode(t,e.document)}function pv(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(a);o&&!o.endTag&&e._setEndLocation(a,t)}}}}function kZ(e,t){e._setDocumentType(t);const n=t.forceQuirks?fr.QUIRKS:iZ(t);rZ(t)||e._err(t,U.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=I.BEFORE_HTML}function Bl(e,t){e._err(t,U.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,fr.QUIRKS),e.insertionMode=I.BEFORE_HTML,e._processToken(t)}function RZ(e,t){t.tagID===h.HTML?(e._insertElement(t,G.HTML),e.insertionMode=I.BEFORE_HEAD):jl(e,t)}function NZ(e,t){const n=t.tagID;(n===h.HTML||n===h.HEAD||n===h.BODY||n===h.BR)&&jl(e,t)}function jl(e,t){e._insertFakeRootElement(),e.insertionMode=I.BEFORE_HEAD,e._processToken(t)}function PZ(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.HEAD:{e._insertElement(t,G.HTML),e.headElement=e.openElements.current,e.insertionMode=I.IN_HEAD;break}default:Ul(e,t)}}function IZ(e,t){const n=t.tagID;n===h.HEAD||n===h.BODY||n===h.HTML||n===h.BR?Ul(e,t):e._err(t,U.endTagWithoutMatchingOpenElement)}function Ul(e,t){e._insertFakeElement(M.HEAD,h.HEAD),e.headElement=e.openElements.current,e.insertionMode=I.IN_HEAD,e._processToken(t)}function Rr(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case h.TITLE:{e._switchToTextParsing(t,_t.RCDATA);break}case h.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,_t.RAWTEXT):(e._insertElement(t,G.HTML),e.insertionMode=I.IN_HEAD_NO_SCRIPT);break}case h.NOFRAMES:case h.STYLE:{e._switchToTextParsing(t,_t.RAWTEXT);break}case h.SCRIPT:{e._switchToTextParsing(t,_t.SCRIPT_DATA);break}case h.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=I.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(I.IN_TEMPLATE);break}case h.HEAD:{e._err(t,U.misplacedStartTagForHeadElement);break}default:Hl(e,t)}}function OZ(e,t){switch(t.tagID){case h.HEAD:{e.openElements.pop(),e.insertionMode=I.AFTER_HEAD;break}case h.BODY:case h.BR:case h.HTML:{Hl(e,t);break}case h.TEMPLATE:{fo(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function fo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==h.TEMPLATE&&e._err(t,U.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,U.endTagWithoutMatchingOpenElement)}function Hl(e,t){e.openElements.pop(),e.insertionMode=I.AFTER_HEAD,e._processToken(t)}function DZ(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.BASEFONT:case h.BGSOUND:case h.HEAD:case h.LINK:case h.META:case h.NOFRAMES:case h.STYLE:{Rr(e,t);break}case h.NOSCRIPT:{e._err(t,U.nestedNoscriptInHead);break}default:zl(e,t)}}function LZ(e,t){switch(t.tagID){case h.NOSCRIPT:{e.openElements.pop(),e.insertionMode=I.IN_HEAD;break}case h.BR:{zl(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function zl(e,t){const n=t.type===Ie.EOF?U.openElementsLeftAfterEof:U.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=I.IN_HEAD,e._processToken(t)}function MZ(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.BODY:{e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=I.IN_BODY;break}case h.FRAMESET:{e._insertElement(t,G.HTML),e.insertionMode=I.IN_FRAMESET;break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{e._err(t,U.abandonedHeadElementChild),e.openElements.push(e.headElement,h.HEAD),Rr(e,t),e.openElements.remove(e.headElement);break}case h.HEAD:{e._err(t,U.misplacedStartTagForHeadElement);break}default:Vl(e,t)}}function FZ(e,t){switch(t.tagID){case h.BODY:case h.HTML:case h.BR:{Vl(e,t);break}case h.TEMPLATE:{fo(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function Vl(e,t){e._insertFakeElement(M.BODY,h.BODY),e.insertionMode=I.IN_BODY,Dp(e,t)}function Dp(e,t){switch(t.type){case Ie.CHARACTER:{yP(e,t);break}case Ie.WHITESPACE_CHARACTER:{gP(e,t);break}case Ie.COMMENT:{fv(e,t);break}case Ie.START_TAG:{on(e,t);break}case Ie.END_TAG:{Lp(e,t);break}case Ie.EOF:{TP(e,t);break}}}function gP(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function yP(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function BZ(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function jZ(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function UZ(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,G.HTML),e.insertionMode=I.IN_FRAMESET)}function HZ(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function zZ(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),uv.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,G.HTML)}function VZ(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function $Z(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,G.HTML),n||(e.formElement=e.openElements.current))}function WZ(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===h.LI&&i===h.LI||(n===h.DD||n===h.DT)&&(i===h.DD||i===h.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==h.ADDRESS&&i!==h.DIV&&i!==h.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function YZ(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.tokenizer.state=_t.PLAINTEXT}function qZ(e,t){e.openElements.hasInScope(h.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1}function GZ(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(M.A);n&&(dv(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function KZ(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function XZ(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(h.NOBR)&&(dv(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function QZ(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function ZZ(e,t){e.treeAdapter.getDocumentMode(e.document)!==fr.QUIRKS&&e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=I.IN_TABLE}function vP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xP(e){const t=GN(e,co.TYPE);return t!=null&&t.toLowerCase()===gZ}function JZ(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),xP(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function eJ(e,t){e._appendElement(t,G.HTML),t.ackSelfClosing=!0}function tJ(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function nJ(e,t){t.tagName=M.IMG,t.tagID=h.IMG,vP(e,t)}function rJ(e,t){e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.tokenizer.state=_t.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=I.TEXT}function iJ(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,_t.RAWTEXT)}function aJ(e,t){e.framesetOk=!1,e._switchToTextParsing(t,_t.RAWTEXT)}function wP(e,t){e._switchToTextParsing(t,_t.RAWTEXT)}function oJ(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===I.IN_TABLE||e.insertionMode===I.IN_CAPTION||e.insertionMode===I.IN_TABLE_BODY||e.insertionMode===I.IN_ROW||e.insertionMode===I.IN_CELL?I.IN_SELECT_IN_TABLE:I.IN_SELECT}function sJ(e,t){e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function uJ(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,G.HTML)}function lJ(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(h.RTC),e._insertElement(t,G.HTML)}function cJ(e,t){e._reconstructActiveFormattingElements(),dP(t),cv(t),t.selfClosing?e._appendElement(t,G.MATHML):e._insertElement(t,G.MATHML),t.ackSelfClosing=!0}function dJ(e,t){e._reconstructActiveFormattingElements(),fP(t),cv(t),t.selfClosing?e._appendElement(t,G.SVG):e._insertElement(t,G.SVG),t.ackSelfClosing=!0}function bP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function on(e,t){switch(t.tagID){case h.I:case h.S:case h.B:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.SMALL:case h.STRIKE:case h.STRONG:{KZ(e,t);break}case h.A:{GZ(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{zZ(e,t);break}case h.P:case h.DL:case h.OL:case h.UL:case h.DIV:case h.DIR:case h.NAV:case h.MAIN:case h.MENU:case h.ASIDE:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.DETAILS:case h.ADDRESS:case h.ARTICLE:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{HZ(e,t);break}case h.LI:case h.DD:case h.DT:{WZ(e,t);break}case h.BR:case h.IMG:case h.WBR:case h.AREA:case h.EMBED:case h.KEYGEN:{vP(e,t);break}case h.HR:{tJ(e,t);break}case h.RB:case h.RTC:{uJ(e,t);break}case h.RT:case h.RP:{lJ(e,t);break}case h.PRE:case h.LISTING:{VZ(e,t);break}case h.XMP:{iJ(e,t);break}case h.SVG:{dJ(e,t);break}case h.HTML:{BZ(e,t);break}case h.BASE:case h.LINK:case h.META:case h.STYLE:case h.TITLE:case h.SCRIPT:case h.BGSOUND:case h.BASEFONT:case h.TEMPLATE:{Rr(e,t);break}case h.BODY:{jZ(e,t);break}case h.FORM:{$Z(e,t);break}case h.NOBR:{XZ(e,t);break}case h.MATH:{cJ(e,t);break}case h.TABLE:{ZZ(e,t);break}case h.INPUT:{JZ(e,t);break}case h.PARAM:case h.TRACK:case h.SOURCE:{eJ(e,t);break}case h.IMAGE:{nJ(e,t);break}case h.BUTTON:{qZ(e,t);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{QZ(e,t);break}case h.IFRAME:{aJ(e,t);break}case h.SELECT:{oJ(e,t);break}case h.OPTION:case h.OPTGROUP:{sJ(e,t);break}case h.NOEMBED:case h.NOFRAMES:{wP(e,t);break}case h.FRAMESET:{UZ(e,t);break}case h.TEXTAREA:{rJ(e,t);break}case h.NOSCRIPT:{e.options.scriptingEnabled?wP(e,t):bP(e,t);break}case h.PLAINTEXT:{YZ(e,t);break}case h.COL:case h.TH:case h.TD:case h.TR:case h.HEAD:case h.FRAME:case h.TBODY:case h.TFOOT:case h.THEAD:case h.CAPTION:case h.COLGROUP:break;default:bP(e,t)}}function fJ(e,t){if(e.openElements.hasInScope(h.BODY)&&(e.insertionMode=I.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function pJ(e,t){e.openElements.hasInScope(h.BODY)&&(e.insertionMode=I.AFTER_BODY,PP(e,t))}function hJ(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function mJ(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(h.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(h.FORM):n&&e.openElements.remove(n))}function gJ(e){e.openElements.hasInButtonScope(h.P)||e._insertFakeElement(M.P,h.P),e._closePElement()}function yJ(e){e.openElements.hasInListItemScope(h.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(h.LI),e.openElements.popUntilTagNamePopped(h.LI))}function vJ(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function xJ(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function wJ(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function bJ(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(M.BR,h.BR),e.openElements.pop(),e.framesetOk=!1}function EP(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],o=e.openElements.tagIDs[i];if(r===o&&(r!==h.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,o))break}}function Lp(e,t){switch(t.tagID){case h.A:case h.B:case h.I:case h.S:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.NOBR:case h.SMALL:case h.STRIKE:case h.STRONG:{dv(e,t);break}case h.P:{gJ(e);break}case h.DL:case h.UL:case h.OL:case h.DIR:case h.DIV:case h.NAV:case h.PRE:case h.MAIN:case h.MENU:case h.ASIDE:case h.BUTTON:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.ADDRESS:case h.ARTICLE:case h.DETAILS:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.LISTING:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{hJ(e,t);break}case h.LI:{yJ(e);break}case h.DD:case h.DT:{vJ(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{xJ(e);break}case h.BR:{bJ(e);break}case h.BODY:{fJ(e,t);break}case h.HTML:{pJ(e,t);break}case h.FORM:{mJ(e);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{wJ(e,t);break}case h.TEMPLATE:{fo(e,t);break}default:EP(e,t)}}function TP(e,t){e.tmplInsertionModeStack.length>0?NP(e,t):pv(e,t)}function EJ(e,t){var n;t.tagID===h.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function TJ(e,t){e._err(t,U.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function hv(e,t){if(pP.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=I.IN_TABLE_TEXT,t.type){case Ie.CHARACTER:{SP(e,t);break}case Ie.WHITESPACE_CHARACTER:{_P(e,t);break}}else Wl(e,t)}function _J(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,G.HTML),e.insertionMode=I.IN_CAPTION}function SJ(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=I.IN_COLUMN_GROUP}function CJ(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(M.COLGROUP,h.COLGROUP),e.insertionMode=I.IN_COLUMN_GROUP,mv(e,t)}function AJ(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=I.IN_TABLE_BODY}function kJ(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(M.TBODY,h.TBODY),e.insertionMode=I.IN_TABLE_BODY,Fp(e,t)}function RJ(e,t){e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function NJ(e,t){xP(t)?e._appendElement(t,G.HTML):Wl(e,t),t.ackSelfClosing=!0}function PJ(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,G.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Bs(e,t){switch(t.tagID){case h.TD:case h.TH:case h.TR:{kJ(e,t);break}case h.STYLE:case h.SCRIPT:case h.TEMPLATE:{Rr(e,t);break}case h.COL:{CJ(e,t);break}case h.FORM:{PJ(e,t);break}case h.TABLE:{RJ(e,t);break}case h.TBODY:case h.TFOOT:case h.THEAD:{AJ(e,t);break}case h.INPUT:{NJ(e,t);break}case h.CAPTION:{_J(e,t);break}case h.COLGROUP:{SJ(e,t);break}default:Wl(e,t)}}function $l(e,t){switch(t.tagID){case h.TABLE:{e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode());break}case h.TEMPLATE:{fo(e,t);break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:Wl(e,t)}}function Wl(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Dp(e,t),e.fosterParentingEnabled=n}function _P(e,t){e.pendingCharacterTokens.push(t)}function SP(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Yl(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Wl(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const CP=new Set([h.CAPTION,h.COL,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]);function IJ(e,t){const n=t.tagID;CP.has(n)?e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_TABLE,Bs(e,t)):on(e,t)}function OJ(e,t){const n=t.tagID;switch(n){case h.CAPTION:case h.TABLE:{e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_TABLE,n===h.TABLE&&$l(e,t));break}case h.BODY:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:Lp(e,t)}}function mv(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.COL:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case h.TEMPLATE:{Rr(e,t);break}default:Mp(e,t)}}function DJ(e,t){switch(t.tagID){case h.COLGROUP:{e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=I.IN_TABLE);break}case h.TEMPLATE:{fo(e,t);break}case h.COL:break;default:Mp(e,t)}}function Mp(e,t){e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=I.IN_TABLE,e._processToken(t))}function Fp(e,t){switch(t.tagID){case h.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,G.HTML),e.insertionMode=I.IN_ROW;break}case h.TH:case h.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(M.TR,h.TR),e.insertionMode=I.IN_ROW,Bp(e,t);break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE,Bs(e,t));break}default:Bs(e,t)}}function gv(e,t){const n=t.tagID;switch(t.tagID){case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE);break}case h.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE,$l(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:case h.TR:break;default:$l(e,t)}}function Bp(e,t){switch(t.tagID){case h.TH:case h.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,G.HTML),e.insertionMode=I.IN_CELL,e.activeFormattingElements.insertMarker();break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,Fp(e,t));break}default:Bs(e,t)}}function AP(e,t){switch(t.tagID){case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY);break}case h.TABLE:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,gv(e,t));break}case h.TBODY:case h.TFOOT:case h.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(h.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,gv(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:break;default:$l(e,t)}}function LJ(e,t){const n=t.tagID;CP.has(n)?(e.openElements.hasInTableScope(h.TD)||e.openElements.hasInTableScope(h.TH))&&(e._closeTableCell(),Bp(e,t)):on(e,t)}function MJ(e,t){const n=t.tagID;switch(n){case h.TD:case h.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_ROW);break}case h.TABLE:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),AP(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:break;default:Lp(e,t)}}function kP(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._insertElement(t,G.HTML);break}case h.OPTGROUP:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._insertElement(t,G.HTML);break}case h.HR:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case h.INPUT:case h.KEYGEN:case h.TEXTAREA:case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),t.tagID!==h.SELECT&&e._processStartTag(t));break}case h.SCRIPT:case h.TEMPLATE:{Rr(e,t);break}}}function RP(e,t){switch(t.tagID){case h.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===h.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===h.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop();break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop();break}case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode());break}case h.TEMPLATE:{fo(e,t);break}}}function FJ(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e._processStartTag(t)):kP(e,t)}function BJ(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e.onEndTag(t)):RP(e,t)}function jJ(e,t){switch(t.tagID){case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{Rr(e,t);break}case h.CAPTION:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.tmplInsertionModeStack[0]=I.IN_TABLE,e.insertionMode=I.IN_TABLE,Bs(e,t);break}case h.COL:{e.tmplInsertionModeStack[0]=I.IN_COLUMN_GROUP,e.insertionMode=I.IN_COLUMN_GROUP,mv(e,t);break}case h.TR:{e.tmplInsertionModeStack[0]=I.IN_TABLE_BODY,e.insertionMode=I.IN_TABLE_BODY,Fp(e,t);break}case h.TD:case h.TH:{e.tmplInsertionModeStack[0]=I.IN_ROW,e.insertionMode=I.IN_ROW,Bp(e,t);break}default:e.tmplInsertionModeStack[0]=I.IN_BODY,e.insertionMode=I.IN_BODY,on(e,t)}}function UJ(e,t){t.tagID===h.TEMPLATE&&fo(e,t)}function NP(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):pv(e,t)}function HJ(e,t){t.tagID===h.HTML?on(e,t):jp(e,t)}function PP(e,t){var n;if(t.tagID===h.HTML){if(e.fragmentContext||(e.insertionMode=I.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===h.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else jp(e,t)}function jp(e,t){e.insertionMode=I.IN_BODY,Dp(e,t)}function zJ(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.FRAMESET:{e._insertElement(t,G.HTML);break}case h.FRAME:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case h.NOFRAMES:{Rr(e,t);break}}}function VJ(e,t){t.tagID===h.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==h.FRAMESET&&(e.insertionMode=I.AFTER_FRAMESET))}function $J(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.NOFRAMES:{Rr(e,t);break}}}function WJ(e,t){t.tagID===h.HTML&&(e.insertionMode=I.AFTER_AFTER_FRAMESET)}function YJ(e,t){t.tagID===h.HTML?on(e,t):Up(e,t)}function Up(e,t){e.insertionMode=I.IN_BODY,Dp(e,t)}function qJ(e,t){switch(t.tagID){case h.HTML:{on(e,t);break}case h.NOFRAMES:{Rr(e,t);break}}}function GJ(e,t){t.chars=ut,e._insertCharacters(t)}function KJ(e,t){e._insertCharacters(t),e.framesetOk=!1}function IP(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==G.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function XJ(e,t){if(dZ(t))IP(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===G.MATHML?dP(t):r===G.SVG&&(fZ(t),fP(t)),cv(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function QJ(e,t){if(t.tagID===h.P||t.tagID===h.BR){IP(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===G.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}M.AREA,M.BASE,M.BASEFONT,M.BGSOUND,M.BR,M.COL,M.EMBED,M.FRAME,M.HR,M.IMG,M.INPUT,M.KEYGEN,M.LINK,M.META,M.PARAM,M.SOURCE,M.TRACK,M.WBR;const ZJ=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,JJ=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),OP={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function DP(e,t){const n=lee(e),r=FR("type",{handlers:{root:eee,element:tee,text:nee,comment:MP,doctype:ree,raw:aee},unknown:oee}),i={parser:n?new mP(OP):mP.getFragmentParser(void 0,OP),handle(s){r(s,i)},stitches:!1,options:t||{}};r(e,i),js(i,Gr());const a=n?i.parser.document:i.parser.getFragment(),o=cQ(a,{file:i.options.file});return i.stitches&&yp(o,"comment",function(s,u,l){const c=s;if(c.value.stitch&&l&&u!==void 0){const d=l.children;return d[u]=c.value.stitch,u}}),o.type==="root"&&o.children.length===1&&o.children[0].type===e.type?o.children[0]:o}function LP(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function eee(e,t){LP(e.children,t)}function tee(e,t){see(e,t),LP(e.children,t),uee(e,t)}function nee(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ie.CHARACTER,chars:e.value,location:ql(e)};js(t,Gr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ree(e,t){const n={type:Ie.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ql(e)};js(t,Gr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function iee(e,t){t.stitches=!0;const n=cee(e);if("children"in e&&"children"in n){const r=DP({type:"root",children:e.children},t.options);n.children=r.children}MP({type:"comment",value:{stitch:n}},t)}function MP(e,t){const n=e.value,r={type:Ie.COMMENT,data:n,location:ql(e)};js(t,Gr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function aee(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,FP(t,Gr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(ZJ,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function oee(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))iee(n,t);else{let r="";throw JJ.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function js(e,t){FP(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=_t.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function FP(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function see(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===_t.PLAINTEXT)return;js(t,Gr(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:lo.html;i===lo.html&&n==="svg"&&(i=lo.svg);const a=mQ({...e,children:[]},{space:i===lo.svg?"svg":"html"}),o={type:Ie.START_TAG,tagName:n,tagID:Fs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ql(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function uee(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&TQ.includes(n)||t.parser.tokenizer.state===_t.PLAINTEXT)return;js(t,Tp(e));const r={type:Ie.END_TAG,tagName:n,tagID:Fs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ql(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===_t.RCDATA||t.parser.tokenizer.state===_t.RAWTEXT||t.parser.tokenizer.state===_t.SCRIPT_DATA)&&(t.parser.tokenizer.state=_t.DATA)}function lee(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ql(e){const t=Gr(e)||{line:void 0,column:void 0,offset:void 0},n=Tp(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function cee(e){return"children"in e?Ds({...e,children:[]}):Ds(e)}function BP(e){return function(t,n){return DP(t,{...e,file:n})}}function jP({attachment:e}){const{name:t,size:n,type:r,url:i}=e,a=r.startsWith("image/"),o=r.startsWith("video/"),s=r.startsWith("audio/");return E.jsxs("div",{className:"size-fit gap-2 border shrink-0 rounded-2xl overflow-hidden",children:[a&&E.jsx("img",{loading:"lazy",src:i,className:"object-cover size-16"}),o&&E.jsxs("video",{controls:!0,children:[E.jsx("source",{src:i,type:r}),"Your browser does not support the video tag."]}),s&&E.jsxs("audio",{controls:!0,className:"w-full mt-2 rounded-md border",children:[E.jsx("source",{src:i,type:r}),"Your browser does not support the audio tag."]}),!a&&!o&&!s&&E.jsxs("div",{className:"flex items-center gap-2 p-2",children:[E.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 line-clamp-2 underline hover:text-blue-600",children:t}),E.jsxs("span",{className:"text-sm text-gray-500 whitespace-nowrap",children:[(n/1024).toFixed(2)," KB"]})]})]})}function yv({data:e,id:t,type:n,attachments:r}){const{message:i,variant:a="default"}=e;return a==="error"?E.jsx("div",{children:E.jsx("div",{className:"flex flex-row flex-wrap items-center justify-start",children:E.jsx("div",{className:"leading-snug text-sm text-destructive",children:i})})}):E.jsxs("div",{className:"flex flex-col items-start gap-1",children:[E.jsx("div",{className:"gap-1 flex flex-row flex-wrap items-center justify-start",children:r==null?void 0:r.map(o=>E.jsx(jP,{attachment:o},o.id))}),i.length>0&&E.jsx(MN,{"data-type":n,"data-id":t,remarkPlugins:[C3],rehypePlugins:[BP],components:{a:({children:o,...s})=>E.jsx("a",{target:"_top",...s,children:o})},className:Le("w-fit p-2 rounded-2xl bg-secondary border shadow-sm","leading-snug text-sm prose prose-sm prose-a:decoration-primary prose-a:underline"),children:i})]})}function UP(e){const{componentStore:t}=ar();if(e.data.action){const r=t.getComponent(e.data.action.name);if(r)return E.jsx(r,{...e,id:e.id})}const n=t.getComponent(e.component);return n?E.jsx(n,{...e,id:e.id}):E.jsx(yv,{...e})}var vv="Avatar",[dee,lie]=ca(vv),[fee,HP]=dee(vv),zP=v.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=v.useState("idle");return E.jsx(fee,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:E.jsx(zn.span,{...r,ref:t})})});zP.displayName=vv;var VP="AvatarImage",$P=v.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=HP(VP,n),s=pee(r,a.referrerPolicy),u=Yt(l=>{i(l),o.onImageLoadingStatusChange(l)});return or(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?E.jsx(zn.img,{...a,ref:t,src:r}):null});$P.displayName=VP;var WP="AvatarFallback",YP=v.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=HP(WP,n),[o,s]=v.useState(r===void 0);return v.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),o&&a.imageLoadingStatus!=="loaded"?E.jsx(zn.span,{...i,ref:t}):null});YP.displayName=WP;function pee(e,t){const[n,r]=v.useState("idle");return or(()=>{if(!e){r("error");return}let i=!0;const a=new window.Image,o=s=>()=>{i&&r(s)};return r("loading"),a.onload=o("loaded"),a.onerror=o("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var qP=zP,GP=$P,KP=YP;const Gl=v.forwardRef(({className:e,...t},n)=>E.jsx(qP,{ref:n,className:Le("relative flex size-6 aspect-square shrink-0 overflow-hidden rounded-full border bg-secondary",e),...t}));Gl.displayName=qP.displayName;const Hp=v.forwardRef(({className:e,...t},n)=>E.jsx(GP,{ref:n,className:Le("aspect-square h-full w-full",e),...t}));Hp.displayName=GP.displayName;const zp=v.forwardRef(({className:e,...t},n)=>E.jsx(KP,{ref:n,className:Le("flex size-full text-xs items-center justify-center rounded-lg",e),...t}));zp.displayName=KP.displayName;function hee({message:e}){var t;return E.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.attachments&&e.attachments.length>0&&E.jsx("div",{className:"flex gap-1 flex-wrap justify-end",children:(t=e.attachments)==null?void 0:t.map(n=>E.jsx(jP,{attachment:n},n.id))}),e.content.length>0&&E.jsx("div",{className:Le("w-fit p-2 rounded-2xl text-sm","bg-primary text-primary-foreground border shadow-sm"),children:e.content})]})}function mee({messages:e}){var n,r,i,a,o,s;const{user:t}=ms();return E.jsxs("div",{className:Le("group","flex flex-col gap-2 justify-end items-end"),children:[E.jsxs(Gl,{className:"bg-primary text-primary-foreground",children:[E.jsx(Hp,{src:(n=t==null?void 0:t.data)==null?void 0:n.avatarUrl,alt:((r=t==null?void 0:t.data)==null?void 0:r.name)||"User avatar"}),((i=t==null?void 0:t.data)==null?void 0:i.name)&&E.jsx(zp,{children:(s=(o=(a=t==null?void 0:t.data)==null?void 0:a.name)==null?void 0:o.slice(0,1))==null?void 0:s.toUpperCase()})]}),e.map(u=>E.jsx(hee,{message:u},u.id))]})}function gee({messages:e,agent:t}){var n,r;return E.jsxs("div",{className:Le("flex flex-col items-start gap-2"),children:[E.jsx(Kf,{content:t==null?void 0:t.name,side:"right",align:"end",children:E.jsxs(Gl,{children:[E.jsx(Hp,{src:(t==null?void 0:t.avatar)??"",alt:"Agent Icon"}),(t==null?void 0:t.name)&&E.jsx(zp,{children:(r=(n=t==null?void 0:t.name)==null?void 0:n.slice(0,1))==null?void 0:r.toUpperCase()})]})}),e.map(i=>E.jsx(UP,{...i},i.id))]})}function yee(){const{messagesState:{messages:e}}=gs(),{isAwaitingBotReply:t}=fC(),{componentStore:n}=ar(),r=ms(),i=v.useMemo(()=>P$(e),[e.length]),a=!r.initialMessages||r.initialMessages.length===0?["Hello, how can I help you?"]:r.initialMessages,o=n.getComponent("loading"),s=v.useRef(null);function u(){setTimeout(()=>{const l=s.current;l&&(l.scrollTop=l.scrollHeight)},0)}return v.useEffect(()=>{u()},[e]),E.jsxs("div",{"data-messages":!0,ref:s,className:"max-h-full scroll-smooth relative flex-1 p-2 space-y-2 overflow-auto",children:[e.length===0&&a.map((l,c)=>E.jsx(UP,{component:"bot_message",data:{message:l},id:`initial-${c}`,type:"FROM_BOT",agent:r.bot,timestamp:Date.now().toString()},`${l}-${c}`)),i.map((l,c)=>{var f,p;if(!((f=l==null?void 0:l[0])==null?void 0:f.type))return null;if(I$(l))return E.jsx(mee,{messages:l},c);if(O$(l)||D$(l)){const m=(p=l[0])==null?void 0:p.agent;return E.jsx(gee,{messages:l,agent:m},c)}return null}),t&&E.jsx(o,{})]})}function XP({className:e}){return E.jsx(cF,{className:Le("size-4 animate-spin",e)})}function vee(){const{messagesState:{isInitialFetchLoading:e}}=gs(),{sessionState:{session:t}}=fl(),{observedElementRef:n}=I0({fallbackHeight:wE}),r=v.useRef((t==null?void 0:t.id)||"chat").current;return E.jsx("div",{ref:n,className:Le(bg.widgetHeight,"w-full flex flex-col overflow-hidden bg-background"),children:E.jsxs("div",{className:"size-full justify-between flex flex-col",children:[E.jsx(kR,{}),E.jsx(ir,{mode:"wait",children:e?E.jsx(vt,{className:"flex flex-col items-center justify-center w-full flex-1",children:E.jsx(XP,{})},"loading"):E.jsxs(vt,{className:"flex flex-col w-full flex-1 overflow-auto",snapExit:!0,children:[E.jsx(yee,{}),E.jsx(LH,{})]},r)})]})})}var je;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(je||(je={}));var xv;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(xv||(xv={}));const se=je.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ea=e=>{switch(typeof e){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(e)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(e)?se.array:e===null?se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?se.promise:typeof Map<"u"&&e instanceof Map?se.map:typeof Set<"u"&&e instanceof Set?se.set:typeof Date<"u"&&e instanceof Date?se.date:se.object;default:return se.unknown}},Z=je.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),xee=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Yn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}static assert(t){if(!(t instanceof Yn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,je.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Yn.create=e=>new Yn(e);const Us=(e,t)=>{let n;switch(e.code){case Z.invalid_type:e.received===se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,je.jsonStringifyReplacer)}`;break;case Z.unrecognized_keys:n=`Unrecognized key(s) in object: ${je.joinValues(e.keys,", ")}`;break;case Z.invalid_union:n="Invalid input";break;case Z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${je.joinValues(e.options)}`;break;case Z.invalid_enum_value:n=`Invalid enum value. Expected ${je.joinValues(e.options)}, received '${e.received}'`;break;case Z.invalid_arguments:n="Invalid function arguments";break;case Z.invalid_return_type:n="Invalid function return type";break;case Z.invalid_date:n="Invalid date";break;case Z.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:je.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Z.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Z.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Z.custom:n="Invalid input";break;case Z.invalid_intersection_types:n="Intersection results could not be merged";break;case Z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Z.not_finite:n="Number must be finite";break;default:n=t.defaultError,je.assertNever(e)}return{message:n}};let QP=Us;function wee(e){QP=e}function Vp(){return QP}const $p=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},bee=[];function oe(e,t){const n=Vp(),r=$p({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Us?void 0:Us].filter(i=>!!i)});e.common.issues.push(r)}class sn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return we;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return sn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return we;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const we=Object.freeze({status:"aborted"}),Hs=e=>({status:"dirty",value:e}),hn=e=>({status:"valid",value:e}),wv=e=>e.status==="aborted",bv=e=>e.status==="dirty",Kl=e=>e.status==="valid",Xl=e=>typeof Promise<"u"&&e instanceof Promise;function Wp(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function ZP(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var pe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(pe||(pe={}));var Ql,Zl;class Qr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const JP=(e,t)=>{if(Kl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Yn(e.common.issues);return this._error=n,this._error}}};function Ae(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var u,l;const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class Ne{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Ea(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ea(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new sn,ctx:{common:t.parent.common,data:t.data,parsedType:Ea(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Xl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ea(t)},a=this._parseSync({data:t,path:i.path,parent:i});return JP(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ea(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Xl(i)?i:Promise.resolve(i));return JP(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:Z.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ir({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Jr.create(this,this._def)}nullable(){return Ca.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Pr.create(this,this._def)}promise(){return Ws.create(this,this._def)}or(t){return nc.create([this,t],this._def)}and(t){return rc.create(this,t,this._def)}transform(t){return new Ir({...Ae(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new uc({...Ae(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new _v({typeName:ve.ZodBranded,type:this,...Ae(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new lc({...Ae(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return cc.create(this,t)}readonly(){return dc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Eee=/^c[^\s-]{8,}$/i,Tee=/^[0-9a-z]+$/,_ee=/^[0-9A-HJKMNP-TV-Z]{26}$/,See=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Cee=/^[a-z0-9_-]{21}$/i,Aee=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,kee=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ree="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ev;const Nee=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Pee=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Iee=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,eI="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Oee=new RegExp(`^${eI}$`);function tI(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Dee(e){return new RegExp(`^${tI(e)}$`)}function nI(e){let t=`${eI}T${tI(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Lee(e,t){return!!((t==="v4"||!t)&&Nee.test(e)||(t==="v6"||!t)&&Pee.test(e))}class Nr extends Ne{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==se.string){const a=this._getOrReturnCtx(t);return oe(a,{code:Z.invalid_type,expected:se.string,received:a.parsedType}),we}const r=new sn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?oe(i,{code:Z.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&oe(i,{code:Z.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")kee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"email",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Ev||(Ev=new RegExp(Ree,"u")),Ev.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"emoji",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")See.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"uuid",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")Cee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"nanoid",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")Eee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"cuid",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")Tee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"cuid2",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")_ee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"ulid",code:Z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),oe(i,{validation:"url",code:Z.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"regex",code:Z.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?nI(a).test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?Oee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?Dee(a).test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?Aee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"duration",code:Z.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?Lee(t.data,a.version)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"ip",code:Z.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?Iee.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"base64",code:Z.invalid_string,message:a.message}),r.dirty()):je.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:Z.invalid_string,...pe.errToObj(r)})}_addCheck(t){return new Nr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...pe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...pe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...pe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...pe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...pe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...pe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...pe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...pe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...pe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...pe.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...pe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...pe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...pe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...pe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...pe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...pe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...pe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...pe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...pe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...pe.errToObj(n)})}nonempty(t){return this.min(1,pe.errToObj(t))}trim(){return new Nr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Nr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Nr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Nr.create=e=>{var t;return new Nr({checks:[],typeName:ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ae(e)})};function Mee(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class Ta extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==se.number){const a=this._getOrReturnCtx(t);return oe(a,{code:Z.invalid_type,expected:se.number,received:a.parsedType}),we}let r;const i=new sn;for(const a of this._def.checks)a.kind==="int"?je.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?Mee(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_finite,message:a.message}),i.dirty()):je.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,pe.toString(n))}setLimit(t,n,r,i){return new Ta({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:pe.toString(i)}]})}_addCheck(t){return new Ta({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:pe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:pe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:pe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:pe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:pe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&je.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Ta.create=e=>new Ta({checks:[],typeName:ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ae(e)});class _a extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==se.bigint){const a=this._getOrReturnCtx(t);return oe(a,{code:Z.invalid_type,expected:se.bigint,received:a.parsedType}),we}let r;const i=new sn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):je.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,pe.toString(n))}setLimit(t,n,r,i){return new _a({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:pe.toString(i)}]})}_addCheck(t){return new _a({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:pe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}_a.create=e=>{var t;return new _a({checks:[],typeName:ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ae(e)})};class Jl extends Ne{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==se.boolean){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.boolean,received:r.parsedType}),we}return hn(t.data)}}Jl.create=e=>new Jl({typeName:ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ae(e)});class po extends Ne{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==se.date){const a=this._getOrReturnCtx(t);return oe(a,{code:Z.invalid_type,expected:se.date,received:a.parsedType}),we}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return oe(a,{code:Z.invalid_date}),we}const r=new sn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:Z.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):je.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new po({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:pe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:pe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}po.create=e=>new po({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ve.ZodDate,...Ae(e)});class Yp extends Ne{_parse(t){if(this._getType(t)!==se.symbol){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.symbol,received:r.parsedType}),we}return hn(t.data)}}Yp.create=e=>new Yp({typeName:ve.ZodSymbol,...Ae(e)});class ec extends Ne{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.undefined,received:r.parsedType}),we}return hn(t.data)}}ec.create=e=>new ec({typeName:ve.ZodUndefined,...Ae(e)});class tc extends Ne{_parse(t){if(this._getType(t)!==se.null){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.null,received:r.parsedType}),we}return hn(t.data)}}tc.create=e=>new tc({typeName:ve.ZodNull,...Ae(e)});class zs extends Ne{constructor(){super(...arguments),this._any=!0}_parse(t){return hn(t.data)}}zs.create=e=>new zs({typeName:ve.ZodAny,...Ae(e)});class ho extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(t){return hn(t.data)}}ho.create=e=>new ho({typeName:ve.ZodUnknown,...Ae(e)});class Ci extends Ne{_parse(t){const n=this._getOrReturnCtx(t);return oe(n,{code:Z.invalid_type,expected:se.never,received:n.parsedType}),we}}Ci.create=e=>new Ci({typeName:ve.ZodNever,...Ae(e)});class qp extends Ne{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.void,received:r.parsedType}),we}return hn(t.data)}}qp.create=e=>new qp({typeName:ve.ZodVoid,...Ae(e)});class Pr extends Ne{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==se.array)return oe(n,{code:Z.invalid_type,expected:se.array,received:n.parsedType}),we;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(oe(n,{code:o?Z.too_big:Z.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(oe(n,{code:Z.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(oe(n,{code:Z.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new Qr(n,o,n.path,s)))).then(o=>sn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new Qr(n,o,n.path,s)));return sn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new Pr({...this._def,minLength:{value:t,message:pe.toString(n)}})}max(t,n){return new Pr({...this._def,maxLength:{value:t,message:pe.toString(n)}})}length(t,n){return new Pr({...this._def,exactLength:{value:t,message:pe.toString(n)}})}nonempty(t){return this.min(1,t)}}Pr.create=(e,t)=>new Pr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Ae(t)});function Vs(e){if(e instanceof mt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Jr.create(Vs(r))}return new mt({...e._def,shape:()=>t})}else return e instanceof Pr?new Pr({...e._def,type:Vs(e.element)}):e instanceof Jr?Jr.create(Vs(e.unwrap())):e instanceof Ca?Ca.create(Vs(e.unwrap())):e instanceof Zr?Zr.create(e.items.map(t=>Vs(t))):e}class mt extends Ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=je.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==se.object){const l=this._getOrReturnCtx(t);return oe(l,{code:Z.invalid_type,expected:se.object,received:l.parsedType}),we}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ci&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const u=[];for(const l of o){const c=a[l],d=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Qr(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Ci){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(oe(i,{code:Z.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const d=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Qr(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const d=await c.key,f=await c.value;l.push({key:d,value:f,alwaysSet:c.alwaysSet})}return l}).then(l=>sn.mergeObjectSync(r,l)):sn.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return pe.errToObj,new mt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=pe.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new mt({...this._def,unknownKeys:"strip"})}passthrough(){return new mt({...this._def,unknownKeys:"passthrough"})}extend(t){return new mt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new mt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new mt({...this._def,catchall:t})}pick(t){const n={};return je.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new mt({...this._def,shape:()=>n})}omit(t){const n={};return je.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new mt({...this._def,shape:()=>n})}deepPartial(){return Vs(this)}partial(t){const n={};return je.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new mt({...this._def,shape:()=>n})}required(t){const n={};return je.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Jr;)a=a._def.innerType;n[r]=a}}),new mt({...this._def,shape:()=>n})}keyof(){return rI(je.objectKeys(this.shape))}}mt.create=(e,t)=>new mt({shape:()=>e,unknownKeys:"strip",catchall:Ci.create(),typeName:ve.ZodObject,...Ae(t)}),mt.strictCreate=(e,t)=>new mt({shape:()=>e,unknownKeys:"strict",catchall:Ci.create(),typeName:ve.ZodObject,...Ae(t)}),mt.lazycreate=(e,t)=>new mt({shape:e,unknownKeys:"strip",catchall:Ci.create(),typeName:ve.ZodObject,...Ae(t)});class nc extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Yn(s.ctx.common.issues));return oe(n,{code:Z.invalid_union,unionErrors:o}),we}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new Yn(u));return oe(n,{code:Z.invalid_union,unionErrors:s}),we}}get options(){return this._def.options}}nc.create=(e,t)=>new nc({options:e,typeName:ve.ZodUnion,...Ae(t)});const Ai=e=>e instanceof ac?Ai(e.schema):e instanceof Ir?Ai(e.innerType()):e instanceof oc?[e.value]:e instanceof Sa?e.options:e instanceof sc?je.objectValues(e.enum):e instanceof uc?Ai(e._def.innerType):e instanceof ec?[void 0]:e instanceof tc?[null]:e instanceof Jr?[void 0,...Ai(e.unwrap())]:e instanceof Ca?[null,...Ai(e.unwrap())]:e instanceof _v||e instanceof dc?Ai(e.unwrap()):e instanceof lc?Ai(e._def.innerType):[];class Gp extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.object)return oe(n,{code:Z.invalid_type,expected:se.object,received:n.parsedType}),we;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(oe(n,{code:Z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),we)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=Ai(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new Gp({typeName:ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Ae(r)})}}function Tv(e,t){const n=Ea(e),r=Ea(t);if(e===t)return{valid:!0,data:e};if(n===se.object&&r===se.object){const i=je.objectKeys(t),a=je.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=Tv(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===se.array&&r===se.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],u=Tv(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===se.date&&r===se.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class rc extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(wv(a)||wv(o))return we;const s=Tv(a.value,o.value);return s.valid?((bv(a)||bv(o))&&n.dirty(),{status:n.value,value:s.data}):(oe(r,{code:Z.invalid_intersection_types}),we)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}rc.create=(e,t,n)=>new rc({left:e,right:t,typeName:ve.ZodIntersection,...Ae(n)});class Zr extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.array)return oe(r,{code:Z.invalid_type,expected:se.array,received:r.parsedType}),we;if(r.data.length<this._def.items.length)return oe(r,{code:Z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),we;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:Z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new Qr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>sn.mergeArray(n,o)):sn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new Zr({...this._def,rest:t})}}Zr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Zr({items:e,typeName:ve.ZodTuple,rest:null,...Ae(t)})};class ic extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.object)return oe(r,{code:Z.invalid_type,expected:se.object,received:r.parsedType}),we;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new Qr(r,s,r.path,s)),value:o._parse(new Qr(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?sn.mergeObjectAsync(n,i):sn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ne?new ic({keyType:t,valueType:n,typeName:ve.ZodRecord,...Ae(r)}):new ic({keyType:Nr.create(),valueType:t,typeName:ve.ZodRecord,...Ae(n)})}}class Kp extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.map)return oe(r,{code:Z.invalid_type,expected:se.map,received:r.parsedType}),we;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new Qr(r,s,r.path,[l,"key"])),value:a._parse(new Qr(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return we;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of o){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return we;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}Kp.create=(e,t,n)=>new Kp({valueType:t,keyType:e,typeName:ve.ZodMap,...Ae(n)});class mo extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.set)return oe(r,{code:Z.invalid_type,expected:se.set,received:r.parsedType}),we;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(oe(r,{code:Z.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(oe(r,{code:Z.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return we;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new Qr(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new mo({...this._def,minSize:{value:t,message:pe.toString(n)}})}max(t,n){return new mo({...this._def,maxSize:{value:t,message:pe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}mo.create=(e,t)=>new mo({valueType:e,minSize:null,maxSize:null,typeName:ve.ZodSet,...Ae(t)});class $s extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.function)return oe(n,{code:Z.invalid_type,expected:se.function,received:n.parsedType}),we;function r(s,u){return $p({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Vp(),Us].filter(l=>!!l),issueData:{code:Z.invalid_arguments,argumentsError:u}})}function i(s,u){return $p({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Vp(),Us].filter(l=>!!l),issueData:{code:Z.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Ws){const s=this;return hn(async function(...u){const l=new Yn([]),c=await s._def.args.parseAsync(u,a).catch(p=>{throw l.addIssue(r(u,p)),l}),d=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(d,a).catch(p=>{throw l.addIssue(i(d,p)),l})})}else{const s=this;return hn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new Yn([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),d=s._def.returns.safeParse(c,a);if(!d.success)throw new Yn([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new $s({...this._def,args:Zr.create(t).rest(ho.create())})}returns(t){return new $s({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new $s({args:t||Zr.create([]).rest(ho.create()),returns:n||ho.create(),typeName:ve.ZodFunction,...Ae(r)})}}class ac extends Ne{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ac.create=(e,t)=>new ac({getter:e,typeName:ve.ZodLazy,...Ae(t)});class oc extends Ne{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return oe(n,{received:n.data,code:Z.invalid_literal,expected:this._def.value}),we}return{status:"valid",value:t.data}}get value(){return this._def.value}}oc.create=(e,t)=>new oc({value:e,typeName:ve.ZodLiteral,...Ae(t)});function rI(e,t){return new Sa({values:e,typeName:ve.ZodEnum,...Ae(t)})}class Sa extends Ne{constructor(){super(...arguments),Ql.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{expected:je.joinValues(r),received:n.parsedType,code:Z.invalid_type}),we}if(Wp(this,Ql)||ZP(this,Ql,new Set(this._def.values)),!Wp(this,Ql).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{received:n.data,code:Z.invalid_enum_value,options:r}),we}return hn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Sa.create(t,{...this._def,...n})}exclude(t,n=this._def){return Sa.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ql=new WeakMap,Sa.create=rI;class sc extends Ne{constructor(){super(...arguments),Zl.set(this,void 0)}_parse(t){const n=je.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==se.string&&r.parsedType!==se.number){const i=je.objectValues(n);return oe(r,{expected:je.joinValues(i),received:r.parsedType,code:Z.invalid_type}),we}if(Wp(this,Zl)||ZP(this,Zl,new Set(je.getValidEnumValues(this._def.values))),!Wp(this,Zl).has(t.data)){const i=je.objectValues(n);return oe(r,{received:r.data,code:Z.invalid_enum_value,options:i}),we}return hn(t.data)}get enum(){return this._def.values}}Zl=new WeakMap,sc.create=(e,t)=>new sc({values:e,typeName:ve.ZodNativeEnum,...Ae(t)});class Ws extends Ne{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.promise&&n.common.async===!1)return oe(n,{code:Z.invalid_type,expected:se.promise,received:n.parsedType}),we;const r=n.parsedType===se.promise?n.data:Promise.resolve(n.data);return hn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ws.create=(e,t)=>new Ws({type:e,typeName:ve.ZodPromise,...Ae(t)});class Ir extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{oe(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return we;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?we:u.status==="dirty"||n.value==="dirty"?Hs(u.value):u});{if(n.value==="aborted")return we;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?we:s.status==="dirty"||n.value==="dirty"?Hs(s.value):s}}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?we:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?we:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Kl(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Kl(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);je.assertNever(i)}}Ir.create=(e,t,n)=>new Ir({schema:e,typeName:ve.ZodEffects,effect:t,...Ae(n)}),Ir.createWithPreprocess=(e,t,n)=>new Ir({schema:t,effect:{type:"preprocess",transform:e},typeName:ve.ZodEffects,...Ae(n)});class Jr extends Ne{_parse(t){return this._getType(t)===se.undefined?hn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jr.create=(e,t)=>new Jr({innerType:e,typeName:ve.ZodOptional,...Ae(t)});class Ca extends Ne{_parse(t){return this._getType(t)===se.null?hn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ca.create=(e,t)=>new Ca({innerType:e,typeName:ve.ZodNullable,...Ae(t)});class uc extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}uc.create=(e,t)=>new uc({innerType:e,typeName:ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ae(t)});class lc extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Xl(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Yn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Yn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}lc.create=(e,t)=>new lc({innerType:e,typeName:ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ae(t)});class Xp extends Ne{_parse(t){if(this._getType(t)!==se.nan){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.nan,received:r.parsedType}),we}return{status:"valid",value:t.data}}}Xp.create=e=>new Xp({typeName:ve.ZodNaN,...Ae(e)});const Fee=Symbol("zod_brand");class _v extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class cc extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?we:a.status==="dirty"?(n.dirty(),Hs(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?we:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new cc({in:t,out:n,typeName:ve.ZodPipeline})}}class dc extends Ne{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Kl(i)&&(i.value=Object.freeze(i.value)),i);return Xl(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}dc.create=(e,t)=>new dc({innerType:e,typeName:ve.ZodReadonly,...Ae(t)});function iI(e,t={},n){return e?zs.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):zs.create()}const Bee={object:mt.lazycreate};var ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ve||(ve={}));const jee=(e,t={message:`Input not instance of ${e.name}`})=>iI(n=>n instanceof e,t),aI=Nr.create,oI=Ta.create,Uee=Xp.create,Hee=_a.create,sI=Jl.create,zee=po.create,Vee=Yp.create,$ee=ec.create,Wee=tc.create,Yee=zs.create,qee=ho.create,Gee=Ci.create,Kee=qp.create,Xee=Pr.create,Qee=mt.create,Zee=mt.strictCreate,Jee=nc.create,ete=Gp.create,tte=rc.create,nte=Zr.create,rte=ic.create,ite=Kp.create,ate=mo.create,ote=$s.create,ste=ac.create,ute=oc.create,lte=Sa.create,cte=sc.create,dte=Ws.create,uI=Ir.create,fte=Jr.create,pte=Ca.create,hte=Ir.createWithPreprocess,mte=cc.create;var Sv=Object.freeze({__proto__:null,defaultErrorMap:Us,setErrorMap:wee,getErrorMap:Vp,makeIssue:$p,EMPTY_PATH:bee,addIssueToContext:oe,ParseStatus:sn,INVALID:we,DIRTY:Hs,OK:hn,isAborted:wv,isDirty:bv,isValid:Kl,isAsync:Xl,get util(){return je},get objectUtil(){return xv},ZodParsedType:se,getParsedType:Ea,ZodType:Ne,datetimeRegex:nI,ZodString:Nr,ZodNumber:Ta,ZodBigInt:_a,ZodBoolean:Jl,ZodDate:po,ZodSymbol:Yp,ZodUndefined:ec,ZodNull:tc,ZodAny:zs,ZodUnknown:ho,ZodNever:Ci,ZodVoid:qp,ZodArray:Pr,ZodObject:mt,ZodUnion:nc,ZodDiscriminatedUnion:Gp,ZodIntersection:rc,ZodTuple:Zr,ZodRecord:ic,ZodMap:Kp,ZodSet:mo,ZodFunction:$s,ZodLazy:ac,ZodLiteral:oc,ZodEnum:Sa,ZodNativeEnum:sc,ZodPromise:Ws,ZodEffects:Ir,ZodTransformer:Ir,ZodOptional:Jr,ZodNullable:Ca,ZodDefault:uc,ZodCatch:lc,ZodNaN:Xp,BRAND:Fee,ZodBranded:_v,ZodPipeline:cc,ZodReadonly:dc,custom:iI,Schema:Ne,ZodSchema:Ne,late:Bee,get ZodFirstPartyTypeKind(){return ve},coerce:{string:e=>Nr.create({...e,coerce:!0}),number:e=>Ta.create({...e,coerce:!0}),boolean:e=>Jl.create({...e,coerce:!0}),bigint:e=>_a.create({...e,coerce:!0}),date:e=>po.create({...e,coerce:!0})},any:Yee,array:Xee,bigint:Hee,boolean:sI,date:zee,discriminatedUnion:ete,effect:uI,enum:lte,function:ote,instanceof:jee,intersection:tte,lazy:ste,literal:ute,map:ite,nan:Uee,nativeEnum:cte,never:Gee,null:Wee,nullable:pte,number:oI,object:Qee,oboolean:()=>sI().optional(),onumber:()=>oI().optional(),optional:fte,ostring:()=>aI().optional(),pipeline:mte,preprocess:hte,promise:dte,record:rte,set:ate,strictObject:Zee,string:aI,symbol:Vee,transformer:uI,tuple:nte,undefined:$ee,union:Jee,unknown:qee,void:Kee,NEVER:we,ZodIssueCode:Z,quotelessJson:xee,ZodError:Yn});const Cv=v.forwardRef(({className:e,type:t,...n},r)=>{const i=Qf();return E.jsx(Xf,{ref:r,children:E.jsx("input",{dir:i,type:t,className:Le("flex w-full rounded-xl border border-input bg-background p-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-primary-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition","rtl:placeholder:text-right",e),...n})})});Cv.displayName="Input";const gte=Sv.object({name:Sv.string().min(2),email:Sv.string().email()});function yte(){var s,u,l;const{createUnverifiedContact:e}=$7(),t=ms(),n=Ts(),{data:r}=Nf(),{observedElementRef:i}=I0({fallbackHeight:xE}),[a,o]=Oj(async c=>{c.preventDefault();const d=new FormData(c.currentTarget),f=Object.fromEntries(d.entries()),p=gte.safeParse(f);p.success&&await e({email:p.data.email,name:p.data.name})});return E.jsxs("div",{ref:i,className:Le(bg.widgetMinHeight,"h-fit bg-primary flex flex-col"),children:[E.jsxs("div",{dir:"auto",className:"flex-1 flex flex-col px-4 py-12 text-start space-y-4 relative z-10",children:[E.jsx("div",{className:"flex items-center justify-between w-full mb-2",children:(s=t.assets)!=null&&s.organizationLogo?E.jsx("img",{src:(u=t.assets)==null?void 0:u.organizationLogo,alt:"Company Logo",className:"h-8 w-auto object-contain"}):E.jsx("h2",{className:"font-bold text-xl text-primary-foreground",dir:"auto",children:(l=r==null?void 0:r.data)==null?void 0:l.organizationName})}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("h1",{className:"text-2xl font-bold text-primary-foreground",dir:"auto",children:n.get("welcome-title")}),E.jsx("p",{className:"text-primary-foreground/90 text-sm max-w-[320px] leading-relaxed",dir:"auto",children:n.get("welcome-description")})]})]}),E.jsx("div",{className:"p-2 bg-background rounded-t-3xl",dir:"auto",children:E.jsxs("form",{onSubmit:o,className:"space-y-2",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx(Cv,{required:!0,autoFocus:!0,placeholder:n.get("your-name"),name:"name",className:"rounded-3xl pl-3"}),E.jsx(Cv,{required:!0,type:"email",placeholder:n.get("your-email"),name:"email",className:"rounded-3xl pl-3"})]}),E.jsxs(sr,{disabled:a.loading,className:"w-full rounded-3xl",size:"lg",children:[a.loading?n.get("starting-chat"):n.get("start-chat"),E.jsx(w2,{className:"size-4 rtl:-scale-100"})]})]})})]})}function vte({session:e}){const{bot:t}=ms(),{toChatScreen:n}=gl(),r=e.assignee.kind==="human"?e.assignee.name||"Support Agent":(t==null?void 0:t.name)||"AI Support Agent",i=e.assignee.kind==="human"?e.assignee.avatarUrl||"":(t==null?void 0:t.avatar)||"";return E.jsxs(sr,{variant:"outline",size:"lg",className:"border-muted rounded-full p-2 flex text-start justify-between w-full whitespace-normal",onClick:()=>n(e.id),children:[E.jsxs("div",{className:"flex-1 flex gap-2 items-center",children:[E.jsx(ir,{mode:"wait",children:E.jsx(vt,{snapExit:!0,children:E.jsx(Gl,{className:"size-10",children:E.jsx(Hp,{src:i,alt:"Agent Icon"})})})}),E.jsxs("div",{className:"flex-1",children:[E.jsx(ir,{mode:"wait",children:E.jsx(vt,{snapExit:!0,children:r},r)}),E.jsx(ir,{mode:"wait",children:e.lastMessage?E.jsx(vt,{snapExit:!0,children:E.jsx(MN,{remarkPlugins:[C3],rehypePlugins:[BP],className:"line-clamp-1 overflow-hidden text-ellipsis text-xs text-muted-foreground",children:e.lastMessage})},e.lastMessage||"content"):E.jsx(vt,{className:"w-1/2",snapExit:!0,children:E.jsx(AR,{className:"h-4 w-full"})},"skeleton")})]})]}),E.jsx(x2,{className:"size-4 text-muted-foreground shrink-0"})]})}function xte(){const e=Ts(),{toChatScreen:t}=gl(),{sessionsState:{data:n,isInitialFetchLoading:r}}=fl();return E.jsx("div",{className:"flex-1 flex flex-col overflow-scroll p-2",children:E.jsx(ir,{mode:"wait",children:r?E.jsx(vt,{className:"flex-1 flex items-center justify-center",children:E.jsx(XP,{})},"loading"):E.jsx(vt,{className:"flex-1 flex flex-col gap-2 relative",children:n.length?E.jsxs(E.Fragment,{children:[E.jsx(ir,{children:n.map((i,a)=>E.jsx(vt,{snapExit:!0,children:E.jsx(vte,{session:i})},`${i.id}-${a}`))}),E.jsx("div",{className:"mt-auto w-full rounded-3xl sticky bottom-0 outline outline-8 outline-background",children:E.jsx(sr,{size:"lg",className:"w-full rounded-3xl",onClick:()=>t(),children:e.get("new-conversation")},"new-session")})]}):E.jsxs("div",{className:"flex-1 flex flex-col gap-2 items-center",children:[E.jsx("div",{className:"flex-1 flex items-center justify-center",children:E.jsx("p",{className:"text-muted-foreground",children:"No conversations yet"})}),E.jsx(sr,{size:"lg",className:"w-full rounded-3xl",onClick:()=>t(),children:e.get("new-conversation")},"new-session")]})},"sessions")})})}function wte(){const{observedElementRef:e}=I0({fallbackHeight:wE});return E.jsx("div",{ref:e,className:Le(bg.widgetHeight,"w-full flex flex-col overflow-hidden bg-background"),children:E.jsxs("div",{className:"size-full flex flex-col",children:[E.jsx(kR,{}),E.jsx(xte,{})]})})}function bte(){Nf();const{routerState:{screen:e}}=gl();return E.jsx("div",{className:"bg-background size-full",children:E.jsx(ir,{mode:"wait",children:(()=>{switch(e){case"welcome":return E.jsx(vt,{fadeIn:"right",className:"size-full",snapExit:!0,children:E.jsx(yte,{})},e);case"sessions":return E.jsx(vt,{fadeIn:"right",className:"size-full",snapExit:!0,children:E.jsx(wte,{})},e);case"chat":return E.jsx(vt,{fadeIn:"right",className:"size-full",snapExit:!0,children:E.jsx(vee,{})},e);default:return null}})()})})}var Av="focusScope.autoFocusOnMount",kv="focusScope.autoFocusOnUnmount",lI={bubbles:!1,cancelable:!0},Ete="FocusScope",cI=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,u]=v.useState(null),l=Yt(i),c=Yt(a),d=v.useRef(null),f=$r(t,y=>u(y)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let y=function(b){if(p.paused||!s)return;const T=b.target;s.contains(T)?d.current=T:Aa(d.current,{select:!0})},w=function(b){if(p.paused||!s)return;const T=b.relatedTarget;T!==null&&(s.contains(T)||Aa(d.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&Aa(s)};document.addEventListener("focusin",y),document.addEventListener("focusout",w);const x=new MutationObserver(g);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w),x.disconnect()}}},[r,s,p.paused]),v.useEffect(()=>{if(s){pI.add(p);const y=document.activeElement;if(!s.contains(y)){const g=new CustomEvent(Av,lI);s.addEventListener(Av,l),s.dispatchEvent(g),g.defaultPrevented||(Tte(kte(dI(s)),{select:!0}),document.activeElement===y&&Aa(s))}return()=>{s.removeEventListener(Av,l),setTimeout(()=>{const g=new CustomEvent(kv,lI);s.addEventListener(kv,c),s.dispatchEvent(g),g.defaultPrevented||Aa(y??document.body,{select:!0}),s.removeEventListener(kv,c),pI.remove(p)},0)}}},[s,l,c,p]);const m=v.useCallback(y=>{if(!n&&!r||p.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,g=document.activeElement;if(w&&g){const x=y.currentTarget,[b,T]=_te(x);b&&T?!y.shiftKey&&g===T?(y.preventDefault(),n&&Aa(b,{select:!0})):y.shiftKey&&g===b&&(y.preventDefault(),n&&Aa(T,{select:!0})):g===x&&y.preventDefault()}},[n,r,p.paused]);return E.jsx(zn.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});cI.displayName=Ete;function Tte(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Aa(r,{select:t}),document.activeElement!==n)return}function _te(e){const t=dI(e),n=fI(t,e),r=fI(t.reverse(),e);return[n,r]}function dI(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fI(e,t){for(const n of e)if(!Ste(n,{upTo:t}))return n}function Ste(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Cte(e){return e instanceof HTMLInputElement&&"select"in e}function Aa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Cte(e)&&t&&e.select()}}var pI=Ate();function Ate(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=hI(e,t),e.unshift(t)},remove(t){var n;e=hI(e,t),(n=e[0])==null||n.resume()}}}function hI(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kte(e){return e.filter(t=>t.tagName!=="A")}var Qp="right-scroll-bar-position",Zp="width-before-scroll-bar",Rte="with-scroll-bars-hidden",Nte="--removed-body-scroll-bar-size";function Rv(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Pte(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Ite=typeof window<"u"?v.useLayoutEffect:v.useEffect,mI=new WeakMap;function Ote(e,t){var n=Pte(null,function(r){return e.forEach(function(i){return Rv(i,r)})});return Ite(function(){var r=mI.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||Rv(s,null)}),a.forEach(function(s){i.has(s)||Rv(s,o)})}mI.set(n,e)},[e]),n}var gI=xk(),Nv=function(){},Jp=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Nv,onWheelCapture:Nv,onTouchMoveCapture:Nv}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,y=e.allowPinchZoom,w=e.as,g=w===void 0?"div":w,x=e.gapMode,b=il(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,S=Ote([n,t]),_=Mt(Mt({},b),i);return v.createElement(v.Fragment,null,c&&v.createElement(T,{sideCar:gI,removeScrollBar:l,shards:d,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:x}),o?v.cloneElement(v.Children.only(s),Mt(Mt({},_),{ref:S})):v.createElement(g,Mt({},_,{className:u,ref:S}),s))});Jp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Jp.classNames={fullWidth:Zp,zeroRight:Qp};var Dte={left:0,top:0,right:0,gap:0},Pv=function(e){return parseInt(e||"",10)||0},Lte=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Pv(n),Pv(r),Pv(i)]},Mte=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dte;var t=Lte(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Fte=s1(),Ys="data-scroll-locked",Bte=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
410
410
  .`.concat(Rte,` {
411
411
  overflow: hidden `).concat(r,`;
412
412
  padding-right: `).concat(s,"px ").concat(r,`;
@@ -446,7 +446,7 @@ to {
446
446
  `)},yI=function(){var e=parseInt(document.body.getAttribute(Ys)||"0",10);return isFinite(e)?e:0},jte=function(){v.useEffect(function(){return document.body.setAttribute(Ys,(yI()+1).toString()),function(){var e=yI()-1;e<=0?document.body.removeAttribute(Ys):document.body.setAttribute(Ys,e.toString())}},[])},Ute=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;jte();var a=v.useMemo(function(){return Mte(i)},[i]);return v.createElement(Fte,{styles:Bte(a,!t,i,n?"":"!important")})},Iv=!1;if(typeof window<"u")try{var eh=Object.defineProperty({},"passive",{get:function(){return Iv=!0,!0}});window.addEventListener("test",eh,eh),window.removeEventListener("test",eh,eh)}catch{Iv=!1}var qs=Iv?{passive:!1}:!1,Hte=function(e){return e.tagName==="TEXTAREA"},vI=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Hte(e)&&n[t]==="visible")},zte=function(e){return vI(e,"overflowY")},Vte=function(e){return vI(e,"overflowX")},xI=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=wI(e,r);if(i){var a=bI(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$te=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Wte=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},wI=function(e,t){return e==="v"?zte(t):Vte(t)},bI=function(e,t){return e==="v"?$te(t):Wte(t)},Yte=function(e,t){return e==="h"&&t==="rtl"?-1:1},qte=function(e,t,n,r,i){var a=Yte(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,u=t.contains(s),l=!1,c=o>0,d=0,f=0;do{var p=bI(e,s),m=p[0],y=p[1],w=p[2],g=y-w-a*m;(m||g)&&wI(e,s)&&(d+=g,f+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(d)<1||!i)||!c&&(Math.abs(f)<1||!i))&&(l=!0),l},th=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},EI=function(e){return[e.deltaX,e.deltaY]},TI=function(e){return e&&"current"in e?e.current:e},Gte=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Kte=function(e){return`
447
447
  .block-interactivity-`.concat(e,` {pointer-events: none;}
448
448
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
449
- `)},Xte=0,Gs=[];function Qte(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(Xte++)[0],a=v.useState(s1)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=of([e.lockRef.current],(e.shards||[]).map(TI),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(y,w){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var g=th(y),x=n.current,b="deltaX"in y?y.deltaX:x[0]-g[0],T="deltaY"in y?y.deltaY:x[1]-g[1],S,_=y.target,N=Math.abs(b)>Math.abs(T)?"h":"v";if("touches"in y&&N==="h"&&_.type==="range")return!1;var D=xI(N,_);if(!D)return!0;if(D?S=N:(S=N==="v"?"h":"v",D=xI(N,_)),!D)return!1;if(!r.current&&"changedTouches"in y&&(b||T)&&(r.current=S),!S)return!0;var V=r.current||S;return qte(V,w,y,V==="h"?b:T,!0)},[]),u=v.useCallback(function(y){var w=y;if(!(!Gs.length||Gs[Gs.length-1]!==a)){var g="deltaY"in w?EI(w):th(w),x=t.current.filter(function(S){return S.name===w.type&&(S.target===w.target||w.target===S.shadowParent)&&Gte(S.delta,g)})[0];if(x&&x.should){w.cancelable&&w.preventDefault();return}if(!x){var b=(o.current.shards||[]).map(TI).filter(Boolean).filter(function(S){return S.contains(w.target)}),T=b.length>0?s(w,b[0]):!o.current.noIsolation;T&&w.cancelable&&w.preventDefault()}}},[]),l=v.useCallback(function(y,w,g,x){var b={name:y,delta:w,target:g,should:x,shadowParent:Zte(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(T){return T!==b})},1)},[]),c=v.useCallback(function(y){n.current=th(y),r.current=void 0},[]),d=v.useCallback(function(y){l(y.type,EI(y),y.target,s(y,e.lockRef.current))},[]),f=v.useCallback(function(y){l(y.type,th(y),y.target,s(y,e.lockRef.current))},[]);v.useEffect(function(){return Gs.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,qs),document.addEventListener("touchmove",u,qs),document.addEventListener("touchstart",c,qs),function(){Gs=Gs.filter(function(y){return y!==a}),document.removeEventListener("wheel",u,qs),document.removeEventListener("touchmove",u,qs),document.removeEventListener("touchstart",c,qs)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:Kte(i)}):null,p?v.createElement(Ute,{gapMode:e.gapMode}):null)}function Zte(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jte=bk(gI,Qte);var _I=v.forwardRef(function(e,t){return v.createElement(Jp,Mt({},e,{ref:t,sideCar:Jte}))});_I.classNames=Jp.classNames;var Ov="Popover",[SI,mie]=ca(Ov,[zf]),fc=zf(),[ene,go]=SI(Ov),CI=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=fc(t),u=v.useRef(null),[l,c]=v.useState(!1),[d=!1,f]=$f({prop:r,defaultProp:i,onChange:a});return E.jsx(yA,{...s,children:E.jsx(ene,{scope:t,contentId:yl(),triggerRef:u,open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:l,onCustomAnchorAdd:v.useCallback(()=>c(!0),[]),onCustomAnchorRemove:v.useCallback(()=>c(!1),[]),modal:o,children:n})})};CI.displayName=Ov;var AI="PopoverAnchor",tne=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=go(AI,n),a=fc(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return v.useEffect(()=>(o(),()=>s()),[o,s]),E.jsx(Vy,{...a,...r,ref:t})});tne.displayName=AI;var kI="PopoverTrigger",RI=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=go(kI,n),a=fc(n),o=$r(t,i.triggerRef),s=E.jsx(zn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":OI(i.open),...r,ref:o,onClick:Sn(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:E.jsx(Vy,{asChild:!0,...a,children:s})});RI.displayName=kI;var nne="PopoverPortal",[gie,rne]=SI(nne,{forceMount:void 0}),Ks="PopoverContent",NI=v.forwardRef((e,t)=>{const n=rne(Ks,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=go(Ks,e.__scopePopover);return E.jsx($y,{present:r||a.open,children:a.modal?E.jsx(ine,{...i,ref:t}):E.jsx(ane,{...i,ref:t})})});NI.displayName=Ks;var ine=v.forwardRef((e,t)=>{const n=go(Ks,e.__scopePopover),r=v.useRef(null),i=$r(t,r),a=v.useRef(!1);return v.useEffect(()=>{const o=r.current;if(o)return yk(o)},[]),E.jsx(_I,{as:If,allowPinchZoom:!0,children:E.jsx(PI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sn(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Sn(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0,l=s.button===2||u;a.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Sn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),ane=v.forwardRef((e,t)=>{const n=go(Ks,e.__scopePopover),r=v.useRef(!1),i=v.useRef(!1);return E.jsx(PI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((l=n.triggerRef.current)==null?void 0:l.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),PI=v.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:c,...d}=e,f=go(Ks,n),p=fc(n);return WA(),E.jsx(cI,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:E.jsx(ky,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:E.jsx(vA,{"data-state":OI(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),II="PopoverClose",one=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=go(II,n);return E.jsx(zn.button,{type:"button",...r,ref:t,onClick:Sn(e.onClick,()=>i.onOpenChange(!1))})});one.displayName=II;var sne="PopoverArrow",une=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=fc(n);return E.jsx(xA,{...i,...r,ref:t})});une.displayName=sne;function OI(e){return e?"open":"closed"}var lne=CI,cne=NI;function Dv(){return Dv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dv.apply(null,arguments)}function dne(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var DI,LI;typeof document<"u"&&(DI=document),typeof window<"u"&&(LI=window);var fne=yn.createContext({document:DI,window:LI}),pne=["children","head","initialContent","src","mountTarget"],MI=v.forwardRef((e,t)=>{var{children:n,head:r,initialContent:i,src:a,mountTarget:o}=e,s=dne(e,pne),[u,l]=v.useState(!1),[c,d]=v.useState(),f=T=>{T&&d(T)};v.useImperativeHandle(t,()=>c,[c]);var p=i||"<!DOCTYPE html><html><head></head><body></body></html>",m=()=>c?c.contentDocument:null,y=()=>{var T=m();return o?T==null?void 0:T.querySelector(o):T==null?void 0:T.body},w=v.useRef(),g=v.useCallback(T=>{w.current=T;var S=()=>setInterval(()=>g(T),500);clearInterval(S()),u||l(!0)},[u]);v.useMemo(()=>{!a&&s.onLoad&&u&&s.onLoad(w.current)},[u]),v.useEffect(()=>{if(c&&!a){var T;(T=c.contentWindow)==null||T.addEventListener("DOMContentLoaded",g)}return()=>{if(c&&!a){var S;(S=c.contentWindow)==null||S.removeEventListener("DOMContentLoaded",g)}}},[c,g]);var x=()=>{var T,S=m(),_=(T=m())==null?void 0:T.head,N=y(),D=(S==null?void 0:S.defaultView)||(S==null?void 0:S.parentView),V=E.jsx(fne.Provider,{value:{document:S,window:D},children:n});return[_&&r&&Qo.createPortal(r,_),c&&N&&Qo.createPortal(V,N)]},b={};return a?(delete b.srcDoc,b.src=a,b.onLoad=s.onLoad):b.srcDoc=p,E.jsx("iframe",Dv({title:s.title,ref:f},s,{onLoad:g},b,{children:u&&x()}))});MI.displayName="IFrame";const FI='@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..700;1,14..32,100..700&display=swap";@import"https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap";[data-chat-widget] *,[data-chat-widget] :before,[data-chat-widget] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-chat-widget] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-chat-widget] *,[data-chat-widget] :before,[data-chat-widget] :after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}[data-chat-widget] :before,[data-chat-widget] :after{--tw-content: ""}[data-chat-widget] html,[data-chat-widget] :host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}[data-chat-widget] body{margin:0;line-height:inherit}[data-chat-widget] hr{height:0;color:inherit;border-top-width:1px}[data-chat-widget] abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}[data-chat-widget] h1,[data-chat-widget] h2,[data-chat-widget] h3,[data-chat-widget] h4,[data-chat-widget] h5,[data-chat-widget] h6{font-size:inherit;font-weight:inherit}[data-chat-widget] a{color:inherit;text-decoration:inherit}[data-chat-widget] b,[data-chat-widget] strong{font-weight:bolder}[data-chat-widget] code,[data-chat-widget] kbd,[data-chat-widget] samp,[data-chat-widget] pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}[data-chat-widget] small{font-size:80%}[data-chat-widget] sub,[data-chat-widget] sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}[data-chat-widget] sub{bottom:-.25em}[data-chat-widget] sup{top:-.5em}[data-chat-widget] table{text-indent:0;border-color:inherit;border-collapse:collapse}[data-chat-widget] button,[data-chat-widget] input,[data-chat-widget] optgroup,[data-chat-widget] select,[data-chat-widget] textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}[data-chat-widget] button,[data-chat-widget] select{text-transform:none}[data-chat-widget] button,[data-chat-widget] input:where([type=button]),[data-chat-widget] input:where([type=reset]),[data-chat-widget] input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}[data-chat-widget] :-moz-focusring{outline:auto}[data-chat-widget] :-moz-ui-invalid{box-shadow:none}[data-chat-widget] progress{vertical-align:baseline}[data-chat-widget] ::-webkit-inner-spin-button,[data-chat-widget] ::-webkit-outer-spin-button{height:auto}[data-chat-widget] [type=search]{-webkit-appearance:textfield;outline-offset:-2px}[data-chat-widget] ::-webkit-search-decoration{-webkit-appearance:none}[data-chat-widget] ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}[data-chat-widget] summary{display:list-item}[data-chat-widget] blockquote,[data-chat-widget] dl,[data-chat-widget] dd,[data-chat-widget] h1,[data-chat-widget] h2,[data-chat-widget] h3,[data-chat-widget] h4,[data-chat-widget] h5,[data-chat-widget] h6,[data-chat-widget] hr,[data-chat-widget] figure,[data-chat-widget] p,[data-chat-widget] pre{margin:0}[data-chat-widget] fieldset{margin:0;padding:0}[data-chat-widget] legend{padding:0}[data-chat-widget] ol,[data-chat-widget] ul,[data-chat-widget] menu{list-style:none;margin:0;padding:0}[data-chat-widget] dialog{padding:0}[data-chat-widget] textarea{resize:vertical}[data-chat-widget] input::-moz-placeholder,[data-chat-widget] textarea::-moz-placeholder{opacity:1;color:#9ca3af}[data-chat-widget] input::placeholder,[data-chat-widget] textarea::placeholder{opacity:1;color:#9ca3af}[data-chat-widget] button,[data-chat-widget] [role=button]{cursor:pointer}[data-chat-widget] :disabled{cursor:default}[data-chat-widget] img,[data-chat-widget] svg,[data-chat-widget] video,[data-chat-widget] canvas,[data-chat-widget] audio,[data-chat-widget] iframe,[data-chat-widget] embed,[data-chat-widget] object{display:block;vertical-align:middle}[data-chat-widget] img,[data-chat-widget] video{max-width:100%;height:auto}[data-chat-widget] [hidden]:where(:not([hidden=until-found])){display:none}[data-chat-widget] *{-ms-overflow-style:none;scrollbar-width:none}[data-chat-widget] *::-webkit-scrollbar{display:none}[data-chat-widget] *{border-color:hsl(var(--opencx-border))}[data-chat-widget] .container{width:100%}@media (min-width: 640px){[data-chat-widget] .container{max-width:640px}}@media (min-width: 768px){[data-chat-widget] .container{max-width:768px}}@media (min-width: 1024px){[data-chat-widget] .container{max-width:1024px}}@media (min-width: 1280px){[data-chat-widget] .container{max-width:1280px}}@media (min-width: 1536px){[data-chat-widget] .container{max-width:1536px}}[data-chat-widget] .prose{color:var(--tw-prose-body);max-width:65ch}[data-chat-widget] .prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}[data-chat-widget] .prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}[data-chat-widget] .prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}[data-chat-widget] .prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}[data-chat-widget] .prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}[data-chat-widget] .prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}[data-chat-widget] .prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}[data-chat-widget] .prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}[data-chat-widget] .prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}[data-chat-widget] .prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}[data-chat-widget] .prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}[data-chat-widget] .prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}[data-chat-widget] .prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}[data-chat-widget] .prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}[data-chat-widget] .prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}[data-chat-widget] .prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}[data-chat-widget] .prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}[data-chat-widget] .prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}[data-chat-widget] .prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}[data-chat-widget] .prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em}[data-chat-widget] .prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}[data-chat-widget] .prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}[data-chat-widget] .prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}[data-chat-widget] .prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}[data-chat-widget] .prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}[data-chat-widget] .prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}[data-chat-widget] .prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}[data-chat-widget] .prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}[data-chat-widget] .prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}[data-chat-widget] .prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}[data-chat-widget] .prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}[data-chat-widget] .prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}[data-chat-widget] .prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}[data-chat-widget] .prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}[data-chat-widget] .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}[data-chat-widget] .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}[data-chat-widget] .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}[data-chat-widget] .prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}[data-chat-widget] .prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}[data-chat-widget] .prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-inline-start:1.1428571em}[data-chat-widget] .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}[data-chat-widget] .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}[data-chat-widget] .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}[data-chat-widget] .prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}[data-chat-widget] .prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}[data-chat-widget] .prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}[data-chat-widget] .prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}[data-chat-widget] .prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}[data-chat-widget] .prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}[data-chat-widget] .prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}[data-chat-widget] .prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}[data-chat-widget] .prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}[data-chat-widget] .prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}[data-chat-widget] .prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}[data-chat-widget] .prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}[data-chat-widget] .prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}[data-chat-widget] .prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}[data-chat-widget] .prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}[data-chat-widget] .prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}[data-chat-widget] .prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}[data-chat-widget] .prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}[data-chat-widget] .prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}[data-chat-widget] .prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}[data-chat-widget] .prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}[data-chat-widget] .prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}[data-chat-widget] .prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}[data-chat-widget] .prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}[data-chat-widget] .prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}[data-chat-widget] .prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}[data-chat-widget] .prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}[data-chat-widget] .prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}[data-chat-widget] .prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}[data-chat-widget] .prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}[data-chat-widget] .prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}[data-chat-widget] .prose-sm{font-size:.875rem;line-height:1.7142857}[data-chat-widget] .prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}[data-chat-widget] .prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}[data-chat-widget] .prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-inline-start:1.1111111em}[data-chat-widget] .prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}[data-chat-widget] .prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}[data-chat-widget] .prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}[data-chat-widget] .prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}[data-chat-widget] .prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}[data-chat-widget] .prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}[data-chat-widget] .prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}[data-chat-widget] .prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}[data-chat-widget] .prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding-top:.1428571em;padding-inline-end:.3571429em;padding-bottom:.1428571em;padding-inline-start:.3571429em}[data-chat-widget] .prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}[data-chat-widget] .prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}[data-chat-widget] .prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}[data-chat-widget] .prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}[data-chat-widget] .prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}[data-chat-widget] .prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}[data-chat-widget] .prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}[data-chat-widget] .prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}[data-chat-widget] .prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}[data-chat-widget] .prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}[data-chat-widget] .prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}[data-chat-widget] .prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}[data-chat-widget] .prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}[data-chat-widget] .prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}[data-chat-widget] .prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}[data-chat-widget] .prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}[data-chat-widget] .prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}[data-chat-widget] .prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-inline-start:1.5714286em}[data-chat-widget] .prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}[data-chat-widget] .prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}[data-chat-widget] .prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}[data-chat-widget] .prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}[data-chat-widget] .prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}[data-chat-widget] .prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}[data-chat-widget] .prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}[data-chat-widget] .prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}[data-chat-widget] .prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}[data-chat-widget] .prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}[data-chat-widget] .prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}[data-chat-widget] .prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}[data-chat-widget] .pointer-events-none{pointer-events:none}[data-chat-widget] .visible{visibility:visible}[data-chat-widget] .fixed{position:fixed}[data-chat-widget] .absolute{position:absolute}[data-chat-widget] .relative{position:relative}[data-chat-widget] .sticky{position:sticky}[data-chat-widget] .inset-0{top:0;right:0;bottom:0;left:0}[data-chat-widget] .bottom-0{bottom:0}[data-chat-widget] .left-2{left:.5rem}[data-chat-widget] .isolate{isolation:isolate}[data-chat-widget] .z-10{z-index:10}[data-chat-widget] .z-50{z-index:50}[data-chat-widget] .-mx-1{margin-left:-.25rem;margin-right:-.25rem}[data-chat-widget] .my-1{margin-top:.25rem;margin-bottom:.25rem}[data-chat-widget] .mb-2{margin-bottom:.5rem}[data-chat-widget] .ml-auto{margin-left:auto}[data-chat-widget] .mt-2{margin-top:.5rem}[data-chat-widget] .mt-auto{margin-top:auto}[data-chat-widget] .line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}[data-chat-widget] .line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}[data-chat-widget] .block{display:block}[data-chat-widget] .inline{display:inline}[data-chat-widget] .flex{display:flex}[data-chat-widget] .inline-flex{display:inline-flex}[data-chat-widget] .contents{display:contents}[data-chat-widget] .hidden{display:none}[data-chat-widget] .aspect-square{aspect-ratio:1 / 1}[data-chat-widget] .size-10{width:2.5rem;height:2.5rem}[data-chat-widget] .size-12{width:3rem;height:3rem}[data-chat-widget] .size-16{width:4rem;height:4rem}[data-chat-widget] .size-3{width:.75rem;height:.75rem}[data-chat-widget] .size-3\\.5{width:.875rem;height:.875rem}[data-chat-widget] .size-4{width:1rem;height:1rem}[data-chat-widget] .size-6{width:1.5rem;height:1.5rem}[data-chat-widget] .size-8{width:2rem;height:2rem}[data-chat-widget] .size-fit{width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}[data-chat-widget] .size-full{width:100%;height:100%}[data-chat-widget] .h-10{height:2.5rem}[data-chat-widget] .h-2{height:.5rem}[data-chat-widget] .h-3\\.5{height:.875rem}[data-chat-widget] .h-4{height:1rem}[data-chat-widget] .h-5{height:1.25rem}[data-chat-widget] .h-8{height:2rem}[data-chat-widget] .h-\\[600px\\]{height:600px}[data-chat-widget] .h-fit{height:-moz-fit-content;height:fit-content}[data-chat-widget] .h-full{height:100%}[data-chat-widget] .h-px{height:1px}[data-chat-widget] .max-h-\\[600px\\]{max-height:600px}[data-chat-widget] .max-h-full{max-height:100%}[data-chat-widget] .min-h-12{min-height:3rem}[data-chat-widget] .min-h-\\[400px\\]{min-height:400px}[data-chat-widget] .w-1\\/2{width:50%}[data-chat-widget] .w-10{width:2.5rem}[data-chat-widget] .w-2{width:.5rem}[data-chat-widget] .w-3\\.5{width:.875rem}[data-chat-widget] .w-4{width:1rem}[data-chat-widget] .w-60{width:15rem}[data-chat-widget] .w-9{width:2.25rem}[data-chat-widget] .w-auto{width:auto}[data-chat-widget] .w-fit{width:-moz-fit-content;width:fit-content}[data-chat-widget] .w-full{width:100%}[data-chat-widget] .min-w-56{min-width:14rem}[data-chat-widget] .min-w-\\[8rem\\]{min-width:8rem}[data-chat-widget] .max-w-\\[320px\\]{max-width:320px}[data-chat-widget] .max-w-full{max-width:100%}[data-chat-widget] .max-w-xs{max-width:20rem}[data-chat-widget] .flex-1{flex:1 1 0%}[data-chat-widget] .shrink-0{flex-shrink:0}[data-chat-widget] .translate-x-\\[var\\(--opencx-wobble-x\\)\\]{--tw-translate-x: var(--opencx-wobble-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .translate-y-\\[var\\(--opencx-wobble-y\\)\\]{--tw-translate-y: var(--opencx-wobble-y);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .scale-\\[1\\.01\\]{--tw-scale-x: 1.01;--tw-scale-y: 1.01;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .scale-\\[1\\.02\\]{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .scale-\\[1\\.1\\]{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .scale-\\[1\\]{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-chat-widget] .animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}[data-chat-widget] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}[data-chat-widget] .animate-spin{animation:spin 1s linear infinite}[data-chat-widget] .cursor-default{cursor:default}[data-chat-widget] .cursor-not-allowed{cursor:not-allowed}[data-chat-widget] .cursor-pointer{cursor:pointer}[data-chat-widget] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-chat-widget] .resize-none{resize:none}[data-chat-widget] .flex-row{flex-direction:row}[data-chat-widget] .flex-col{flex-direction:column}[data-chat-widget] .flex-wrap{flex-wrap:wrap}[data-chat-widget] .items-start{align-items:flex-start}[data-chat-widget] .items-end{align-items:flex-end}[data-chat-widget] .items-center{align-items:center}[data-chat-widget] .justify-start{justify-content:flex-start}[data-chat-widget] .justify-end{justify-content:flex-end}[data-chat-widget] .justify-center{justify-content:center}[data-chat-widget] .justify-between{justify-content:space-between}[data-chat-widget] .gap-0\\.5{gap:.125rem}[data-chat-widget] .gap-1{gap:.25rem}[data-chat-widget] .gap-2{gap:.5rem}[data-chat-widget] .space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}[data-chat-widget] .space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}[data-chat-widget] .space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}[data-chat-widget] .overflow-auto{overflow:auto}[data-chat-widget] .overflow-hidden{overflow:hidden}[data-chat-widget] .overflow-scroll{overflow:scroll}[data-chat-widget] .scroll-smooth{scroll-behavior:smooth}[data-chat-widget] .text-ellipsis{text-overflow:ellipsis}[data-chat-widget] .whitespace-normal{white-space:normal}[data-chat-widget] .whitespace-nowrap{white-space:nowrap}[data-chat-widget] .rounded-2xl{border-radius:1rem}[data-chat-widget] .rounded-3xl{border-radius:1.5rem}[data-chat-widget] .rounded-full{border-radius:9999px}[data-chat-widget] .rounded-lg{border-radius:.5rem}[data-chat-widget] .rounded-md{border-radius:.375rem}[data-chat-widget] .rounded-sm{border-radius:.125rem}[data-chat-widget] .rounded-xl{border-radius:.75rem}[data-chat-widget] .rounded-t-3xl{border-top-left-radius:1.5rem;border-top-right-radius:1.5rem}[data-chat-widget] .border{border-width:1px}[data-chat-widget] .border-2{border-width:2px}[data-chat-widget] .border-b{border-bottom-width:1px}[data-chat-widget] .border-destructive{border-color:hsl(var(--opencx-destructive))}[data-chat-widget] .border-input{border-color:hsl(var(--opencx-input))}[data-chat-widget] .border-muted{border-color:hsl(var(--opencx-muted))}[data-chat-widget] .border-primary{border-color:hsl(var(--opencx-primary))}[data-chat-widget] .border-transparent{border-color:transparent}[data-chat-widget] .bg-background{background-color:hsl(var(--opencx-background))}[data-chat-widget] .bg-black\\/50{background-color:#00000080}[data-chat-widget] .bg-destructive{background-color:hsl(var(--opencx-destructive))}[data-chat-widget] .bg-muted{background-color:hsl(var(--opencx-muted))}[data-chat-widget] .bg-primary{background-color:hsl(var(--opencx-primary))}[data-chat-widget] .bg-secondary{background-color:hsl(var(--opencx-secondary))}[data-chat-widget] .bg-transparent{background-color:transparent}[data-chat-widget] .bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}[data-chat-widget] .from-primary\\/50{--tw-gradient-from: hsl(var(--opencx-primary) / .5) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--opencx-primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}[data-chat-widget] .via-primary{--tw-gradient-to: hsl(var(--opencx-primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--opencx-primary)) var(--tw-gradient-via-position), var(--tw-gradient-to)}[data-chat-widget] .to-primary{--tw-gradient-to: hsl(var(--opencx-primary)) var(--tw-gradient-to-position)}[data-chat-widget] .fill-current{fill:currentColor}[data-chat-widget] .object-contain{-o-object-fit:contain;object-fit:contain}[data-chat-widget] .object-cover{-o-object-fit:cover;object-fit:cover}[data-chat-widget] .p-0{padding:0}[data-chat-widget] .p-1{padding:.25rem}[data-chat-widget] .p-2{padding:.5rem}[data-chat-widget] .p-4{padding:1rem}[data-chat-widget] .px-2{padding-left:.5rem;padding-right:.5rem}[data-chat-widget] .px-3{padding-left:.75rem;padding-right:.75rem}[data-chat-widget] .px-4{padding-left:1rem;padding-right:1rem}[data-chat-widget] .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}[data-chat-widget] .py-12{padding-top:3rem;padding-bottom:3rem}[data-chat-widget] .py-2{padding-top:.5rem;padding-bottom:.5rem}[data-chat-widget] .pb-0{padding-bottom:0}[data-chat-widget] .pl-2{padding-left:.5rem}[data-chat-widget] .pl-3{padding-left:.75rem}[data-chat-widget] .pl-8{padding-left:2rem}[data-chat-widget] .pr-2{padding-right:.5rem}[data-chat-widget] .text-center{text-align:center}[data-chat-widget] .text-start{text-align:start}[data-chat-widget] .align-middle{vertical-align:middle}[data-chat-widget] .font-inter{font-family:Inter,Rubik,serif,sans-serif}[data-chat-widget] .text-2xl{font-size:1.5rem;line-height:2rem}[data-chat-widget] .text-sm{font-size:.875rem;line-height:1.25rem}[data-chat-widget] .text-xl{font-size:1.25rem;line-height:1.75rem}[data-chat-widget] .text-xs{font-size:.75rem;line-height:1rem}[data-chat-widget] .font-bold{font-weight:700}[data-chat-widget] .font-medium{font-weight:500}[data-chat-widget] .font-semibold{font-weight:600}[data-chat-widget] .leading-relaxed{line-height:1.625}[data-chat-widget] .leading-snug{line-height:1.375}[data-chat-widget] .leading-tight{line-height:1.25}[data-chat-widget] .tracking-widest{letter-spacing:.1em}[data-chat-widget] .text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}[data-chat-widget] .text-destructive{color:hsl(var(--opencx-destructive))}[data-chat-widget] .text-destructive-foreground{color:hsl(var(--opencx-destructive-foreground))}[data-chat-widget] .text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}[data-chat-widget] .text-foreground{color:hsl(var(--opencx-foreground))}[data-chat-widget] .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}[data-chat-widget] .text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}[data-chat-widget] .text-muted-foreground{color:hsl(var(--opencx-muted-foreground))}[data-chat-widget] .text-primary{color:hsl(var(--opencx-primary))}[data-chat-widget] .text-primary-foreground{color:hsl(var(--opencx-primary-foreground))}[data-chat-widget] .text-primary-foreground\\/90{color:hsl(var(--opencx-primary-foreground) / .9)}[data-chat-widget] .text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}[data-chat-widget] .text-secondary-foreground{color:hsl(var(--opencx-secondary-foreground))}[data-chat-widget] .underline{text-decoration-line:underline}[data-chat-widget] .underline-offset-4{text-underline-offset:4px}[data-chat-widget] .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[data-chat-widget] .opacity-0{opacity:0}[data-chat-widget] .opacity-50{opacity:.5}[data-chat-widget] .opacity-60{opacity:.6}[data-chat-widget] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-chat-widget] .outline{outline-style:solid}[data-chat-widget] .outline-8{outline-width:8px}[data-chat-widget] .outline-background{outline-color:hsl(var(--opencx-background))}[data-chat-widget] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-chat-widget] .ring-offset-background{--tw-ring-offset-color: hsl(var(--opencx-background))}[data-chat-widget] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-chat-widget] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-chat-widget] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-chat-widget] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-chat-widget] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-chat-widget] .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}[data-chat-widget] .animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}[data-chat-widget] .fade-in-0{--tw-enter-opacity: 0}[data-chat-widget] .zoom-in-95{--tw-enter-scale: .95}[data-chat-widget] .ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}[data-chat-widget] .\\[animation-delay\\:-0\\.15s\\]{animation-delay:-.15s}[data-chat-widget] .\\[animation-delay\\:-0\\.3s\\]{animation-delay:-.3s}[data-chat-widget] .\\[background\\:radial-gradient\\(50\\%_50\\%_at_50\\%_100\\%\\,hsl\\(var\\(--opencx-primary-foreground\\)\\)_-75\\%\\,hsl\\(var\\(--opencx-primary\\)\\)_100\\%\\)\\]{background:radial-gradient(50% 50% at 50% 100%,hsl(var(--opencx-primary-foreground)) -75%,hsl(var(--opencx-primary)))}[data-chat-widget] .required:after{content:" *";color:red}[data-chat-widget] .file\\:border-0::file-selector-button{border-width:0px}[data-chat-widget] .file\\:bg-transparent::file-selector-button{background-color:transparent}[data-chat-widget] .file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}[data-chat-widget] .file\\:font-medium::file-selector-button{font-weight:500}[data-chat-widget] .file\\:text-primary-foreground::file-selector-button{color:hsl(var(--opencx-primary-foreground))}[data-chat-widget] .placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--opencx-muted-foreground))}[data-chat-widget] .placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--opencx-muted-foreground))}[data-chat-widget] .hover\\:bg-accent:hover{background-color:hsl(var(--opencx-accent))}[data-chat-widget] .hover\\:bg-green-50\\/50:hover{background-color:#f0fdf480}[data-chat-widget] .hover\\:bg-red-50\\/50:hover{background-color:#fef2f280}[data-chat-widget] .hover\\:text-accent-foreground:hover{color:hsl(var(--opencx-accent-foreground))}[data-chat-widget] .hover\\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}[data-chat-widget] .hover\\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}[data-chat-widget] .hover\\:text-primary:hover{color:hsl(var(--opencx-primary))}[data-chat-widget] .hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}[data-chat-widget] .hover\\:underline:hover{text-decoration-line:underline}[data-chat-widget] .focus\\:bg-accent:focus{background-color:hsl(var(--opencx-accent))}[data-chat-widget] .focus\\:text-accent-foreground:focus{color:hsl(var(--opencx-accent-foreground))}[data-chat-widget] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-chat-widget] .focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-chat-widget] .focus-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--opencx-ring))}[data-chat-widget] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-chat-widget] .focus-visible\\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--opencx-background))}[data-chat-widget] .active\\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .active\\:shadow-none:active{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .hover\\:active\\:scale-95:active:hover{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .disabled\\:pointer-events-none:disabled{pointer-events:none}[data-chat-widget] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-chat-widget] .disabled\\:opacity-0:disabled{opacity:0}[data-chat-widget] .disabled\\:opacity-50:disabled{opacity:.5}[data-chat-widget] .group:hover .group-hover\\:opacity-100{opacity:1}[data-chat-widget] .group:hover .group-hover\\:active\\:scale-90:active,[data-chat-widget] .group:active .group-active\\:scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}[data-chat-widget] .data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .data-\\[state\\=checked\\]\\:bg-primary[data-state=checked]{background-color:hsl(var(--opencx-primary))}[data-chat-widget] .data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--opencx-accent))}[data-chat-widget] .data-\\[state\\=unchecked\\]\\:bg-input[data-state=unchecked]{background-color:hsl(var(--opencx-input))}[data-chat-widget] .data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}[data-chat-widget] .data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}[data-chat-widget] .data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}[data-chat-widget] .data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}[data-chat-widget] .data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}[data-chat-widget] .data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}[data-chat-widget] .data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}[data-chat-widget] .data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}[data-chat-widget] .data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}[data-chat-widget] .data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}[data-chat-widget] .data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}[data-chat-widget] .prose-a\\:underline :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){text-decoration-line:underline}[data-chat-widget] .prose-a\\:decoration-primary :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){text-decoration-color:hsl(var(--opencx-primary))}[data-chat-widget] .rtl\\:-scale-100:where([dir=rtl],[dir=rtl] *){--tw-scale-x: -1;--tw-scale-y: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .rtl\\:flex-row-reverse:where([dir=rtl],[dir=rtl] *){flex-direction:row-reverse}[data-chat-widget] .rtl\\:text-right:where([dir=rtl],[dir=rtl] *){text-align:right}[data-chat-widget] .rtl\\:placeholder\\:text-right:where([dir=rtl],[dir=rtl] *)::-moz-placeholder{text-align:right}[data-chat-widget] .rtl\\:placeholder\\:text-right:where([dir=rtl],[dir=rtl] *)::placeholder{text-align:right}[data-chat-widget] .\\[\\&_span\\]\\:size-1 span{width:.25rem;height:.25rem}[data-chat-widget] .\\[\\&_span\\]\\:bg-secondary-foreground span{background-color:hsl(var(--opencx-secondary-foreground))}[data-chat-widget] .\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}[data-chat-widget] .\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}[data-chat-widget] .\\[\\&_svg\\]\\:size-6 svg{width:1.5rem;height:1.5rem}[data-chat-widget] .\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}';function hne({className:e}){return E.jsx("svg",{width:"26",height:"32",viewBox:"0 0 26 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:Le("text-primary-foreground",e),children:E.jsx("path",{d:"M1.34103 25.6132H5.44245C5.74203 25.6228 6.02673 25.7462 6.23867 25.9582C6.45062 26.1703 6.5739 26.4551 6.58348 26.7548V30.8584C6.59305 31.1581 6.71634 31.443 6.92828 31.655C7.14023 31.8671 7.42492 31.9904 7.7245 32H18.2894C18.589 31.9904 18.8737 31.8671 19.0856 31.655C19.2976 31.443 19.4209 31.1581 19.4304 30.8584V26.7548C19.4401 26.4545 19.5638 26.1692 19.7765 25.957C19.9892 25.7449 20.2748 25.6219 20.5749 25.6132H24.659C24.9586 25.6036 25.2433 25.4803 25.4552 25.2682C25.6671 25.0562 25.7904 24.7713 25.8 24.4716V7.52839C25.7904 7.22865 25.6671 6.94381 25.4552 6.73176C25.2433 6.5197 24.9586 6.39635 24.659 6.38677H20.561C20.2603 6.37802 19.9742 6.25457 19.7614 6.04169C19.5487 5.82881 19.4253 5.54261 19.4165 5.24168V1.14161C19.4072 0.84419 19.2858 0.561291 19.0768 0.349589C18.8678 0.137887 18.5865 0.0130193 18.2894 0L7.7245 0C7.42492 0.00957792 7.14023 0.132929 6.92828 0.344983C6.71634 0.557036 6.59305 0.841878 6.58348 1.14161V5.24168C6.57477 5.54203 6.45187 5.82773 6.23983 6.04052C6.0278 6.25331 5.74262 6.37715 5.44245 6.38677H1.34103C1.04144 6.39635 0.756749 6.5197 0.544805 6.73176C0.332861 6.94381 0.209574 7.22865 0.200001 7.52839V24.4716C0.209574 24.7713 0.332861 25.0562 0.544805 25.2682C0.756749 25.4803 1.04144 25.6036 1.34103 25.6132ZM6.58348 24.4716V7.52839C6.59305 7.22865 6.71634 6.94381 6.92828 6.73176C7.14023 6.5197 7.42492 6.39635 7.7245 6.38677H18.2894C18.589 6.39635 18.8737 6.5197 19.0856 6.73176C19.2976 6.94381 19.4209 7.22865 19.4304 7.52839V24.4716C19.4209 24.7713 19.2976 25.0562 19.0856 25.2682C18.8737 25.4803 18.589 25.6036 18.2894 25.6132H7.7245C7.42492 25.6036 7.14023 25.4803 6.92828 25.2682C6.71634 25.0562 6.59305 24.7713 6.58348 24.4716Z",fill:"currentColor"})})}function mne({isOpen:e}){const{theme:t}=ms();return E.jsx(RI,{"data-chat-widget":!0,style:{fontSize:"16px",position:"fixed",zIndex:1e7,...bE({primary:t==null?void 0:t.primaryColor}),right:"20px",bottom:"20px"},className:Le("size-12 font-inter flex items-center justify-center"),children:E.jsx(Xf,{children:E.jsx("div",{className:Le("relative size-full rounded-full","flex items-center justify-center","transition-all","[background:radial-gradient(50%_50%_at_50%_100%,hsl(var(--opencx-primary-foreground))_-75%,hsl(var(--opencx-primary))_100%)]","text-primary-foreground","shadow-xl","active:scale-90","[&_svg]:size-6"),children:E.jsx(ir,{mode:"wait",children:e?E.jsx(vt,{snapExit:!0,fadeIn:"up",overrides:{initial:{rotate:45},animate:{rotate:0}},children:E.jsx(b_,{})},"x-icon"):E.jsx(vt,{snapExit:!0,overrides:{initial:{rotate:45},animate:{rotate:0}},children:E.jsx(hne,{})},"message-icon")})})})})}function gne(){return E.jsx(ir,{children:E.jsxs(vt,{className:"flex flex-row items-end w-full gap-1 animate-pulse",children:[E.jsx("div",{className:"flex items-center gap-1",children:E.jsx(Gl,{children:E.jsx(zp,{})})}),E.jsxs("div",{className:"flex items-center [&_span]:bg-secondary-foreground [&_span]:size-1 gap-1 p-2 rounded-xl bg-secondary border",children:[E.jsx(ss.span,{className:"rounded-full animate-bounce [animation-delay:-0.3s]"}),E.jsx(ss.span,{className:"rounded-full animate-bounce [animation-delay:-0.15s]"}),E.jsx(ss.span,{className:"rounded-full animate-bounce"})]})]})})}function yne(e){return E.jsx("div",{className:"w-full max-w-full overflow-auto shrink-0",children:E.jsx("pre",{dir:"auto",className:"text-xs leading-tight",children:JSON.stringify(e,null,1)})})}const vne=`<!DOCTYPE html>
449
+ `)},Xte=0,Gs=[];function Qte(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(Xte++)[0],a=v.useState(s1)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=of([e.lockRef.current],(e.shards||[]).map(TI),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(y,w){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var g=th(y),x=n.current,b="deltaX"in y?y.deltaX:x[0]-g[0],T="deltaY"in y?y.deltaY:x[1]-g[1],S,_=y.target,N=Math.abs(b)>Math.abs(T)?"h":"v";if("touches"in y&&N==="h"&&_.type==="range")return!1;var D=xI(N,_);if(!D)return!0;if(D?S=N:(S=N==="v"?"h":"v",D=xI(N,_)),!D)return!1;if(!r.current&&"changedTouches"in y&&(b||T)&&(r.current=S),!S)return!0;var V=r.current||S;return qte(V,w,y,V==="h"?b:T,!0)},[]),u=v.useCallback(function(y){var w=y;if(!(!Gs.length||Gs[Gs.length-1]!==a)){var g="deltaY"in w?EI(w):th(w),x=t.current.filter(function(S){return S.name===w.type&&(S.target===w.target||w.target===S.shadowParent)&&Gte(S.delta,g)})[0];if(x&&x.should){w.cancelable&&w.preventDefault();return}if(!x){var b=(o.current.shards||[]).map(TI).filter(Boolean).filter(function(S){return S.contains(w.target)}),T=b.length>0?s(w,b[0]):!o.current.noIsolation;T&&w.cancelable&&w.preventDefault()}}},[]),l=v.useCallback(function(y,w,g,x){var b={name:y,delta:w,target:g,should:x,shadowParent:Zte(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(T){return T!==b})},1)},[]),c=v.useCallback(function(y){n.current=th(y),r.current=void 0},[]),d=v.useCallback(function(y){l(y.type,EI(y),y.target,s(y,e.lockRef.current))},[]),f=v.useCallback(function(y){l(y.type,th(y),y.target,s(y,e.lockRef.current))},[]);v.useEffect(function(){return Gs.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,qs),document.addEventListener("touchmove",u,qs),document.addEventListener("touchstart",c,qs),function(){Gs=Gs.filter(function(y){return y!==a}),document.removeEventListener("wheel",u,qs),document.removeEventListener("touchmove",u,qs),document.removeEventListener("touchstart",c,qs)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:Kte(i)}):null,p?v.createElement(Ute,{gapMode:e.gapMode}):null)}function Zte(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jte=bk(gI,Qte);var _I=v.forwardRef(function(e,t){return v.createElement(Jp,Mt({},e,{ref:t,sideCar:Jte}))});_I.classNames=Jp.classNames;var Ov="Popover",[SI,mie]=ca(Ov,[zf]),fc=zf(),[ene,go]=SI(Ov),CI=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=fc(t),u=v.useRef(null),[l,c]=v.useState(!1),[d=!1,f]=$f({prop:r,defaultProp:i,onChange:a});return E.jsx(yA,{...s,children:E.jsx(ene,{scope:t,contentId:yl(),triggerRef:u,open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:l,onCustomAnchorAdd:v.useCallback(()=>c(!0),[]),onCustomAnchorRemove:v.useCallback(()=>c(!1),[]),modal:o,children:n})})};CI.displayName=Ov;var AI="PopoverAnchor",tne=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=go(AI,n),a=fc(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return v.useEffect(()=>(o(),()=>s()),[o,s]),E.jsx(Vy,{...a,...r,ref:t})});tne.displayName=AI;var kI="PopoverTrigger",RI=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=go(kI,n),a=fc(n),o=$r(t,i.triggerRef),s=E.jsx(zn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":OI(i.open),...r,ref:o,onClick:Sn(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:E.jsx(Vy,{asChild:!0,...a,children:s})});RI.displayName=kI;var nne="PopoverPortal",[gie,rne]=SI(nne,{forceMount:void 0}),Ks="PopoverContent",NI=v.forwardRef((e,t)=>{const n=rne(Ks,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=go(Ks,e.__scopePopover);return E.jsx($y,{present:r||a.open,children:a.modal?E.jsx(ine,{...i,ref:t}):E.jsx(ane,{...i,ref:t})})});NI.displayName=Ks;var ine=v.forwardRef((e,t)=>{const n=go(Ks,e.__scopePopover),r=v.useRef(null),i=$r(t,r),a=v.useRef(!1);return v.useEffect(()=>{const o=r.current;if(o)return yk(o)},[]),E.jsx(_I,{as:If,allowPinchZoom:!0,children:E.jsx(PI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sn(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Sn(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0,l=s.button===2||u;a.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Sn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),ane=v.forwardRef((e,t)=>{const n=go(Ks,e.__scopePopover),r=v.useRef(!1),i=v.useRef(!1);return E.jsx(PI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((l=n.triggerRef.current)==null?void 0:l.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),PI=v.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:c,...d}=e,f=go(Ks,n),p=fc(n);return WA(),E.jsx(cI,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:E.jsx(ky,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:E.jsx(vA,{"data-state":OI(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),II="PopoverClose",one=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=go(II,n);return E.jsx(zn.button,{type:"button",...r,ref:t,onClick:Sn(e.onClick,()=>i.onOpenChange(!1))})});one.displayName=II;var sne="PopoverArrow",une=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=fc(n);return E.jsx(xA,{...i,...r,ref:t})});une.displayName=sne;function OI(e){return e?"open":"closed"}var lne=CI,cne=NI;function Dv(){return Dv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dv.apply(null,arguments)}function dne(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var DI,LI;typeof document<"u"&&(DI=document),typeof window<"u"&&(LI=window);var fne=yn.createContext({document:DI,window:LI}),pne=["children","head","initialContent","src","mountTarget"],MI=v.forwardRef((e,t)=>{var{children:n,head:r,initialContent:i,src:a,mountTarget:o}=e,s=dne(e,pne),[u,l]=v.useState(!1),[c,d]=v.useState(),f=T=>{T&&d(T)};v.useImperativeHandle(t,()=>c,[c]);var p=i||"<!DOCTYPE html><html><head></head><body></body></html>",m=()=>c?c.contentDocument:null,y=()=>{var T=m();return o?T==null?void 0:T.querySelector(o):T==null?void 0:T.body},w=v.useRef(),g=v.useCallback(T=>{w.current=T;var S=()=>setInterval(()=>g(T),500);clearInterval(S()),u||l(!0)},[u]);v.useMemo(()=>{!a&&s.onLoad&&u&&s.onLoad(w.current)},[u]),v.useEffect(()=>{if(c&&!a){var T;(T=c.contentWindow)==null||T.addEventListener("DOMContentLoaded",g)}return()=>{if(c&&!a){var S;(S=c.contentWindow)==null||S.removeEventListener("DOMContentLoaded",g)}}},[c,g]);var x=()=>{var T,S=m(),_=(T=m())==null?void 0:T.head,N=y(),D=(S==null?void 0:S.defaultView)||(S==null?void 0:S.parentView),V=E.jsx(fne.Provider,{value:{document:S,window:D},children:n});return[_&&r&&Qo.createPortal(r,_),c&&N&&Qo.createPortal(V,N)]},b={};return a?(delete b.srcDoc,b.src=a,b.onLoad=s.onLoad):b.srcDoc=p,E.jsx("iframe",Dv({title:s.title,ref:f},s,{onLoad:g},b,{children:u&&x()}))});MI.displayName="IFrame";const FI='@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..700;1,14..32,100..700&display=swap";@import"https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap";[data-chat-widget] *,[data-chat-widget] :before,[data-chat-widget] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-chat-widget] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-chat-widget] *,[data-chat-widget] :before,[data-chat-widget] :after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}[data-chat-widget] :before,[data-chat-widget] :after{--tw-content: ""}[data-chat-widget] html,[data-chat-widget] :host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}[data-chat-widget] body{margin:0;line-height:inherit}[data-chat-widget] hr{height:0;color:inherit;border-top-width:1px}[data-chat-widget] abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}[data-chat-widget] h1,[data-chat-widget] h2,[data-chat-widget] h3,[data-chat-widget] h4,[data-chat-widget] h5,[data-chat-widget] h6{font-size:inherit;font-weight:inherit}[data-chat-widget] a{color:inherit;text-decoration:inherit}[data-chat-widget] b,[data-chat-widget] strong{font-weight:bolder}[data-chat-widget] code,[data-chat-widget] kbd,[data-chat-widget] samp,[data-chat-widget] pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}[data-chat-widget] small{font-size:80%}[data-chat-widget] sub,[data-chat-widget] sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}[data-chat-widget] sub{bottom:-.25em}[data-chat-widget] sup{top:-.5em}[data-chat-widget] table{text-indent:0;border-color:inherit;border-collapse:collapse}[data-chat-widget] button,[data-chat-widget] input,[data-chat-widget] optgroup,[data-chat-widget] select,[data-chat-widget] textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}[data-chat-widget] button,[data-chat-widget] select{text-transform:none}[data-chat-widget] button,[data-chat-widget] input:where([type=button]),[data-chat-widget] input:where([type=reset]),[data-chat-widget] input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}[data-chat-widget] :-moz-focusring{outline:auto}[data-chat-widget] :-moz-ui-invalid{box-shadow:none}[data-chat-widget] progress{vertical-align:baseline}[data-chat-widget] ::-webkit-inner-spin-button,[data-chat-widget] ::-webkit-outer-spin-button{height:auto}[data-chat-widget] [type=search]{-webkit-appearance:textfield;outline-offset:-2px}[data-chat-widget] ::-webkit-search-decoration{-webkit-appearance:none}[data-chat-widget] ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}[data-chat-widget] summary{display:list-item}[data-chat-widget] blockquote,[data-chat-widget] dl,[data-chat-widget] dd,[data-chat-widget] h1,[data-chat-widget] h2,[data-chat-widget] h3,[data-chat-widget] h4,[data-chat-widget] h5,[data-chat-widget] h6,[data-chat-widget] hr,[data-chat-widget] figure,[data-chat-widget] p,[data-chat-widget] pre{margin:0}[data-chat-widget] fieldset{margin:0;padding:0}[data-chat-widget] legend{padding:0}[data-chat-widget] ol,[data-chat-widget] ul,[data-chat-widget] menu{list-style:none;margin:0;padding:0}[data-chat-widget] dialog{padding:0}[data-chat-widget] textarea{resize:vertical}[data-chat-widget] input::-moz-placeholder,[data-chat-widget] textarea::-moz-placeholder{opacity:1;color:#9ca3af}[data-chat-widget] input::placeholder,[data-chat-widget] textarea::placeholder{opacity:1;color:#9ca3af}[data-chat-widget] button,[data-chat-widget] [role=button]{cursor:pointer}[data-chat-widget] :disabled{cursor:default}[data-chat-widget] img,[data-chat-widget] svg,[data-chat-widget] video,[data-chat-widget] canvas,[data-chat-widget] audio,[data-chat-widget] iframe,[data-chat-widget] embed,[data-chat-widget] object{display:block;vertical-align:middle}[data-chat-widget] img,[data-chat-widget] video{max-width:100%;height:auto}[data-chat-widget] [hidden]:where(:not([hidden=until-found])){display:none}[data-chat-widget] *{-ms-overflow-style:none;scrollbar-width:none}[data-chat-widget] *::-webkit-scrollbar{display:none}[data-chat-widget] *{border-color:hsl(var(--opencx-border))}[data-chat-widget] .container{width:100%}@media (min-width: 640px){[data-chat-widget] .container{max-width:640px}}@media (min-width: 768px){[data-chat-widget] .container{max-width:768px}}@media (min-width: 1024px){[data-chat-widget] .container{max-width:1024px}}@media (min-width: 1280px){[data-chat-widget] .container{max-width:1280px}}@media (min-width: 1536px){[data-chat-widget] .container{max-width:1536px}}[data-chat-widget] .prose{color:var(--tw-prose-body);max-width:65ch}[data-chat-widget] .prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}[data-chat-widget] .prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}[data-chat-widget] .prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}[data-chat-widget] .prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}[data-chat-widget] .prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}[data-chat-widget] .prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}[data-chat-widget] .prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}[data-chat-widget] .prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}[data-chat-widget] .prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}[data-chat-widget] .prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}[data-chat-widget] .prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}[data-chat-widget] .prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}[data-chat-widget] .prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}[data-chat-widget] .prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}[data-chat-widget] .prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}[data-chat-widget] .prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}[data-chat-widget] .prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}[data-chat-widget] .prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}[data-chat-widget] .prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}[data-chat-widget] .prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em}[data-chat-widget] .prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}[data-chat-widget] .prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}[data-chat-widget] .prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}[data-chat-widget] .prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}[data-chat-widget] .prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}[data-chat-widget] .prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}[data-chat-widget] .prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}[data-chat-widget] .prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}[data-chat-widget] .prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}[data-chat-widget] .prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}[data-chat-widget] .prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}[data-chat-widget] .prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}[data-chat-widget] .prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}[data-chat-widget] .prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}[data-chat-widget] .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}[data-chat-widget] .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}[data-chat-widget] .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}[data-chat-widget] .prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}[data-chat-widget] .prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}[data-chat-widget] .prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}[data-chat-widget] .prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-inline-start:1.1428571em}[data-chat-widget] .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}[data-chat-widget] .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}[data-chat-widget] .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}[data-chat-widget] .prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}[data-chat-widget] .prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}[data-chat-widget] .prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}[data-chat-widget] .prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}[data-chat-widget] .prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}[data-chat-widget] .prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}[data-chat-widget] .prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}[data-chat-widget] .prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}[data-chat-widget] .prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}[data-chat-widget] .prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}[data-chat-widget] .prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}[data-chat-widget] .prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}[data-chat-widget] .prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}[data-chat-widget] .prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}[data-chat-widget] .prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}[data-chat-widget] .prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}[data-chat-widget] .prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}[data-chat-widget] .prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}[data-chat-widget] .prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}[data-chat-widget] .prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}[data-chat-widget] .prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}[data-chat-widget] .prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}[data-chat-widget] .prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}[data-chat-widget] .prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}[data-chat-widget] .prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}[data-chat-widget] .prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}[data-chat-widget] .prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}[data-chat-widget] .prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}[data-chat-widget] .prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}[data-chat-widget] .prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}[data-chat-widget] .prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}[data-chat-widget] .prose-sm{font-size:.875rem;line-height:1.7142857}[data-chat-widget] .prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}[data-chat-widget] .prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}[data-chat-widget] .prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-inline-start:1.1111111em}[data-chat-widget] .prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}[data-chat-widget] .prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}[data-chat-widget] .prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}[data-chat-widget] .prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}[data-chat-widget] .prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}[data-chat-widget] .prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}[data-chat-widget] .prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}[data-chat-widget] .prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}[data-chat-widget] .prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding-top:.1428571em;padding-inline-end:.3571429em;padding-bottom:.1428571em;padding-inline-start:.3571429em}[data-chat-widget] .prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}[data-chat-widget] .prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}[data-chat-widget] .prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}[data-chat-widget] .prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}[data-chat-widget] .prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}[data-chat-widget] .prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}[data-chat-widget] .prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}[data-chat-widget] .prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}[data-chat-widget] .prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}[data-chat-widget] .prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}[data-chat-widget] .prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}[data-chat-widget] .prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}[data-chat-widget] .prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}[data-chat-widget] .prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}[data-chat-widget] .prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}[data-chat-widget] .prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}[data-chat-widget] .prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}[data-chat-widget] .prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-inline-start:1.5714286em}[data-chat-widget] .prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}[data-chat-widget] .prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}[data-chat-widget] .prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}[data-chat-widget] .prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}[data-chat-widget] .prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}[data-chat-widget] .prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}[data-chat-widget] .prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}[data-chat-widget] .prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}[data-chat-widget] .prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}[data-chat-widget] .prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}[data-chat-widget] .prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}[data-chat-widget] .prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}[data-chat-widget] .prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}[data-chat-widget] .pointer-events-none{pointer-events:none}[data-chat-widget] .visible{visibility:visible}[data-chat-widget] .fixed{position:fixed}[data-chat-widget] .absolute{position:absolute}[data-chat-widget] .relative{position:relative}[data-chat-widget] .sticky{position:sticky}[data-chat-widget] .inset-0{top:0;right:0;bottom:0;left:0}[data-chat-widget] .bottom-0{bottom:0}[data-chat-widget] .left-2{left:.5rem}[data-chat-widget] .isolate{isolation:isolate}[data-chat-widget] .z-10{z-index:10}[data-chat-widget] .z-50{z-index:50}[data-chat-widget] .-mx-1{margin-left:-.25rem;margin-right:-.25rem}[data-chat-widget] .my-1{margin-top:.25rem;margin-bottom:.25rem}[data-chat-widget] .mb-2{margin-bottom:.5rem}[data-chat-widget] .ml-auto{margin-left:auto}[data-chat-widget] .mt-2{margin-top:.5rem}[data-chat-widget] .mt-auto{margin-top:auto}[data-chat-widget] .line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}[data-chat-widget] .line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}[data-chat-widget] .block{display:block}[data-chat-widget] .inline{display:inline}[data-chat-widget] .flex{display:flex}[data-chat-widget] .inline-flex{display:inline-flex}[data-chat-widget] .contents{display:contents}[data-chat-widget] .hidden{display:none}[data-chat-widget] .aspect-square{aspect-ratio:1 / 1}[data-chat-widget] .size-10{width:2.5rem;height:2.5rem}[data-chat-widget] .size-12{width:3rem;height:3rem}[data-chat-widget] .size-16{width:4rem;height:4rem}[data-chat-widget] .size-3{width:.75rem;height:.75rem}[data-chat-widget] .size-3\\.5{width:.875rem;height:.875rem}[data-chat-widget] .size-4{width:1rem;height:1rem}[data-chat-widget] .size-6{width:1.5rem;height:1.5rem}[data-chat-widget] .size-8{width:2rem;height:2rem}[data-chat-widget] .size-fit{width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}[data-chat-widget] .size-full{width:100%;height:100%}[data-chat-widget] .h-10{height:2.5rem}[data-chat-widget] .h-2{height:.5rem}[data-chat-widget] .h-3\\.5{height:.875rem}[data-chat-widget] .h-4{height:1rem}[data-chat-widget] .h-5{height:1.25rem}[data-chat-widget] .h-8{height:2rem}[data-chat-widget] .h-\\[600px\\]{height:600px}[data-chat-widget] .h-fit{height:-moz-fit-content;height:fit-content}[data-chat-widget] .h-full{height:100%}[data-chat-widget] .h-px{height:1px}[data-chat-widget] .max-h-\\[600px\\]{max-height:600px}[data-chat-widget] .max-h-full{max-height:100%}[data-chat-widget] .min-h-12{min-height:3rem}[data-chat-widget] .min-h-\\[400px\\]{min-height:400px}[data-chat-widget] .w-1\\/2{width:50%}[data-chat-widget] .w-10{width:2.5rem}[data-chat-widget] .w-2{width:.5rem}[data-chat-widget] .w-3\\.5{width:.875rem}[data-chat-widget] .w-4{width:1rem}[data-chat-widget] .w-60{width:15rem}[data-chat-widget] .w-9{width:2.25rem}[data-chat-widget] .w-auto{width:auto}[data-chat-widget] .w-fit{width:-moz-fit-content;width:fit-content}[data-chat-widget] .w-full{width:100%}[data-chat-widget] .min-w-56{min-width:14rem}[data-chat-widget] .min-w-\\[8rem\\]{min-width:8rem}[data-chat-widget] .max-w-\\[320px\\]{max-width:320px}[data-chat-widget] .max-w-full{max-width:100%}[data-chat-widget] .max-w-xs{max-width:20rem}[data-chat-widget] .flex-1{flex:1 1 0%}[data-chat-widget] .shrink-0{flex-shrink:0}[data-chat-widget] .translate-x-\\[var\\(--opencx-wobble-x\\)\\]{--tw-translate-x: var(--opencx-wobble-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .translate-y-\\[var\\(--opencx-wobble-y\\)\\]{--tw-translate-y: var(--opencx-wobble-y);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .scale-\\[1\\.01\\]{--tw-scale-x: 1.01;--tw-scale-y: 1.01;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .scale-\\[1\\.02\\]{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .scale-\\[1\\.1\\]{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .scale-\\[1\\]{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-chat-widget] .animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}[data-chat-widget] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}[data-chat-widget] .animate-spin{animation:spin 1s linear infinite}[data-chat-widget] .cursor-default{cursor:default}[data-chat-widget] .cursor-not-allowed{cursor:not-allowed}[data-chat-widget] .cursor-pointer{cursor:pointer}[data-chat-widget] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-chat-widget] .resize-none{resize:none}[data-chat-widget] .flex-row{flex-direction:row}[data-chat-widget] .flex-col{flex-direction:column}[data-chat-widget] .flex-wrap{flex-wrap:wrap}[data-chat-widget] .items-start{align-items:flex-start}[data-chat-widget] .items-end{align-items:flex-end}[data-chat-widget] .items-center{align-items:center}[data-chat-widget] .justify-start{justify-content:flex-start}[data-chat-widget] .justify-end{justify-content:flex-end}[data-chat-widget] .justify-center{justify-content:center}[data-chat-widget] .justify-between{justify-content:space-between}[data-chat-widget] .gap-0\\.5{gap:.125rem}[data-chat-widget] .gap-1{gap:.25rem}[data-chat-widget] .gap-2{gap:.5rem}[data-chat-widget] .space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}[data-chat-widget] .space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}[data-chat-widget] .space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}[data-chat-widget] .overflow-auto{overflow:auto}[data-chat-widget] .overflow-hidden{overflow:hidden}[data-chat-widget] .overflow-scroll{overflow:scroll}[data-chat-widget] .scroll-smooth{scroll-behavior:smooth}[data-chat-widget] .text-ellipsis{text-overflow:ellipsis}[data-chat-widget] .whitespace-normal{white-space:normal}[data-chat-widget] .whitespace-nowrap{white-space:nowrap}[data-chat-widget] .rounded-2xl{border-radius:1rem}[data-chat-widget] .rounded-3xl{border-radius:1.5rem}[data-chat-widget] .rounded-full{border-radius:9999px}[data-chat-widget] .rounded-lg{border-radius:.5rem}[data-chat-widget] .rounded-md{border-radius:.375rem}[data-chat-widget] .rounded-sm{border-radius:.125rem}[data-chat-widget] .rounded-xl{border-radius:.75rem}[data-chat-widget] .rounded-t-3xl{border-top-left-radius:1.5rem;border-top-right-radius:1.5rem}[data-chat-widget] .border{border-width:1px}[data-chat-widget] .border-2{border-width:2px}[data-chat-widget] .border-b{border-bottom-width:1px}[data-chat-widget] .border-destructive{border-color:hsl(var(--opencx-destructive))}[data-chat-widget] .border-input{border-color:hsl(var(--opencx-input))}[data-chat-widget] .border-muted{border-color:hsl(var(--opencx-muted))}[data-chat-widget] .border-primary{border-color:hsl(var(--opencx-primary))}[data-chat-widget] .border-transparent{border-color:transparent}[data-chat-widget] .bg-background{background-color:hsl(var(--opencx-background))}[data-chat-widget] .bg-black\\/50{background-color:#00000080}[data-chat-widget] .bg-destructive{background-color:hsl(var(--opencx-destructive))}[data-chat-widget] .bg-muted{background-color:hsl(var(--opencx-muted))}[data-chat-widget] .bg-primary{background-color:hsl(var(--opencx-primary))}[data-chat-widget] .bg-secondary{background-color:hsl(var(--opencx-secondary))}[data-chat-widget] .bg-transparent{background-color:transparent}[data-chat-widget] .bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}[data-chat-widget] .from-primary\\/50{--tw-gradient-from: hsl(var(--opencx-primary) / .5) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--opencx-primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}[data-chat-widget] .via-primary{--tw-gradient-to: hsl(var(--opencx-primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--opencx-primary)) var(--tw-gradient-via-position), var(--tw-gradient-to)}[data-chat-widget] .to-primary{--tw-gradient-to: hsl(var(--opencx-primary)) var(--tw-gradient-to-position)}[data-chat-widget] .fill-current{fill:currentColor}[data-chat-widget] .object-contain{-o-object-fit:contain;object-fit:contain}[data-chat-widget] .object-cover{-o-object-fit:cover;object-fit:cover}[data-chat-widget] .p-0{padding:0}[data-chat-widget] .p-1{padding:.25rem}[data-chat-widget] .p-2{padding:.5rem}[data-chat-widget] .p-4{padding:1rem}[data-chat-widget] .px-2{padding-left:.5rem;padding-right:.5rem}[data-chat-widget] .px-3{padding-left:.75rem;padding-right:.75rem}[data-chat-widget] .px-4{padding-left:1rem;padding-right:1rem}[data-chat-widget] .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}[data-chat-widget] .py-12{padding-top:3rem;padding-bottom:3rem}[data-chat-widget] .py-2{padding-top:.5rem;padding-bottom:.5rem}[data-chat-widget] .pb-0{padding-bottom:0}[data-chat-widget] .pl-2{padding-left:.5rem}[data-chat-widget] .pl-3{padding-left:.75rem}[data-chat-widget] .pl-8{padding-left:2rem}[data-chat-widget] .pr-2{padding-right:.5rem}[data-chat-widget] .text-center{text-align:center}[data-chat-widget] .text-start{text-align:start}[data-chat-widget] .align-middle{vertical-align:middle}[data-chat-widget] .font-inter{font-family:Inter,Rubik,serif,sans-serif}[data-chat-widget] .text-2xl{font-size:1.5rem;line-height:2rem}[data-chat-widget] .text-sm{font-size:.875rem;line-height:1.25rem}[data-chat-widget] .text-xl{font-size:1.25rem;line-height:1.75rem}[data-chat-widget] .text-xs{font-size:.75rem;line-height:1rem}[data-chat-widget] .font-bold{font-weight:700}[data-chat-widget] .font-medium{font-weight:500}[data-chat-widget] .font-semibold{font-weight:600}[data-chat-widget] .leading-relaxed{line-height:1.625}[data-chat-widget] .leading-snug{line-height:1.375}[data-chat-widget] .leading-tight{line-height:1.25}[data-chat-widget] .tracking-widest{letter-spacing:.1em}[data-chat-widget] .text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}[data-chat-widget] .text-destructive{color:hsl(var(--opencx-destructive))}[data-chat-widget] .text-destructive-foreground{color:hsl(var(--opencx-destructive-foreground))}[data-chat-widget] .text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}[data-chat-widget] .text-foreground{color:hsl(var(--opencx-foreground))}[data-chat-widget] .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}[data-chat-widget] .text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}[data-chat-widget] .text-muted-foreground{color:hsl(var(--opencx-muted-foreground))}[data-chat-widget] .text-primary{color:hsl(var(--opencx-primary))}[data-chat-widget] .text-primary-foreground{color:hsl(var(--opencx-primary-foreground))}[data-chat-widget] .text-primary-foreground\\/90{color:hsl(var(--opencx-primary-foreground) / .9)}[data-chat-widget] .text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}[data-chat-widget] .text-secondary-foreground{color:hsl(var(--opencx-secondary-foreground))}[data-chat-widget] .underline{text-decoration-line:underline}[data-chat-widget] .underline-offset-4{text-underline-offset:4px}[data-chat-widget] .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[data-chat-widget] .opacity-0{opacity:0}[data-chat-widget] .opacity-50{opacity:.5}[data-chat-widget] .opacity-60{opacity:.6}[data-chat-widget] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-chat-widget] .outline{outline-style:solid}[data-chat-widget] .outline-8{outline-width:8px}[data-chat-widget] .outline-background{outline-color:hsl(var(--opencx-background))}[data-chat-widget] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-chat-widget] .ring-offset-background{--tw-ring-offset-color: hsl(var(--opencx-background))}[data-chat-widget] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-chat-widget] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-chat-widget] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-chat-widget] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-chat-widget] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-chat-widget] .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}[data-chat-widget] .animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}[data-chat-widget] .fade-in-0{--tw-enter-opacity: 0}[data-chat-widget] .zoom-in-95{--tw-enter-scale: .95}[data-chat-widget] .ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}[data-chat-widget] .\\[animation-delay\\:-0\\.15s\\]{animation-delay:-.15s}[data-chat-widget] .\\[animation-delay\\:-0\\.3s\\]{animation-delay:-.3s}[data-chat-widget] .\\[background\\:radial-gradient\\(50\\%_50\\%_at_50\\%_100\\%\\,hsl\\(var\\(--opencx-primary-foreground\\)\\)_-75\\%\\,hsl\\(var\\(--opencx-primary\\)\\)_100\\%\\)\\]{background:radial-gradient(50% 50% at 50% 100%,hsl(var(--opencx-primary-foreground)) -75%,hsl(var(--opencx-primary)))}[data-chat-widget] .required:after{content:" *";color:red}[data-chat-widget] .file\\:border-0::file-selector-button{border-width:0px}[data-chat-widget] .file\\:bg-transparent::file-selector-button{background-color:transparent}[data-chat-widget] .file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}[data-chat-widget] .file\\:font-medium::file-selector-button{font-weight:500}[data-chat-widget] .file\\:text-primary-foreground::file-selector-button{color:hsl(var(--opencx-primary-foreground))}[data-chat-widget] .placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--opencx-muted-foreground))}[data-chat-widget] .placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--opencx-muted-foreground))}[data-chat-widget] .hover\\:bg-accent:hover{background-color:hsl(var(--opencx-accent))}[data-chat-widget] .hover\\:bg-green-50\\/50:hover{background-color:#f0fdf480}[data-chat-widget] .hover\\:bg-red-50\\/50:hover{background-color:#fef2f280}[data-chat-widget] .hover\\:text-accent-foreground:hover{color:hsl(var(--opencx-accent-foreground))}[data-chat-widget] .hover\\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}[data-chat-widget] .hover\\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}[data-chat-widget] .hover\\:text-primary:hover{color:hsl(var(--opencx-primary))}[data-chat-widget] .hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}[data-chat-widget] .hover\\:underline:hover{text-decoration-line:underline}[data-chat-widget] .focus\\:bg-accent:focus{background-color:hsl(var(--opencx-accent))}[data-chat-widget] .focus\\:text-accent-foreground:focus{color:hsl(var(--opencx-accent-foreground))}[data-chat-widget] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-chat-widget] .focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-chat-widget] .focus-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--opencx-ring))}[data-chat-widget] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-chat-widget] .focus-visible\\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--opencx-background))}[data-chat-widget] .active\\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .active\\:shadow-none:active{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-chat-widget] .hover\\:active\\:scale-95:active:hover{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .disabled\\:pointer-events-none:disabled{pointer-events:none}[data-chat-widget] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-chat-widget] .disabled\\:opacity-0:disabled{opacity:0}[data-chat-widget] .disabled\\:opacity-50:disabled{opacity:.5}[data-chat-widget] .group:hover .group-hover\\:opacity-100{opacity:1}[data-chat-widget] .group:hover .group-hover\\:active\\:scale-90:active,[data-chat-widget] .group:active .group-active\\:scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}[data-chat-widget] .data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .data-\\[state\\=checked\\]\\:bg-primary[data-state=checked]{background-color:hsl(var(--opencx-primary))}[data-chat-widget] .data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--opencx-accent))}[data-chat-widget] .data-\\[state\\=unchecked\\]\\:bg-input[data-state=unchecked]{background-color:hsl(var(--opencx-input))}[data-chat-widget] .data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}[data-chat-widget] .data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}[data-chat-widget] .data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}[data-chat-widget] .data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}[data-chat-widget] .data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}[data-chat-widget] .data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}[data-chat-widget] .data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}[data-chat-widget] .data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}[data-chat-widget] .data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}[data-chat-widget] .data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}[data-chat-widget] .data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}[data-chat-widget] .prose-a\\:underline :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){text-decoration-line:underline}[data-chat-widget] .prose-a\\:decoration-primary :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){text-decoration-color:hsl(var(--opencx-primary))}[data-chat-widget] .rtl\\:-scale-100:where([dir=rtl],[dir=rtl] *){--tw-scale-x: -1;--tw-scale-y: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-chat-widget] .rtl\\:flex-row-reverse:where([dir=rtl],[dir=rtl] *){flex-direction:row-reverse}[data-chat-widget] .rtl\\:text-right:where([dir=rtl],[dir=rtl] *){text-align:right}[data-chat-widget] .rtl\\:placeholder\\:text-right:where([dir=rtl],[dir=rtl] *)::-moz-placeholder{text-align:right}[data-chat-widget] .rtl\\:placeholder\\:text-right:where([dir=rtl],[dir=rtl] *)::placeholder{text-align:right}[data-chat-widget] .\\[\\&_span\\]\\:size-1 span{width:.25rem;height:.25rem}[data-chat-widget] .\\[\\&_span\\]\\:bg-secondary-foreground span{background-color:hsl(var(--opencx-secondary-foreground))}[data-chat-widget] .\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}[data-chat-widget] .\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}[data-chat-widget] .\\[\\&_svg\\]\\:size-6 svg{width:1.5rem;height:1.5rem}[data-chat-widget] .\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}';function hne({className:e}){return E.jsx("svg",{width:"26",height:"32",viewBox:"0 0 26 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:Le("text-primary-foreground",e),children:E.jsx("path",{d:"M1.34103 25.6132H5.44245C5.74203 25.6228 6.02673 25.7462 6.23867 25.9582C6.45062 26.1703 6.5739 26.4551 6.58348 26.7548V30.8584C6.59305 31.1581 6.71634 31.443 6.92828 31.655C7.14023 31.8671 7.42492 31.9904 7.7245 32H18.2894C18.589 31.9904 18.8737 31.8671 19.0856 31.655C19.2976 31.443 19.4209 31.1581 19.4304 30.8584V26.7548C19.4401 26.4545 19.5638 26.1692 19.7765 25.957C19.9892 25.7449 20.2748 25.6219 20.5749 25.6132H24.659C24.9586 25.6036 25.2433 25.4803 25.4552 25.2682C25.6671 25.0562 25.7904 24.7713 25.8 24.4716V7.52839C25.7904 7.22865 25.6671 6.94381 25.4552 6.73176C25.2433 6.5197 24.9586 6.39635 24.659 6.38677H20.561C20.2603 6.37802 19.9742 6.25457 19.7614 6.04169C19.5487 5.82881 19.4253 5.54261 19.4165 5.24168V1.14161C19.4072 0.84419 19.2858 0.561291 19.0768 0.349589C18.8678 0.137887 18.5865 0.0130193 18.2894 0L7.7245 0C7.42492 0.00957792 7.14023 0.132929 6.92828 0.344983C6.71634 0.557036 6.59305 0.841878 6.58348 1.14161V5.24168C6.57477 5.54203 6.45187 5.82773 6.23983 6.04052C6.0278 6.25331 5.74262 6.37715 5.44245 6.38677H1.34103C1.04144 6.39635 0.756749 6.5197 0.544805 6.73176C0.332861 6.94381 0.209574 7.22865 0.200001 7.52839V24.4716C0.209574 24.7713 0.332861 25.0562 0.544805 25.2682C0.756749 25.4803 1.04144 25.6036 1.34103 25.6132ZM6.58348 24.4716V7.52839C6.59305 7.22865 6.71634 6.94381 6.92828 6.73176C7.14023 6.5197 7.42492 6.39635 7.7245 6.38677H18.2894C18.589 6.39635 18.8737 6.5197 19.0856 6.73176C19.2976 6.94381 19.4209 7.22865 19.4304 7.52839V24.4716C19.4209 24.7713 19.2976 25.0562 19.0856 25.2682C18.8737 25.4803 18.589 25.6036 18.2894 25.6132H7.7245C7.42492 25.6036 7.14023 25.4803 6.92828 25.2682C6.71634 25.0562 6.59305 24.7713 6.58348 24.4716Z",fill:"currentColor"})})}function mne({isOpen:e}){const{theme:t}=ms();return E.jsx(RI,{"data-chat-widget":!0,style:{fontSize:"16px",position:"fixed",zIndex:1e7,...bE({primary:t==null?void 0:t.primaryColor}),right:"20px",bottom:"20px"},className:Le("size-12 font-inter flex items-center justify-center"),children:E.jsx(Xf,{children:E.jsx("div",{className:Le("relative size-full rounded-full","flex items-center justify-center","transition-all","[background:radial-gradient(50%_50%_at_50%_100%,hsl(var(--opencx-primary-foreground))_-75%,hsl(var(--opencx-primary))_100%)]","text-primary-foreground","shadow-xl","active:scale-90","[&_svg]:size-6"),children:E.jsx(ir,{mode:"wait",children:e?E.jsx(vt,{snapExit:!0,fadeIn:"up",overrides:{initial:{rotate:45},animate:{rotate:0}},children:E.jsx(b2,{})},"x-icon"):E.jsx(vt,{snapExit:!0,overrides:{initial:{rotate:45},animate:{rotate:0}},children:E.jsx(hne,{})},"message-icon")})})})})}function gne(){return E.jsx(ir,{children:E.jsxs(vt,{className:"flex flex-row items-end w-full gap-1 animate-pulse",children:[E.jsx("div",{className:"flex items-center gap-1",children:E.jsx(Gl,{children:E.jsx(zp,{})})}),E.jsxs("div",{className:"flex items-center [&_span]:bg-secondary-foreground [&_span]:size-1 gap-1 p-2 rounded-xl bg-secondary border",children:[E.jsx(ss.span,{className:"rounded-full animate-bounce [animation-delay:-0.3s]"}),E.jsx(ss.span,{className:"rounded-full animate-bounce [animation-delay:-0.15s]"}),E.jsx(ss.span,{className:"rounded-full animate-bounce"})]})]})})}function yne(e){return E.jsx("div",{className:"w-full max-w-full overflow-auto shrink-0",children:E.jsx("pre",{dir:"auto",className:"text-xs leading-tight",children:JSON.stringify(e,null,1)})})}const vne=`<!DOCTYPE html>
450
450
  <html>
451
451
  <head>
452
452
  <style>