@careshiphealth/widget 2.2.7-ela → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/widget.iife.js +2 -2
- package/package.json +1 -1
package/dist/widget.iife.js
CHANGED
|
@@ -53,7 +53,7 @@ Error generating stack: `+L.message+`
|
|
|
53
53
|
`+L.stack}return Object.defineProperty(b,"componentStack",{value:F}),F}}),b}function Ln(h,b,y){if(h=h.onError,b=h(b,y),b==null||typeof b=="string")return b}function ec(h,b){var y=h.onShellError,k=h.onFatalError;y(b),k(b),h.destination!==null?(h.status=14,kA(h.destination,b)):(h.status=13,h.fatalError=b)}function zs(h,b){Wf(h,b.next,b.hoistables)}function Wf(h,b,y){for(;b!==null;){y!==null&&(Ac(b.hoistables,y),b.inheritedHoistables=y);var k=b.boundaries;if(k!==null){b.boundaries=null;for(var F=0;F<k.length;F++){var L=k[F];y!==null&&Ac(L.contentState,y),yr(h,L,null,null)}}if(b.pendingTasks--,0<b.pendingTasks)break;y=b.hoistables,b=b.next}}function Mg(h,b){var y=b.boundaries;if(y!==null&&b.pendingTasks===y.length){for(var k=!0,F=0;F<y.length;F++){var L=y[F];if(L.pendingTasks!==1||L.parentFlushed||Rr(h,L)){k=!1;break}}k&&Wf(h,b,b.hoistables)}}function rn(h){var b={pendingTasks:1,boundaries:null,hoistables:Xi(),inheritedHoistables:null,together:!1,next:null};return h!==null&&0<h.pendingTasks&&(b.pendingTasks++,b.boundaries=[],h.next=b),b}function Eu(h,b,y,k,F){var L=b.keyPath,K=b.treeContext,cA=b.row;b.keyPath=y,y=k.length;var sA=null;if(b.replay!==null){var gA=b.replay.slots;if(gA!==null&&typeof gA=="object")for(var bA=0;bA<y;bA++){var pA=F!=="backwards"&&F!=="unstable_legacy-backwards"?bA:y-1-bA,XA=k[pA];b.row=sA=rn(sA),b.treeContext=tA(K,y,pA);var OA=gA[pA];typeof OA=="number"?(Wr(h,b,OA,XA,pA),delete gA[pA]):pn(h,b,XA,pA),--sA.pendingTasks===0&&zs(h,sA)}else for(gA=0;gA<y;gA++)bA=F!=="backwards"&&F!=="unstable_legacy-backwards"?gA:y-1-gA,pA=k[bA],b.row=sA=rn(sA),b.treeContext=tA(K,y,bA),pn(h,b,pA,bA),--sA.pendingTasks===0&&zs(h,sA)}else if(F!=="backwards"&&F!=="unstable_legacy-backwards")for(F=0;F<y;F++)gA=k[F],b.row=sA=rn(sA),b.treeContext=tA(K,y,F),pn(h,b,gA,F),--sA.pendingTasks===0&&zs(h,sA);else{for(F=b.blockedSegment,gA=F.children.length,bA=F.chunks.length,pA=y-1;0<=pA;pA--){XA=k[pA],b.row=sA=rn(sA),b.treeContext=tA(K,y,pA),OA=Es(h,bA,null,b.formatContext,pA===0?F.lastPushedText:!0,!0),F.children.splice(gA,0,OA),b.blockedSegment=OA;try{pn(h,b,XA,pA),OA.lastPushedText&&OA.textEmbedded&&OA.chunks.push(Ua),OA.status=1,fr(h,b.blockedBoundary,OA),--sA.pendingTasks===0&&zs(h,sA)}catch(fe){throw OA.status=h.status===12?3:4,fe}}b.blockedSegment=F,F.lastPushedText=!1}cA!==null&&sA!==null&&0<sA.pendingTasks&&(cA.pendingTasks++,sA.next=cA),b.treeContext=K,b.row=cA,b.keyPath=L}function cl(h,b,y,k,F,L){var K=b.thenableState;for(b.thenableState=null,Me={},vt=b,sn=h,Oe=y,It=Dn=0,Gn=-1,$t=0,Xt=K,h=k(F,L);$e;)$e=!1,It=Dn=0,Gn=-1,$t=0,Ji+=1,tt=null,h=k(F,L);return lr(),h}function Vr(h,b,y,k,F,L,K){var cA=!1;if(L!==0&&h.formState!==null){var sA=b.blockedSegment;if(sA!==null){cA=!0,sA=sA.chunks;for(var gA=0;gA<L;gA++)gA===K?sA.push($w):sA.push(Oc)}}L=b.keyPath,b.keyPath=y,F?(y=b.treeContext,b.treeContext=tA(y,1,0),pn(h,b,k,-1),b.treeContext=y):cA?pn(h,b,k,-1):In(h,b,k,-1),b.keyPath=L}function _i(h,b,y,k,F,L){if(typeof k=="function")if(k.prototype&&k.prototype.isReactComponent){var K=F;if("ref"in F){K={};for(var cA in F)cA!=="ref"&&(K[cA]=F[cA])}var sA=k.defaultProps;if(sA){K===F&&(K=YA({},K,F));for(var gA in sA)K[gA]===void 0&&(K[gA]=sA[gA])}F=K,K=Vf,sA=k.contextType,typeof sA=="object"&&sA!==null&&(K=sA._currentValue),K=new k(F,K);var bA=K.state!==void 0?K.state:null;if(K.updater=T,K.props=F,K.state=bA,sA={queue:[],replace:!1},K._reactInternals=sA,L=k.contextType,K.context=typeof L=="object"&&L!==null?L._currentValue:Vf,L=k.getDerivedStateFromProps,typeof L=="function"&&(L=L(F,bA),bA=L==null?bA:YA({},bA,L),K.state=bA),typeof k.getDerivedStateFromProps!="function"&&typeof K.getSnapshotBeforeUpdate!="function"&&(typeof K.UNSAFE_componentWillMount=="function"||typeof K.componentWillMount=="function"))if(k=K.state,typeof K.componentWillMount=="function"&&K.componentWillMount(),typeof K.UNSAFE_componentWillMount=="function"&&K.UNSAFE_componentWillMount(),k!==K.state&&T.enqueueReplaceState(K,K.state,null),sA.queue!==null&&0<sA.queue.length)if(k=sA.queue,L=sA.replace,sA.queue=null,sA.replace=!1,L&&k.length===1)K.state=k[0];else{for(sA=L?k[0]:K.state,bA=!0,L=L?1:0;L<k.length;L++)gA=k[L],gA=typeof gA=="function"?gA.call(K,sA,F,void 0):gA,gA!=null&&(bA?(bA=!1,sA=YA({},sA,gA)):YA(sA,gA));K.state=sA}else sA.queue=null;if(k=K.render(),h.status===12)throw null;F=b.keyPath,b.keyPath=y,In(h,b,k,-1),b.keyPath=F}else{if(k=cl(h,b,y,k,F,void 0),h.status===12)throw null;Vr(h,b,y,k,Dn!==0,It,Gn)}else if(typeof k=="string")if(K=b.blockedSegment,K===null)K=F.children,sA=b.formatContext,bA=b.keyPath,b.formatContext=ka(sA,k,F),b.keyPath=y,pn(h,b,K,-1),b.formatContext=sA,b.keyPath=bA;else{if(bA=or(K.chunks,k,F,h.resumableState,h.renderState,b.blockedPreamble,b.hoistableState,b.formatContext,K.lastPushedText),K.lastPushedText=!1,sA=b.formatContext,L=b.keyPath,b.keyPath=y,(b.formatContext=ka(sA,k,F)).insertionMode===3){y=Es(h,0,null,b.formatContext,!1,!1),K.preambleChildren.push(y),b.blockedSegment=y;try{y.status=6,pn(h,b,bA,-1),y.lastPushedText&&y.textEmbedded&&y.chunks.push(Ua),y.status=1,fr(h,b.blockedBoundary,y)}finally{b.blockedSegment=K}}else pn(h,b,bA,-1);b.formatContext=sA,b.keyPath=L;A:{switch(b=K.chunks,h=h.resumableState,k){case"title":case"style":case"script":case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break A;case"body":if(1>=sA.insertionMode){h.hasBody=!0;break A}break;case"html":if(sA.insertionMode===0){h.hasHtml=!0;break A}break;case"head":if(1>=sA.insertionMode)break A}b.push(Ri(k))}K.lastPushedText=!1}else{switch(k){case Z:case a:case o:case r:k=b.keyPath,b.keyPath=y,In(h,b,F.children,-1),b.keyPath=k;return;case E:k=b.blockedSegment,k===null?F.mode!=="hidden"&&(k=b.keyPath,b.keyPath=y,pn(h,b,F.children,-1),b.keyPath=k):F.mode!=="hidden"&&(k.chunks.push(WB),k.lastPushedText=!1,K=b.keyPath,b.keyPath=y,pn(h,b,F.children,-1),b.keyPath=K,k.chunks.push(pg),k.lastPushedText=!1);return;case f:A:{if(k=F.children,F=F.revealOrder,F==="forwards"||F==="backwards"||F==="unstable_legacy-backwards"){if(V(k)){Eu(h,b,y,k,F);break A}if((K=D(k))&&(K=K.call(k))){if(sA=K.next(),!sA.done){do sA=K.next();while(!sA.done);Eu(h,b,y,k,F)}break A}}F==="together"?(F=b.keyPath,K=b.row,sA=b.row=rn(null),sA.boundaries=[],sA.together=!0,b.keyPath=y,In(h,b,k,-1),--sA.pendingTasks===0&&zs(h,sA),b.keyPath=F,b.row=K,K!==null&&0<sA.pendingTasks&&(K.pendingTasks++,sA.next=K)):(F=b.keyPath,b.keyPath=y,In(h,b,k,-1),b.keyPath=F)}return;case S:case H:throw Error(t(343));case u:A:if(b.replay!==null){k=b.keyPath,K=b.formatContext,sA=b.row,b.keyPath=y,b.formatContext=Fi(h.resumableState,K),b.row=null,y=F.children;try{pn(h,b,y,-1)}finally{b.keyPath=k,b.formatContext=K,b.row=sA}}else{k=b.keyPath,L=b.formatContext;var pA=b.row;gA=b.blockedBoundary,cA=b.blockedPreamble;var XA=b.hoistableState,OA=b.blockedSegment,fe=F.fallback;F=F.children;var xe=new Set,ke=2>b.formatContext.insertionMode?Er(h,b.row,xe,dn(),dn()):Er(h,b.row,xe,null,null);h.trackedPostpones!==null&&(ke.trackedContentKeyPath=y);var te=Es(h,OA.chunks.length,ke,b.formatContext,!1,!1);OA.children.push(te),OA.lastPushedText=!1;var he=Es(h,0,null,b.formatContext,!1,!1);if(he.parentFlushed=!0,h.trackedPostpones!==null){K=b.componentStack,sA=[y[0],"Suspense Fallback",y[2]],bA=[sA[1],sA[2],[],null],h.trackedPostpones.workingMap.set(sA,bA),ke.trackedFallbackNode=bA,b.blockedSegment=te,b.blockedPreamble=ke.fallbackPreamble,b.keyPath=sA,b.formatContext=PB(h.resumableState,L),b.componentStack=Sr(K),te.status=6;try{pn(h,b,fe,-1),te.lastPushedText&&te.textEmbedded&&te.chunks.push(Ua),te.status=1,fr(h,gA,te)}catch(Ke){throw te.status=h.status===12?3:4,Ke}finally{b.blockedSegment=OA,b.blockedPreamble=cA,b.keyPath=k,b.formatContext=L}b=fi(h,null,F,-1,ke,he,ke.contentPreamble,ke.contentState,b.abortSet,y,Fi(h.resumableState,b.formatContext),b.context,b.treeContext,null,K),Ra(b),h.pingedTasks.push(b)}else{b.blockedBoundary=ke,b.blockedPreamble=ke.contentPreamble,b.hoistableState=ke.contentState,b.blockedSegment=he,b.keyPath=y,b.formatContext=Fi(h.resumableState,L),b.row=null,he.status=6;try{if(pn(h,b,F,-1),he.lastPushedText&&he.textEmbedded&&he.chunks.push(Ua),he.status=1,fr(h,ke,he),Sa(ke,he),ke.pendingTasks===0&&ke.status===0){if(ke.status=1,!Rr(h,ke)){pA!==null&&--pA.pendingTasks===0&&zs(h,pA),h.pendingRootTasks===0&&b.blockedPreamble&&ra(h);break A}}else pA!==null&&pA.together&&Mg(h,pA)}catch(Ke){ke.status=4,h.status===12?(he.status=3,K=h.fatalError):(he.status=4,K=Ke),sA=Dt(b.componentStack),bA=Ln(h,K,sA),ke.errorDigest=bA,qi(h,ke)}finally{b.blockedBoundary=gA,b.blockedPreamble=cA,b.hoistableState=XA,b.blockedSegment=OA,b.keyPath=k,b.formatContext=L,b.row=pA}b=fi(h,null,fe,-1,gA,te,ke.fallbackPreamble,ke.fallbackState,xe,[y[0],"Suspense Fallback",y[2]],PB(h.resumableState,b.formatContext),b.context,b.treeContext,b.row,Sr(b.componentStack)),Ra(b),h.pingedTasks.push(b)}}return}if(typeof k=="object"&&k!==null)switch(k.$$typeof){case g:if("ref"in F)for(OA in K={},F)OA!=="ref"&&(K[OA]=F[OA]);else K=F;k=cl(h,b,y,k.render,K,L),Vr(h,b,y,k,Dn!==0,It,Gn);return;case w:_i(h,b,y,k.type,F,L);return;case l:if(sA=F.children,K=b.keyPath,F=F.value,bA=k._currentValue,k._currentValue=F,L=Ss,Ss=k={parent:L,depth:L===null?0:L.depth+1,context:k,parentValue:bA,value:F},b.context=k,b.keyPath=y,In(h,b,sA,-1),h=Ss,h===null)throw Error(t(403));h.context._currentValue=h.parentValue,h=Ss=h.parent,b.context=h,b.keyPath=K;return;case c:F=F.children,k=F(k._context._currentValue),F=b.keyPath,b.keyPath=y,In(h,b,k,-1),b.keyPath=F;return;case v:if(K=k._init,k=K(k._payload),h.status===12)throw null;_i(h,b,y,k,F,L);return}throw Error(t(130,k==null?k:typeof k,""))}}function Wr(h,b,y,k,F){var L=b.replay,K=b.blockedBoundary,cA=Es(h,0,null,b.formatContext,!1,!1);cA.id=y,cA.parentFlushed=!0;try{b.replay=null,b.blockedSegment=cA,pn(h,b,k,F),cA.status=1,fr(h,K,cA),K===null?h.completedRootSegment=cA:(Sa(K,cA),K.parentFlushed&&h.partialBoundaries.push(K))}finally{b.replay=L,b.blockedSegment=null}}function In(h,b,y,k){b.replay!==null&&typeof b.replay.slots=="number"?Wr(h,b,b.replay.slots,y,k):(b.node=y,b.childIndex=k,y=b.componentStack,Ra(b),ll(h,b),b.componentStack=y)}function ll(h,b){var y=b.node,k=b.childIndex;if(y!==null){if(typeof y=="object"){switch(y.$$typeof){case n:var F=y.type,L=y.key,K=y.props;y=K.ref;var cA=y!==void 0?y:null,sA=il(F),gA=L??(k===-1?0:k);if(L=[b.keyPath,sA,gA],b.replay!==null)A:{var bA=b.replay;for(k=bA.nodes,y=0;y<k.length;y++){var pA=k[y];if(gA===pA[1]){if(pA.length===4){if(sA!==null&&sA!==pA[0])throw Error(t(490,pA[0],sA));var XA=pA[2];sA=pA[3],gA=b.node,b.replay={nodes:XA,slots:sA,pendingTasks:1};try{if(_i(h,b,L,F,K,cA),b.replay.pendingTasks===1&&0<b.replay.nodes.length)throw Error(t(488));b.replay.pendingTasks--}catch(be){if(typeof be=="object"&&be!==null&&(be===_A||typeof be.then=="function"))throw b.node===gA?b.replay=bA:k.splice(y,1),be;b.replay.pendingTasks--,K=Dt(b.componentStack),L=h,h=b.blockedBoundary,F=be,K=Ln(L,F,K),jo(L,h,XA,sA,F,K)}b.replay=bA}else{if(F!==u)throw Error(t(490,"Suspense",il(F)||"Unknown"));e:{bA=void 0,F=pA[5],cA=pA[2],sA=pA[3],gA=pA[4]===null?[]:pA[4][2],pA=pA[4]===null?null:pA[4][3];var OA=b.keyPath,fe=b.formatContext,xe=b.row,ke=b.replay,te=b.blockedBoundary,he=b.hoistableState,Ke=K.children,ys=K.fallback,Ys=new Set;K=2>b.formatContext.insertionMode?Er(h,b.row,Ys,dn(),dn()):Er(h,b.row,Ys,null,null),K.parentFlushed=!0,K.rootSegmentID=F,b.blockedBoundary=K,b.hoistableState=K.contentState,b.keyPath=L,b.formatContext=Fi(h.resumableState,fe),b.row=null,b.replay={nodes:cA,slots:sA,pendingTasks:1};try{if(pn(h,b,Ke,-1),b.replay.pendingTasks===1&&0<b.replay.nodes.length)throw Error(t(488));if(b.replay.pendingTasks--,K.pendingTasks===0&&K.status===0){K.status=1,h.completedBoundaries.push(K);break e}}catch(be){K.status=4,XA=Dt(b.componentStack),bA=Ln(h,be,XA),K.errorDigest=bA,b.replay.pendingTasks--,h.clientRenderedBoundaries.push(K)}finally{b.blockedBoundary=te,b.hoistableState=he,b.replay=ke,b.keyPath=OA,b.formatContext=fe,b.row=xe}XA=Bl(h,null,{nodes:gA,slots:pA,pendingTasks:0},ys,-1,te,K.fallbackState,Ys,[L[0],"Suspense Fallback",L[2]],PB(h.resumableState,b.formatContext),b.context,b.treeContext,b.row,Sr(b.componentStack)),Ra(XA),h.pingedTasks.push(XA)}}k.splice(y,1);break A}}}else _i(h,b,L,F,K,cA);return;case s:throw Error(t(257));case v:if(XA=y._init,y=XA(y._payload),h.status===12)throw null;In(h,b,y,k);return}if(V(y)){tc(h,b,y,k);return}if((XA=D(y))&&(XA=XA.call(y))){if(y=XA.next(),!y.done){K=[];do K.push(y.value),y=XA.next();while(!y.done);tc(h,b,K,k)}return}if(typeof y.then=="function")return b.thenableState=null,In(h,b,Fg(y),k);if(y.$$typeof===l)return In(h,b,y._currentValue,k);throw k=Object.prototype.toString.call(y),Error(t(31,k==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":k))}typeof y=="string"?(k=b.blockedSegment,k!==null&&(k.lastPushedText=Uf(k.chunks,y,h.renderState,k.lastPushedText))):(typeof y=="number"||typeof y=="bigint")&&(k=b.blockedSegment,k!==null&&(k.lastPushedText=Uf(k.chunks,""+y,h.renderState,k.lastPushedText)))}}function tc(h,b,y,k){var F=b.keyPath;if(k!==-1&&(b.keyPath=[b.keyPath,"Fragment",k],b.replay!==null)){for(var L=b.replay,K=L.nodes,cA=0;cA<K.length;cA++){var sA=K[cA];if(sA[1]===k){k=sA[2],sA=sA[3],b.replay={nodes:k,slots:sA,pendingTasks:1};try{if(tc(h,b,y,-1),b.replay.pendingTasks===1&&0<b.replay.nodes.length)throw Error(t(488));b.replay.pendingTasks--}catch(pA){if(typeof pA=="object"&&pA!==null&&(pA===_A||typeof pA.then=="function"))throw pA;b.replay.pendingTasks--,y=Dt(b.componentStack);var gA=b.blockedBoundary,bA=pA;y=Ln(h,bA,y),jo(h,gA,k,sA,bA,y)}b.replay=L,K.splice(cA,1);break}}b.keyPath=F;return}if(L=b.treeContext,K=y.length,b.replay!==null&&(cA=b.replay.slots,cA!==null&&typeof cA=="object")){for(k=0;k<K;k++)sA=y[k],b.treeContext=tA(L,K,k),gA=cA[k],typeof gA=="number"?(Wr(h,b,gA,sA,k),delete cA[k]):pn(h,b,sA,k);b.treeContext=L,b.keyPath=F;return}for(cA=0;cA<K;cA++)k=y[cA],b.treeContext=tA(L,K,cA),pn(h,b,k,cA);b.treeContext=L,b.keyPath=F}function yu(h,b,y){if(y.status=5,y.rootSegmentID=h.nextSegmentId++,h=y.trackedContentKeyPath,h===null)throw Error(t(486));var k=y.trackedFallbackNode,F=[],L=b.workingMap.get(h);return L===void 0?(y=[h[1],h[2],F,null,k,y.rootSegmentID],b.workingMap.set(h,y),Gl(y,h[0],b),y):(L[4]=k,L[5]=y.rootSegmentID,L)}function xg(h,b,y,k){k.status=5;var F=y.keyPath,L=y.blockedBoundary;if(L===null)k.id=h.nextSegmentId++,b.rootSlots=k.id,h.completedRootSegment!==null&&(h.completedRootSegment.status=5);else{if(L!==null&&L.status===0){var K=yu(h,b,L);if(L.trackedContentKeyPath===F&&y.childIndex===-1){k.id===-1&&(k.id=k.parentFlushed?L.rootSegmentID:h.nextSegmentId++),K[3]=k.id;return}}if(k.id===-1&&(k.id=k.parentFlushed&&L!==null?L.rootSegmentID:h.nextSegmentId++),y.childIndex===-1)F===null?b.rootSlots=k.id:(y=b.workingMap.get(F),y===void 0?(y=[F[1],F[2],[],k.id],Gl(y,F[0],b)):y[3]=k.id);else{if(F===null){if(h=b.rootSlots,h===null)h=b.rootSlots={};else if(typeof h=="number")throw Error(t(491))}else if(L=b.workingMap,K=L.get(F),K===void 0)h={},K=[F[1],F[2],[],h],L.set(F,K),Gl(K,F[0],b);else if(h=K[3],h===null)h=K[3]={};else if(typeof h=="number")throw Error(t(491));h[y.childIndex]=k.id}}}function qi(h,b){h=h.trackedPostpones,h!==null&&(b=b.trackedContentKeyPath,b!==null&&(b=h.workingMap.get(b),b!==void 0&&(b.length=4,b[2]=[],b[3]=null)))}function gl(h,b,y){return Bl(h,y,b.replay,b.node,b.childIndex,b.blockedBoundary,b.hoistableState,b.abortSet,b.keyPath,b.formatContext,b.context,b.treeContext,b.row,b.componentStack)}function dl(h,b,y){var k=b.blockedSegment,F=Es(h,k.chunks.length,null,b.formatContext,k.lastPushedText,!0);return k.children.push(F),k.lastPushedText=!1,fi(h,y,b.node,b.childIndex,b.blockedBoundary,F,b.blockedPreamble,b.hoistableState,b.abortSet,b.keyPath,b.formatContext,b.context,b.treeContext,b.row,b.componentStack)}function pn(h,b,y,k){var F=b.formatContext,L=b.context,K=b.keyPath,cA=b.treeContext,sA=b.componentStack,gA=b.blockedSegment;if(gA===null){gA=b.replay;try{return In(h,b,y,k)}catch(XA){if(lr(),y=XA===_A?Ue():XA,h.status!==12&&typeof y=="object"&&y!==null){if(typeof y.then=="function"){k=XA===_A?Fn():null,h=gl(h,b,k).ping,y.then(h,h),b.formatContext=F,b.context=L,b.keyPath=K,b.treeContext=cA,b.componentStack=sA,b.replay=gA,U(L);return}if(y.message==="Maximum call stack size exceeded"){y=XA===_A?Fn():null,y=gl(h,b,y),h.pingedTasks.push(y),b.formatContext=F,b.context=L,b.keyPath=K,b.treeContext=cA,b.componentStack=sA,b.replay=gA,U(L);return}}}}else{var bA=gA.children.length,pA=gA.chunks.length;try{return In(h,b,y,k)}catch(XA){if(lr(),gA.children.length=bA,gA.chunks.length=pA,y=XA===_A?Ue():XA,h.status!==12&&typeof y=="object"&&y!==null){if(typeof y.then=="function"){gA=y,y=XA===_A?Fn():null,h=dl(h,b,y).ping,gA.then(h,h),b.formatContext=F,b.context=L,b.keyPath=K,b.treeContext=cA,b.componentStack=sA,U(L);return}if(y.message==="Maximum call stack size exceeded"){gA=XA===_A?Fn():null,gA=dl(h,b,gA),h.pingedTasks.push(gA),b.formatContext=F,b.context=L,b.keyPath=K,b.treeContext=cA,b.componentStack=sA,U(L);return}}}}throw b.formatContext=F,b.context=L,b.keyPath=K,b.treeContext=cA,U(L),y}function $i(h){var b=h.blockedBoundary,y=h.blockedSegment;y!==null&&(y.status=3,yr(this,b,h.row,y))}function jo(h,b,y,k,F,L){for(var K=0;K<y.length;K++){var cA=y[K];if(cA.length===4)jo(h,b,cA[2],cA[3],F,L);else{cA=cA[5];var sA=h,gA=L,bA=Er(sA,null,new Set,null,null);bA.parentFlushed=!0,bA.rootSegmentID=cA,bA.status=4,bA.errorDigest=gA,bA.parentFlushed&&sA.clientRenderedBoundaries.push(bA)}}if(y.length=0,k!==null){if(b===null)throw Error(t(487));if(b.status!==4&&(b.status=4,b.errorDigest=L,b.parentFlushed&&h.clientRenderedBoundaries.push(b)),typeof k=="object")for(var pA in k)delete k[pA]}}function Ao(h,b,y){var k=h.blockedBoundary,F=h.blockedSegment;if(F!==null){if(F.status===6)return;F.status=3}var L=Dt(h.componentStack);if(k===null){if(b.status!==13&&b.status!==14){if(k=h.replay,k===null){b.trackedPostpones!==null&&F!==null?(k=b.trackedPostpones,Ln(b,y,L),xg(b,k,h,F),yr(b,null,h.row,F)):(Ln(b,y,L),ec(b,y));return}k.pendingTasks--,k.pendingTasks===0&&0<k.nodes.length&&(F=Ln(b,y,L),jo(b,null,k.nodes,k.slots,y,F)),b.pendingRootTasks--,b.pendingRootTasks===0&&Pg(b)}}else{var K=b.trackedPostpones;if(k.status!==4){if(K!==null&&F!==null)return Ln(b,y,L),xg(b,K,h,F),k.fallbackAbortableTasks.forEach(function(cA){return Ao(cA,b,y)}),k.fallbackAbortableTasks.clear(),yr(b,k,h.row,F);k.status=4,F=Ln(b,y,L),k.status=4,k.errorDigest=F,qi(b,k),k.parentFlushed&&b.clientRenderedBoundaries.push(k)}k.pendingTasks--,F=k.row,F!==null&&--F.pendingTasks===0&&zs(b,F),k.fallbackAbortableTasks.forEach(function(cA){return Ao(cA,b,y)}),k.fallbackAbortableTasks.clear()}h=h.row,h!==null&&--h.pendingTasks===0&&zs(b,h),b.allPendingTasks--,b.allPendingTasks===0&&ul(b)}function _o(h,b){try{var y=h.renderState,k=y.onHeaders;if(k){var F=y.headers;if(F){y.headers=null;var L=F.preconnects;if(F.fontPreloads&&(L&&(L+=", "),L+=F.fontPreloads),F.highImagePreloads&&(L&&(L+=", "),L+=F.highImagePreloads),!b){var K=y.styles.values(),cA=K.next();A:for(;0<F.remainingCapacity&&!cA.done;cA=K.next())for(var sA=cA.value.sheets.values(),gA=sA.next();0<F.remainingCapacity&&!gA.done;gA=sA.next()){var bA=gA.value,pA=bA.props,XA=pA.href,OA=bA.props,fe=Hs(OA.href,"style",{crossOrigin:OA.crossOrigin,integrity:OA.integrity,nonce:OA.nonce,type:OA.type,fetchPriority:OA.fetchPriority,referrerPolicy:OA.referrerPolicy,media:OA.media});if(0<=(F.remainingCapacity-=fe.length+2))y.resets.style[XA]=lA,L&&(L+=", "),L+=fe,y.resets.style[XA]=typeof pA.crossOrigin=="string"||typeof pA.integrity=="string"?[pA.crossOrigin,pA.integrity]:lA;else break A}}k(L?{Link:L}:{})}}}catch(xe){Ln(h,xe,{})}}function Pg(h){h.trackedPostpones===null&&_o(h,!0),h.trackedPostpones===null&&ra(h),h.onShellError=EA,h=h.onShellReady,h()}function ul(h){_o(h,h.trackedPostpones===null?!0:h.completedRootSegment===null||h.completedRootSegment.status!==5),ra(h),h=h.onAllReady,h()}function Sa(h,b){if(b.chunks.length===0&&b.children.length===1&&b.children[0].boundary===null&&b.children[0].id===-1){var y=b.children[0];y.id=b.id,y.parentFlushed=!0,y.status!==1&&y.status!==3&&y.status!==4||Sa(h,y)}else h.completedSegments.push(b)}function fr(h,b,y){if(dA!==null){y=y.chunks;for(var k=0,F=0;F<y.length;F++)k+=y[F].byteLength;b===null?h.byteSize+=k:b.byteSize+=k}}function yr(h,b,y,k){if(y!==null&&(--y.pendingTasks===0?zs(h,y):y.together&&Mg(h,y)),h.allPendingTasks--,b===null){if(k!==null&&k.parentFlushed){if(h.completedRootSegment!==null)throw Error(t(389));h.completedRootSegment=k}h.pendingRootTasks--,h.pendingRootTasks===0&&Pg(h)}else if(b.pendingTasks--,b.status!==4)if(b.pendingTasks===0){if(b.status===0&&(b.status=1),k!==null&&k.parentFlushed&&(k.status===1||k.status===3)&&Sa(b,k),b.parentFlushed&&h.completedBoundaries.push(b),b.status===1)y=b.row,y!==null&&Ac(y.hoistables,b.contentState),Rr(h,b)||(b.fallbackAbortableTasks.forEach($i,h),b.fallbackAbortableTasks.clear(),y!==null&&--y.pendingTasks===0&&zs(h,y)),h.pendingRootTasks===0&&h.trackedPostpones===null&&b.contentPreamble!==null&&ra(h);else if(b.status===5&&(b=b.row,b!==null)){if(h.trackedPostpones!==null){y=h.trackedPostpones;var F=b.next;if(F!==null&&(k=F.boundaries,k!==null))for(F.boundaries=null,F=0;F<k.length;F++){var L=k[F];yu(h,y,L),yr(h,L,null,null)}}--b.pendingTasks===0&&zs(h,b)}}else k===null||!k.parentFlushed||k.status!==1&&k.status!==3||(Sa(b,k),b.completedSegments.length===1&&b.parentFlushed&&h.partialBoundaries.push(b)),b=b.row,b!==null&&b.together&&Mg(h,b);h.allPendingTasks===0&&ul(h)}function Yu(h){if(h.status!==14&&h.status!==13){var b=Ss,y=Un.H;Un.H=Hu;var k=Un.A;Un.A=Ot;var F=Vt;Vt=h;var L=Mn;Mn=h.resumableState;try{var K=h.pingedTasks,cA;for(cA=0;cA<K.length;cA++){var sA=K[cA],gA=h,bA=sA.blockedSegment;if(bA===null){var pA=gA;if(sA.replay.pendingTasks!==0){U(sA.context);try{if(typeof sA.replay.slots=="number"?Wr(pA,sA,sA.replay.slots,sA.node,sA.childIndex):ll(pA,sA),sA.replay.pendingTasks===1&&0<sA.replay.nodes.length)throw Error(t(488));sA.replay.pendingTasks--,sA.abortSet.delete(sA),yr(pA,sA.blockedBoundary,sA.row,null)}catch(gs){lr();var XA=gs===_A?Ue():gs;if(typeof XA=="object"&&XA!==null&&typeof XA.then=="function"){var OA=sA.ping;XA.then(OA,OA),sA.thenableState=gs===_A?Fn():null}else{sA.replay.pendingTasks--,sA.abortSet.delete(sA);var fe=Dt(sA.componentStack);gA=void 0;var xe=pA,ke=sA.blockedBoundary,te=pA.status===12?pA.fatalError:XA,he=sA.replay.nodes,Ke=sA.replay.slots;gA=Ln(xe,te,fe),jo(xe,ke,he,Ke,te,gA),pA.pendingRootTasks--,pA.pendingRootTasks===0&&Pg(pA),pA.allPendingTasks--,pA.allPendingTasks===0&&ul(pA)}}}}else if(pA=void 0,xe=bA,xe.status===0){xe.status=6,U(sA.context);var ys=xe.children.length,Ys=xe.chunks.length;try{ll(gA,sA),xe.lastPushedText&&xe.textEmbedded&&xe.chunks.push(Ua),sA.abortSet.delete(sA),xe.status=1,fr(gA,sA.blockedBoundary,xe),yr(gA,sA.blockedBoundary,sA.row,xe)}catch(gs){lr(),xe.children.length=ys,xe.chunks.length=Ys;var be=gs===_A?Ue():gA.status===12?gA.fatalError:gs;if(gA.status===12&&gA.trackedPostpones!==null){var $n=gA.trackedPostpones,Jt=Dt(sA.componentStack);sA.abortSet.delete(sA),Ln(gA,be,Jt),xg(gA,$n,sA,xe),yr(gA,sA.blockedBoundary,sA.row,xe)}else if(typeof be=="object"&&be!==null&&typeof be.then=="function"){xe.status=0,sA.thenableState=gs===_A?Fn():null;var Xn=sA.ping;be.then(Xn,Xn)}else{var eo=Dt(sA.componentStack);sA.abortSet.delete(sA),xe.status=4;var De=sA.blockedBoundary,Qi=sA.row;if(Qi!==null&&--Qi.pendingTasks===0&&zs(gA,Qi),gA.allPendingTasks--,pA=Ln(gA,be,eo),De===null)ec(gA,be);else if(De.pendingTasks--,De.status!==4){De.status=4,De.errorDigest=pA,qi(gA,De);var oa=De.row;oa!==null&&--oa.pendingTasks===0&&zs(gA,oa),De.parentFlushed&&gA.clientRenderedBoundaries.push(De),gA.pendingRootTasks===0&&gA.trackedPostpones===null&&De.contentPreamble!==null&&ra(gA)}gA.allPendingTasks===0&&ul(gA)}}}}K.splice(0,cA),h.destination!==null&&rc(h,h.destination)}catch(gs){Ln(h,gs,{}),ec(h,gs)}finally{Mn=L,Un.H=y,Un.A=k,y===Hu&&U(b),Vt=F}}}function Nr(h,b,y){b.preambleChildren.length&&y.push(b.preambleChildren);for(var k=!1,F=0;F<b.children.length;F++)k=nc(h,b.children[F],y)||k;return k}function nc(h,b,y){var k=b.boundary;if(k===null)return Nr(h,b,y);var F=k.contentPreamble,L=k.fallbackPreamble;if(F===null||L===null)return!1;switch(k.status){case 1:if(Ig(h.renderState,F),h.byteSize+=k.byteSize,b=k.completedSegments[0],!b)throw Error(t(391));return Nr(h,b,y);case 5:if(h.trackedPostpones!==null)return!0;case 4:if(b.status===1)return Ig(h.renderState,L),Nr(h,b,y);default:return!0}}function ra(h){if(h.completedRootSegment&&h.completedPreambleSegments===null){var b=[],y=h.byteSize,k=nc(h,h.completedRootSegment,b),F=h.renderState.preamble;k===!1||F.headChunks&&F.bodyChunks?h.completedPreambleSegments=b:h.byteSize=y}}function Va(h,b,y,k){switch(y.parentFlushed=!0,y.status){case 0:y.id=h.nextSegmentId++;case 5:return k=y.id,y.lastPushedText=!1,y.textEmbedded=!1,h=h.renderState,X(b,Mf),X(b,h.placeholderPrefix),h=q(k.toString(16)),X(b,h),_(b,Kc);case 1:y.status=2;var F=!0,L=y.chunks,K=0;y=y.children;for(var cA=0;cA<y.length;cA++){for(F=y[cA];K<F.index;K++)X(b,L[K]);F=sc(h,b,F,k)}for(;K<L.length-1;K++)X(b,L[K]);return K<L.length&&(F=_(b,L[K])),F;case 3:return!0;default:throw Error(t(390))}}var aa=0;function sc(h,b,y,k){var F=y.boundary;if(F===null)return Va(h,b,y,k);if(F.parentFlushed=!0,F.status===4){var L=F.row;L!==null&&--L.pendingTasks===0&&zs(h,L),F=F.errorDigest,_(b,Br),X(b,Vi),F&&(X(b,_c),X(b,q(ZA(F))),X(b,jc)),_(b,qc),Va(h,b,y,k)}else if(F.status!==1)F.status===0&&(F.rootSegmentID=h.nextSegmentId++),0<F.completedSegments.length&&h.partialBoundaries.push(F),NB(b,h.renderState,F.rootSegmentID),k&&Ac(k,F.fallbackState),Va(h,b,y,k);else if(!Wa&&Rr(h,F)&&(aa+F.byteSize>h.progressiveChunkSize||ui(F.contentState)))F.rootSegmentID=h.nextSegmentId++,h.completedBoundaries.push(F),NB(b,h.renderState,F.rootSegmentID),Va(h,b,y,k);else{if(aa+=F.byteSize,k&&Ac(k,F.contentState),y=F.row,y!==null&&Rr(h,F)&&--y.pendingTasks===0&&zs(h,y),_(b,AQ),y=F.completedSegments,y.length!==1)throw Error(t(391));sc(h,b,y[0],k)}return _(b,Rs)}function hr(h,b,y,k){return el(b,h.renderState,y.parentFormatContext,y.id),sc(h,b,y,k),Eg(b,y.parentFormatContext)}function Zu(h,b,y){aa=y.byteSize;for(var k=y.completedSegments,F=0;F<k.length;F++)hi(h,b,y,k[F]);k.length=0,k=y.row,k!==null&&Rr(h,y)&&--k.pendingTasks===0&&zs(h,k),di(b,y.contentState,h.renderState),k=h.resumableState,h=h.renderState,F=y.rootSegmentID,y=y.contentState;var L=h.stylesToHoist;return h.stylesToHoist=!1,X(b,h.startInlineScript),X(b,Et),L?((k.instructions&4)===0&&(k.instructions|=4,X(b,tl)),(k.instructions&2)===0&&(k.instructions|=2,X(b,yg)),(k.instructions&8)===0?(k.instructions|=8,X(b,Iv)):X(b,nQ)):((k.instructions&2)===0&&(k.instructions|=2,X(b,yg)),X(b,tQ)),k=q(F.toString(16)),X(b,h.boundaryPrefix),X(b,k),X(b,au),X(b,h.segmentPrefix),X(b,k),L?(X(b,pv),qn(b,y)):X(b,iu),y=_(b,sQ),Vo(b,h)&&y}function hi(h,b,y,k){if(k.status===2)return!0;var F=y.contentState,L=k.id;if(L===-1){if((k.id=y.rootSegmentID)===-1)throw Error(t(392));return hr(h,b,k,F)}return L===y.rootSegmentID?hr(h,b,k,F):(hr(h,b,k,F),y=h.resumableState,h=h.renderState,X(b,h.startInlineScript),X(b,Et),(y.instructions&1)===0?(y.instructions|=1,X(b,eQ)):X(b,bv),X(b,h.segmentPrefix),L=q(L.toString(16)),X(b,L),X(b,Cv),X(b,h.placeholderPrefix),X(b,L),b=_(b,vv),b)}var Wa=!1;function rc(h,b){fA=new Uint8Array(2048),yA=0;try{if(!(0<h.pendingRootTasks)){var y,k=h.completedRootSegment;if(k!==null){if(k.status===5)return;var F=h.completedPreambleSegments;if(F===null)return;aa=h.byteSize;var L=h.resumableState,K=h.renderState,cA=K.preamble,sA=cA.htmlChunks,gA=cA.headChunks,bA;if(sA){for(bA=0;bA<sA.length;bA++)X(b,sA[bA]);if(gA)for(bA=0;bA<gA.length;bA++)X(b,gA[bA]);else X(b,un("head")),X(b,Et)}else if(gA)for(bA=0;bA<gA.length;bA++)X(b,gA[bA]);var pA=K.charsetChunks;for(bA=0;bA<pA.length;bA++)X(b,pA[bA]);pA.length=0,K.preconnects.forEach(zt,b),K.preconnects.clear();var XA=K.viewportChunks;for(bA=0;bA<XA.length;bA++)X(b,XA[bA]);XA.length=0,K.fontPreloads.forEach(zt,b),K.fontPreloads.clear(),K.highImagePreloads.forEach(zt,b),K.highImagePreloads.clear(),WA=K,K.styles.forEach(uu,b),WA=null;var OA=K.importMapChunks;for(bA=0;bA<OA.length;bA++)X(b,OA[bA]);OA.length=0,K.bootstrapScripts.forEach(zt,b),K.scripts.forEach(zt,b),K.scripts.clear(),K.bulkPreloads.forEach(zt,b),K.bulkPreloads.clear(),sA||gA||(L.instructions|=32);var fe=K.hoistableChunks;for(bA=0;bA<fe.length;bA++)X(b,fe[bA]);for(L=fe.length=0;L<F.length;L++){var xe=F[L];for(K=0;K<xe.length;K++)sc(h,b,xe[K],null)}var ke=h.renderState.preamble,te=ke.headChunks;(ke.htmlChunks||te)&&X(b,Ri("head"));var he=ke.bodyChunks;if(he)for(F=0;F<he.length;F++)X(b,he[F]);sc(h,b,k,null),h.completedRootSegment=null;var Ke=h.renderState;if(h.allPendingTasks!==0||h.clientRenderedBoundaries.length!==0||h.completedBoundaries.length!==0||h.trackedPostpones!==null&&(h.trackedPostpones.rootNodes.length!==0||h.trackedPostpones.rootSlots!==null)){var ys=h.resumableState;if((ys.instructions&64)===0){if(ys.instructions|=64,X(b,Ke.startInlineScript),(ys.instructions&32)===0){ys.instructions|=32;var Ys="_"+ys.idPrefix+"R_";X(b,Zg),X(b,q(ZA(Ys))),X(b,_t)}X(b,Et),X(b,Si),_(b,NA)}}Vo(b,Ke)}var be=h.renderState;k=0;var $n=be.viewportChunks;for(k=0;k<$n.length;k++)X(b,$n[k]);$n.length=0,be.preconnects.forEach(zt,b),be.preconnects.clear(),be.fontPreloads.forEach(zt,b),be.fontPreloads.clear(),be.highImagePreloads.forEach(zt,b),be.highImagePreloads.clear(),be.styles.forEach(Gu,b),be.scripts.forEach(zt,b),be.scripts.clear(),be.bulkPreloads.forEach(zt,b),be.bulkPreloads.clear();var Jt=be.hoistableChunks;for(k=0;k<Jt.length;k++)X(b,Jt[k]);Jt.length=0;var Xn=h.clientRenderedBoundaries;for(y=0;y<Xn.length;y++){var eo=Xn[y];be=b;var De=h.resumableState,Qi=h.renderState,oa=eo.rootSegmentID,gs=eo.errorDigest;X(be,Qi.startInlineScript),X(be,Et),(De.instructions&4)===0?(De.instructions|=4,X(be,Pf)):X(be,ou),X(be,Qi.boundaryPrefix),X(be,q(oa.toString(16))),X(be,Bu),gs&&(X(be,nl),X(be,q(rQ(gs||""))));var zr=_(be,Hv);if(!zr){h.destination=null,y++,Xn.splice(0,y);return}}Xn.splice(0,y);var Tg=h.completedBoundaries;for(y=0;y<Tg.length;y++)if(!Zu(h,b,Tg[y])){h.destination=null,y++,Tg.splice(0,y);return}Tg.splice(0,y),AA(b),fA=new Uint8Array(2048),yA=0,Wa=!0;var ic=h.partialBoundaries;for(y=0;y<ic.length;y++){var to=ic[y];A:{Xn=h,eo=b,aa=to.byteSize;var oc=to.completedSegments;for(zr=0;zr<oc.length;zr++)if(!hi(Xn,eo,to,oc[zr])){zr++,oc.splice(0,zr);var Zs=!1;break A}oc.splice(0,zr);var Ft=to.row;Ft!==null&&Ft.together&&to.pendingTasks===1&&(Ft.pendingTasks===1?Wf(Xn,Ft,Ft.hoistables):Ft.pendingTasks--),Zs=di(eo,to.contentState,Xn.renderState)}if(!Zs){h.destination=null,y++,ic.splice(0,y);return}}ic.splice(0,y),Wa=!1;var no=h.completedBoundaries;for(y=0;y<no.length;y++)if(!Zu(h,b,no[y])){h.destination=null,y++,no.splice(0,y);return}no.splice(0,y)}}finally{Wa=!1,h.allPendingTasks===0&&h.clientRenderedBoundaries.length===0&&h.completedBoundaries.length===0?(h.flushScheduled=!1,y=h.resumableState,y.hasBody&&X(b,Ri("body")),y.hasHtml&&X(b,Ri("html")),AA(b),h.status=14,b.close(),h.destination=null):AA(b)}}function Yr(h){h.flushScheduled=h.destination!==null,hA(function(){return Yu(h)}),$(function(){h.status===10&&(h.status=11),h.trackedPostpones===null&&_o(h,h.pendingRootTasks===0)})}function Ls(h){h.flushScheduled===!1&&h.pingedTasks.length===0&&h.destination!==null&&(h.flushScheduled=!0,$(function(){var b=h.destination;b?rc(h,b):h.flushScheduled=!1}))}function ia(h,b){if(h.status===13)h.status=14,kA(b,h.fatalError);else if(h.status!==14&&h.destination===null){h.destination=b;try{rc(h,b)}catch(y){Ln(h,y,{}),ec(h,y)}}}function Zr(h,b){(h.status===11||h.status===10)&&(h.status=12);try{var y=h.abortableTasks;if(0<y.size){var k=b===void 0?Error(t(432)):typeof b=="object"&&b!==null&&typeof b.then=="function"?Error(t(530)):b;h.fatalError=k,y.forEach(function(F){return Ao(F,h,k)}),y.clear()}h.destination!==null&&rc(h,h.destination)}catch(F){Ln(h,F,{}),ec(h,F)}}function Gl(h,b,y){if(b===null)y.rootNodes.push(h);else{var k=y.workingMap,F=k.get(b);F===void 0&&(F=[b[1],b[2],[],null],k.set(b,F),Gl(F,b[0],y)),F[2].push(h)}}function ac(h){var b=h.trackedPostpones;if(b===null||b.rootNodes.length===0&&b.rootSlots===null)return h.trackedPostpones=null;if(h.completedRootSegment===null||h.completedRootSegment.status!==5&&h.completedPreambleSegments!==null){var y=h.nextSegmentId,k=b.rootSlots,F=h.resumableState;F.bootstrapScriptContent=void 0,F.bootstrapScripts=void 0,F.bootstrapModules=void 0}else{y=0,k=-1,F=h.resumableState;var L=h.renderState;F.nextFormID=0,F.hasBody=!1,F.hasHtml=!1,F.unknownResources={font:L.resets.font},F.dnsResources=L.resets.dns,F.connectResources=L.resets.connect,F.imageResources=L.resets.image,F.styleResources=L.resets.style,F.scriptResources={},F.moduleUnknownResources={},F.moduleScriptResources={},F.instructions=0}return{nextSegmentId:y,rootFormatContext:h.rootFormatContext,progressiveChunkSize:h.progressiveChunkSize,resumableState:h.resumableState,replayNodes:b.rootNodes,replaySlots:k}}function wi(){var h=e.version;if(h!=="19.2.4")throw Error(t(527,h,"19.2.4"))}return wi(),wi(),iG.prerender=function(h,b){return new Promise(function(y,k){var F=b?b.onHeaders:void 0,L;F&&(L=function(bA){F(new Headers(bA))});var K=kf(b?b.identifierPrefix:void 0,b?b.unstable_externalRuntimeSrc:void 0,b?b.bootstrapScriptContent:void 0,b?b.bootstrapScripts:void 0,b?b.bootstrapModules:void 0),cA=Ki(h,K,$d(K,void 0,b?b.unstable_externalRuntimeSrc:void 0,b?b.importMap:void 0,L,b?b.maxHeadersLength:void 0),Nc(b?b.namespaceURI:void 0),b?b.progressiveChunkSize:void 0,b?b.onError:void 0,function(){var bA=new ReadableStream({type:"bytes",pull:function(pA){ia(cA,pA)},cancel:function(pA){cA.destination=null,Zr(cA,pA)}},{highWaterMark:0});bA={postponed:ac(cA),prelude:bA},y(bA)},void 0,void 0,k,b?b.onPostpone:void 0);if(b&&b.signal){var sA=b.signal;if(sA.aborted)Zr(cA,sA.reason);else{var gA=function(){Zr(cA,sA.reason),sA.removeEventListener("abort",gA)};sA.addEventListener("abort",gA)}}Yr(cA)})},iG.renderToReadableStream=function(h,b){return new Promise(function(y,k){var F,L,K=new Promise(function(OA,fe){L=OA,F=fe}),cA=b?b.onHeaders:void 0,sA;cA&&(sA=function(OA){cA(new Headers(OA))});var gA=kf(b?b.identifierPrefix:void 0,b?b.unstable_externalRuntimeSrc:void 0,b?b.bootstrapScriptContent:void 0,b?b.bootstrapScripts:void 0,b?b.bootstrapModules:void 0),bA=Ko(h,gA,$d(gA,b?b.nonce:void 0,b?b.unstable_externalRuntimeSrc:void 0,b?b.importMap:void 0,sA,b?b.maxHeadersLength:void 0),Nc(b?b.namespaceURI:void 0),b?b.progressiveChunkSize:void 0,b?b.onError:void 0,L,function(){var OA=new ReadableStream({type:"bytes",pull:function(fe){ia(bA,fe)},cancel:function(fe){bA.destination=null,Zr(bA,fe)}},{highWaterMark:0});OA.allReady=K,y(OA)},function(OA){K.catch(function(){}),k(OA)},F,b?b.onPostpone:void 0,b?b.formState:void 0);if(b&&b.signal){var pA=b.signal;if(pA.aborted)Zr(bA,pA.reason);else{var XA=function(){Zr(bA,pA.reason),pA.removeEventListener("abort",XA)};pA.addEventListener("abort",XA)}}Yr(bA)})},iG.resume=function(h,b,y){return new Promise(function(k,F){var L,K,cA=new Promise(function(pA,XA){K=pA,L=XA}),sA=Ta(h,b,$d(b.resumableState,y?y.nonce:void 0,void 0,void 0,void 0,void 0),y?y.onError:void 0,K,function(){var pA=new ReadableStream({type:"bytes",pull:function(XA){ia(sA,XA)},cancel:function(XA){sA.destination=null,Zr(sA,XA)}},{highWaterMark:0});pA.allReady=cA,k(pA)},function(pA){cA.catch(function(){}),F(pA)},L,y?y.onPostpone:void 0);if(y&&y.signal){var gA=y.signal;if(gA.aborted)Zr(sA,gA.reason);else{var bA=function(){Zr(sA,gA.reason),gA.removeEventListener("abort",bA)};gA.addEventListener("abort",bA)}}Yr(sA)})},iG.resumeAndPrerender=function(h,b,y){return new Promise(function(k,F){var L=ji(h,b,$d(b.resumableState,void 0,void 0,void 0,void 0,void 0),y?y.onError:void 0,function(){var sA=new ReadableStream({type:"bytes",pull:function(gA){ia(L,gA)},cancel:function(gA){L.destination=null,Zr(L,gA)}},{highWaterMark:0});sA={postponed:ac(L),prelude:sA},k(sA)},void 0,void 0,F,y?y.onPostpone:void 0);if(y&&y.signal){var K=y.signal;if(K.aborted)Zr(L,K.reason);else{var cA=function(){Zr(L,K.reason),K.removeEventListener("abort",cA)};K.addEventListener("abort",cA)}}Yr(L)})},iG.version="19.2.4",iG}var gM;function zK(){if(gM)return aG;gM=1;var e,A;return e=WK(),A=NK(),aG.version=e.version,aG.renderToString=e.renderToString,aG.renderToStaticMarkup=e.renderToStaticMarkup,aG.renderToReadableStream=A.renderToReadableStream,aG.resume=A.resume,aG}var LK=zK(),LE={exports:{}},XE,dM;function XK(){if(dM)return XE;dM=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return XE=e,XE}var OE,uM;function OK(){if(uM)return OE;uM=1;var e=XK();function A(){}function t(){}return t.resetWarningCache=A,OE=function(){function n(a,o,c,l,g,u){if(u!==e){var f=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 f.name="Invariant Violation",f}}n.isRequired=n;function s(){return n}var r={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:A};return r.PropTypes=r,r},OE}var GM;function JK(){return GM||(GM=1,LE.exports=OK()()),LE.exports}var KK=JK();const Ae=Ad(KK);var jK=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fM(e,A){return e(A={exports:{}},A.exports),A.exports}var _K=fM((function(e){(function(A){var t=function(E,Z,M){if(!c(Z)||g(Z)||u(Z)||f(Z)||o(Z))return Z;var S,x=0,D=0;if(l(Z))for(S=[],D=Z.length;x<D;x++)S.push(t(E,Z[x],M));else for(var V in S={},Z)Object.prototype.hasOwnProperty.call(Z,V)&&(S[E(V,M)]=t(E,Z[V],M));return S},n=function(E){return w(E)?E:(E=E.replace(/[\-_\s]+(.)?/g,(function(Z,M){return M?M.toUpperCase():""}))).substr(0,1).toLowerCase()+E.substr(1)},s=function(E){var Z=n(E);return Z.substr(0,1).toUpperCase()+Z.substr(1)},r=function(E,Z){return(function(M,S){var x=(S=S||{}).separator||"_",D=S.split||/(?=[A-Z])/;return M.split(D).join(x)})(E,Z).toLowerCase()},a=Object.prototype.toString,o=function(E){return typeof E=="function"},c=function(E){return E===Object(E)},l=function(E){return a.call(E)=="[object Array]"},g=function(E){return a.call(E)=="[object Date]"},u=function(E){return a.call(E)=="[object RegExp]"},f=function(E){return a.call(E)=="[object Boolean]"},w=function(E){return(E-=0)==E},v=function(E,Z){var M=Z&&"process"in Z?Z.process:Z;return typeof M!="function"?E:function(S,x){return M(S,E,x)}},H={camelize:n,decamelize:r,pascalize:s,depascalize:r,camelizeKeys:function(E,Z){return t(v(n,Z),E)},decamelizeKeys:function(E,Z){return t(v(r,Z),E,Z)},pascalizeKeys:function(E,Z){return t(v(s,Z),E)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=H:A.humps=H})(jK)})).decamelize,qK=function(e){if(Array.isArray(e))return e},$K=function(e,A){if(typeof Symbol<"u"&&Symbol.iterator in Object(e)){var t=[],n=!0,s=!1,r=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done)&&(t.push(a.value),!A||t.length!==A);n=!0);}catch(c){s=!0,r=c}finally{try{n||o.return==null||o.return()}finally{if(s)throw r}}return t}},hM=function(e,A){(A==null||A>e.length)&&(A=e.length);for(var t=0,n=new Array(A);t<A;t++)n[t]=e[t];return n},Aj=function(e,A){if(e){if(typeof e=="string")return hM(e,A);var t=Object.prototype.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?hM(e,A):void 0}},ej=function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
54
54
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},tj=function(e,A){return qK(e)||$K(e,A)||Aj(e,A)||ej()},wM=fM((function(e){function A(){return e.exports=A=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r])}return t},A.apply(this,arguments)}e.exports=A})),nj=function(e,A){if(e==null)return{};var t,n,s={},r=Object.keys(e);for(n=0;n<r.length;n++)t=r[n],A.indexOf(t)>=0||(s[t]=e[t]);return s},QM=function(e,A){if(e==null)return{};var t,n,s=nj(e,A);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)t=r[n],A.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s},sj=R.createContext(null);function bM(e){var A=e.children,t=A===void 0?"":A,n=QM(e,["children"]);return typeof t!="string"&&(t=LK.renderToString(t)),j.createElement("template",wM({},n,{dangerouslySetInnerHTML:{__html:t}}))}function CM(e){var A=e.root,t=e.children;return zE.createPortal(t===void 0?null:t,A)}function rj(e){var A=R.forwardRef((function(t,n){var s,r,a=t.mode,o=a===void 0?"open":a,c=t.delegatesFocus,l=c!==void 0&&c,g=t.styleSheets,u=g===void 0?[]:g,f=t.ssr,w=f!==void 0&&f,v=t.children,H=QM(t,["mode","delegatesFocus","styleSheets","ssr","children"]),E=(r=R.useRef((s=n)&&s.current),R.useEffect((function(){s&&(s.current=r.current)}),[s]),r),Z=R.useState(null),M=tj(Z,2),S=M[0],x=M[1],D="node_".concat(o).concat(l);return R.useLayoutEffect((function(){if(E.current)try{if(typeof n=="function"&&n(E.current),w){var V=E.current.shadowRoot;return void x(V)}var W=E.current.attachShadow({mode:o,delegatesFocus:l});u.length>0&&(W.adoptedStyleSheets=u),x(W)}catch(z){(function(eA){var $=eA.error,rA=eA.styleSheets,iA=eA.root;if($.name==="NotSupportedError")rA.length>0&&(iA.adoptedStyleSheets=rA);else throw $})({error:z,styleSheets:u,root:S})}}),[n,E,u]),j.createElement(j.Fragment,null,j.createElement(e.tag,wM({key:D,ref:E},H),(S||w)&&j.createElement(sj.Provider,{value:S},w?j.createElement(bM,{shadowroot:o,shadowrootmode:o},e.render({root:S,ssr:w,children:v})):j.createElement(CM,{root:S},e.render({root:S,ssr:w,children:v})))))}));return A.propTypes={mode:Ae.oneOf(["open","closed"]),delegatesFocus:Ae.bool,styleSheets:Ae.arrayOf(Ae.instanceOf(globalThis.CSSStyleSheet)),ssr:Ae.bool,children:Ae.node},A}bM.propTypes={children:Ae.oneOfType([Ae.string,Ae.node])},CM.propTypes={root:Ae.object.isRequired,children:Ae.node};var JE=new Map;function aj(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(n){return n.children};return new Proxy(e,{get:function(n,s){var r=_K(s,{separator:"-"}),a="".concat(A,"-").concat(r);return JE.has(a)||JE.set(a,rj({tag:r,render:t})),JE.get(a)}})}var ij=aj();function vM(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function oj(e={}){let{initialEntries:A=["/"],initialIndex:t,v5Compat:n=!1}=e,s;s=A.map((w,v)=>g(w,typeof w=="string"?null:w.state,v===0?"default":void 0,typeof w=="string"?void 0:w.unstable_mask));let r=c(t??s.length-1),a="POP",o=null;function c(w){return Math.min(Math.max(w,0),s.length-1)}function l(){return s[r]}function g(w,v=null,H,E){let Z=cj(s?l().pathname:"/",w,v,H,E);return eB(Z.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(w)}`),Z}function u(w){return typeof w=="string"?w:dI(w)}return{get index(){return r},get action(){return a},get location(){return l()},createHref:u,createURL(w){return new URL(u(w),"http://localhost")},encodeLocation(w){let v=typeof w=="string"?oG(w):w;return{pathname:v.pathname||"",search:v.search||"",hash:v.hash||""}},push(w,v){a="PUSH";let H=vM(w)?w:g(w,v);r+=1,s.splice(r,s.length,H),n&&o&&o({action:a,location:H,delta:1})},replace(w,v){a="REPLACE";let H=vM(w)?w:g(w,v);s[r]=H,n&&o&&o({action:a,location:H,delta:0})},go(w){a="POP";let v=c(r+w),H=s[v];r=v,o&&o({action:a,location:H,delta:w})},listen(w){return o=w,()=>{o=null}}}}function As(e,A){if(e===!1||e===null||typeof e>"u")throw new Error(A)}function eB(e,A){if(!e){typeof console<"u"&&console.warn(A);try{throw new Error(A)}catch{}}}function Bj(){return Math.random().toString(36).substring(2,10)}function cj(e,A,t=null,n,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof A=="string"?oG(A):A,state:t,key:A&&A.key||n||Bj(),unstable_mask:s}}function dI({pathname:e="/",search:A="",hash:t=""}){return A&&A!=="?"&&(e+=A.charAt(0)==="?"?A:"?"+A),t&&t!=="#"&&(e+=t.charAt(0)==="#"?t:"#"+t),e}function oG(e){let A={};if(e){let t=e.indexOf("#");t>=0&&(A.hash=e.substring(t),e=e.substring(0,t));let n=e.indexOf("?");n>=0&&(A.search=e.substring(n),e=e.substring(0,n)),e&&(A.pathname=e)}return A}function IM(e,A,t="/"){return lj(e,A,t,!1)}function lj(e,A,t,n){let s=typeof A=="string"?oG(A):A,r=Hl(s.pathname||"/",t);if(r==null)return null;let a=pM(e);gj(a);let o=null;for(let c=0;o==null&&c<a.length;++c){let l=Ij(r);o=Cj(a[c],l,n)}return o}function pM(e,A=[],t=[],n="",s=!1){let r=(a,o,c=s,l)=>{let g={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(n)&&c)return;As(g.relativePath.startsWith(n),`Absolute route path "${g.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(n.length)}let u=uc([n,g.relativePath]),f=t.concat(g);a.children&&a.children.length>0&&(As(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),pM(a.children,A,f,u,c)),!(a.path==null&&!a.index)&&A.push({path:u,score:Qj(u,a.index),routesMeta:f})};return e.forEach((a,o)=>{if(a.path===""||!a.path?.includes("?"))r(a,o);else for(let c of HM(a.path))r(a,o,!0,c)}),A}function HM(e){let A=e.split("/");if(A.length===0)return[];let[t,...n]=A,s=t.endsWith("?"),r=t.replace(/\?$/,"");if(n.length===0)return s?[r,""]:[r];let a=HM(n.join("/")),o=[];return o.push(...a.map(c=>c===""?r:[r,c].join("/"))),s&&o.push(...a),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function gj(e){e.sort((A,t)=>A.score!==t.score?t.score-A.score:bj(A.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}var dj=/^:[\w-]+$/,uj=3,Gj=2,fj=1,hj=10,wj=-2,mM=e=>e==="*";function Qj(e,A){let t=e.split("/"),n=t.length;return t.some(mM)&&(n+=wj),A&&(n+=Gj),t.filter(s=>!mM(s)).reduce((s,r)=>s+(dj.test(r)?uj:r===""?fj:hj),n)}function bj(e,A){return e.length===A.length&&e.slice(0,-1).every((n,s)=>n===A[s])?e[e.length-1]-A[A.length-1]:0}function Cj(e,A,t=!1){let{routesMeta:n}=e,s={},r="/",a=[];for(let o=0;o<n.length;++o){let c=n[o],l=o===n.length-1,g=r==="/"?A:A.slice(r.length)||"/",u=uI({path:c.relativePath,caseSensitive:c.caseSensitive,end:l},g),f=c.route;if(!u&&l&&t&&!n[n.length-1].route.index&&(u=uI({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},g)),!u)return null;Object.assign(s,u.params),a.push({params:s,pathname:uc([r,u.pathname]),pathnameBase:Ej(uc([r,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(r=uc([r,u.pathnameBase]))}return a}function uI(e,A){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[t,n]=vj(e.path,e.caseSensitive,e.end),s=A.match(t);if(!s)return null;let r=s[0],a=r.replace(/(.)\/+$/,"$1"),o=s.slice(1);return{params:n.reduce((l,{paramName:g,isOptional:u},f)=>{if(g==="*"){let v=o[f]||"";a=r.slice(0,r.length-v.length).replace(/(.)\/+$/,"$1")}const w=o[f];return u&&!w?l[g]=void 0:l[g]=(w||"").replace(/%2F/g,"/"),l},{}),pathname:r,pathnameBase:a,pattern:e}}function vj(e,A=!1,t=!0){eB(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,c,l,g)=>{if(n.push({paramName:o,isOptional:c!=null}),c){let u=g.charAt(l+a.length);return u&&u!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,A?void 0:"i"),n]}function Ij(e){try{return e.split("/").map(A=>decodeURIComponent(A).replace(/\//g,"%2F")).join("/")}catch(A){return eB(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${A}).`),e}}function Hl(e,A){if(A==="/")return e;if(!e.toLowerCase().startsWith(A.toLowerCase()))return null;let t=A.endsWith("/")?A.length-1:A.length,n=e.charAt(t);return n&&n!=="/"?null:e.slice(t)||"/"}var pj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Hj(e,A="/"){let{pathname:t,search:n="",hash:s=""}=typeof e=="string"?oG(e):e,r;return t?(t=t.replace(/\/\/+/g,"/"),t.startsWith("/")?r=EM(t.substring(1),"/"):r=EM(t,A)):r=A,{pathname:r,search:yj(n),hash:Yj(s)}}function EM(e,A){let t=A.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?t.length>1&&t.pop():s!=="."&&t.push(s)}),t.length>1?t.join("/"):"/"}function KE(e,A,t,n){return`Cannot include a '${e}' character in a manually specified \`to.${A}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function mj(e){return e.filter((A,t)=>t===0||A.route.path&&A.route.path.length>0)}function yM(e){let A=mj(e);return A.map((t,n)=>n===A.length-1?t.pathname:t.pathnameBase)}function jE(e,A,t,n=!1){let s;typeof e=="string"?s=oG(e):(s={...e},As(!s.pathname||!s.pathname.includes("?"),KE("?","pathname","search",s)),As(!s.pathname||!s.pathname.includes("#"),KE("#","pathname","hash",s)),As(!s.search||!s.search.includes("#"),KE("#","search","hash",s)));let r=e===""||s.pathname==="",a=r?"/":s.pathname,o;if(a==null)o=t;else{let u=A.length-1;if(!n&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),u-=1;s.pathname=f.join("/")}o=u>=0?A[u]:"/"}let c=Hj(s,o),l=a&&a!=="/"&&a.endsWith("/"),g=(r||a===".")&&t.endsWith("/");return!c.pathname.endsWith("/")&&(l||g)&&(c.pathname+="/"),c}var uc=e=>e.join("/").replace(/\/\/+/g,"/"),Ej=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),yj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Yj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Zj=class{constructor(e,A,t,n=!1){this.status=e,this.statusText=A||"",this.internal=n,t instanceof Error?(this.data=t.toString(),this.error=t):this.data=t}};function kj(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Uj(e){return e.map(A=>A.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var YM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ZM(e,A){let t=e;if(typeof t!="string"||!pj.test(t))return{absoluteURL:void 0,isExternal:!1,to:t};let n=t,s=!1;if(YM)try{let r=new URL(window.location.href),a=t.startsWith("//")?new URL(r.protocol+t):new URL(t),o=Hl(a.pathname,A);a.origin===r.origin&&o!=null?t=o+a.search+a.hash:s=!0}catch{eB(!1,`<Link to="${t}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:s,to:t}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var kM=["POST","PUT","PATCH","DELETE"];new Set(kM);var Dj=["GET",...kM];new Set(Dj);var dh=R.createContext(null);dh.displayName="DataRouter";var GI=R.createContext(null);GI.displayName="DataRouterState";var UM=R.createContext(!1);function Fj(){return R.useContext(UM)}var DM=R.createContext({isTransitioning:!1});DM.displayName="ViewTransition";var Mj=R.createContext(new Map);Mj.displayName="Fetchers";var xj=R.createContext(null);xj.displayName="Await";var co=R.createContext(null);co.displayName="Navigation";var DQ=R.createContext(null);DQ.displayName="Location";var ml=R.createContext({outlet:null,matches:[],isDataRoute:!1});ml.displayName="Route";var _E=R.createContext(null);_E.displayName="RouteError";var FM="REACT_ROUTER_ERROR",Pj="REDIRECT",Tj="ROUTE_ERROR_RESPONSE";function Rj(e){if(e.startsWith(`${FM}:${Pj}:{`))try{let A=JSON.parse(e.slice(28));if(typeof A=="object"&&A&&typeof A.status=="number"&&typeof A.statusText=="string"&&typeof A.location=="string"&&typeof A.reloadDocument=="boolean"&&typeof A.replace=="boolean")return A}catch{}}function Sj(e){if(e.startsWith(`${FM}:${Tj}:{`))try{let A=JSON.parse(e.slice(40));if(typeof A=="object"&&A&&typeof A.status=="number"&&typeof A.statusText=="string")return new Zj(A.status,A.statusText,A.data)}catch{}}function Vj(e,{relative:A}={}){As(FQ(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:n}=R.useContext(co),{hash:s,pathname:r,search:a}=MQ(e,{relative:A}),o=r;return t!=="/"&&(o=r==="/"?t:uc([t,r])),n.createHref({pathname:o,search:a,hash:s})}function FQ(){return R.useContext(DQ)!=null}function tB(){return As(FQ(),"useLocation() may be used only in the context of a <Router> component."),R.useContext(DQ).location}var MM="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function xM(e){R.useContext(co).static||R.useLayoutEffect(e)}function za(){let{isDataRoute:e}=R.useContext(ml);return e?A_():Wj()}function Wj(){As(FQ(),"useNavigate() may be used only in the context of a <Router> component.");let e=R.useContext(dh),{basename:A,navigator:t}=R.useContext(co),{matches:n}=R.useContext(ml),{pathname:s}=tB(),r=JSON.stringify(yM(n)),a=R.useRef(!1);return xM(()=>{a.current=!0}),R.useCallback((c,l={})=>{if(eB(a.current,MM),!a.current)return;if(typeof c=="number"){t.go(c);return}let g=jE(c,JSON.parse(r),s,l.relative==="path");e==null&&A!=="/"&&(g.pathname=g.pathname==="/"?A:uc([A,g.pathname])),(l.replace?t.replace:t.push)(g,l.state,l)},[A,t,r,s,e])}R.createContext(null);function MQ(e,{relative:A}={}){let{matches:t}=R.useContext(ml),{pathname:n}=tB(),s=JSON.stringify(yM(t));return R.useMemo(()=>jE(e,JSON.parse(s),n,A==="path"),[e,s,n,A])}function Nj(e,A){return PM(e,A)}function PM(e,A,t){As(FQ(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=R.useContext(co),{matches:s}=R.useContext(ml),r=s[s.length-1],a=r?r.params:{},o=r?r.pathname:"/",c=r?r.pathnameBase:"/",l=r&&r.route;{let E=l&&l.path||"";SM(o,!l||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${o}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
55
55
|
|
|
56
|
-
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let g=tB(),u;if(A){let E=typeof A=="string"?oG(A):A;As(c==="/"||E.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${E.pathname}" was given in the \`location\` prop.`),u=E}else u=g;let f=u.pathname||"/",w=f;if(c!=="/"){let E=c.replace(/^\//,"").split("/");w="/"+f.replace(/^\//,"").split("/").slice(E.length).join("/")}let v=IM(e,{pathname:w});eB(l||v!=null,`No routes matched location "${u.pathname}${u.search}${u.hash}" `),eB(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${u.pathname}${u.search}${u.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let H=Jj(v&&v.map(E=>Object.assign({},E,{params:Object.assign({},a,E.params),pathname:uc([c,n.encodeLocation?n.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?c:uc([c,n.encodeLocation?n.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),s,t);return A&&H?R.createElement(DQ.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...u},navigationType:"POP"}},H):H}function zj(){let e=$j(),A=kj(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},r={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=R.createElement(R.Fragment,null,R.createElement("p",null,"💿 Hey developer 👋"),R.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",R.createElement("code",{style:r},"ErrorBoundary")," or"," ",R.createElement("code",{style:r},"errorElement")," prop on your route.")),R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},A),t?R.createElement("pre",{style:s},t):null,a)}var Lj=R.createElement(zj,null),TM=class extends R.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,A){return A.location!==e.location||A.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:A.error,location:A.location,revalidation:e.revalidation||A.revalidation}}componentDidCatch(e,A){this.props.onError?this.props.onError(e,A):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const t=Sj(e.digest);t&&(e=t)}let A=e!==void 0?R.createElement(ml.Provider,{value:this.props.routeContext},R.createElement(_E.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?R.createElement(Xj,{error:e},A):A}};TM.contextType=UM;var qE=new WeakMap;function Xj({children:e,error:A}){let{basename:t}=R.useContext(co);if(typeof A=="object"&&A&&"digest"in A&&typeof A.digest=="string"){let n=Rj(A.digest);if(n){let s=qE.get(A);if(s)throw s;let r=ZM(n.location,t);if(YM&&!qE.get(A))if(r.isExternal||n.reloadDocument)window.location.href=r.absoluteURL||r.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(r.to,{replace:n.replace}));throw qE.set(A,a),a}return R.createElement("meta",{httpEquiv:"refresh",content:`0;url=${r.absoluteURL||r.to}`})}}return e}function Oj({routeContext:e,match:A,children:t}){let n=R.useContext(dh);return n&&n.static&&n.staticContext&&(A.route.errorElement||A.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=A.route.id),R.createElement(ml.Provider,{value:e},t)}function Jj(e,A=[],t){let n=t?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(A.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,r=n?.errors;if(r!=null){let g=s.findIndex(u=>u.route.id&&r?.[u.route.id]!==void 0);As(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(r).join(",")}`),s=s.slice(0,Math.min(s.length,g+1))}let a=!1,o=-1;if(t&&n){a=n.renderFallback;for(let g=0;g<s.length;g++){let u=s[g];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(o=g),u.route.id){let{loaderData:f,errors:w}=n,v=u.route.loader&&!f.hasOwnProperty(u.route.id)&&(!w||w[u.route.id]===void 0);if(u.route.lazy||v){t.isStatic&&(a=!0),o>=0?s=s.slice(0,o+1):s=[s[0]];break}}}}let c=t?.onError,l=n&&c?(g,u)=>{c(g,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Uj(n.matches),errorInfo:u})}:void 0;return s.reduceRight((g,u,f)=>{let w,v=!1,H=null,E=null;n&&(w=r&&u.route.id?r[u.route.id]:void 0,H=u.route.errorElement||Lj,a&&(o<0&&f===0?(SM("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,E=null):o===f&&(v=!0,E=u.route.hydrateFallbackElement||null)));let Z=A.concat(s.slice(0,f+1)),M=()=>{let S;return w?S=H:v?S=E:u.route.Component?S=R.createElement(u.route.Component,null):u.route.element?S=u.route.element:S=g,R.createElement(Oj,{match:u,routeContext:{outlet:g,matches:Z,isDataRoute:n!=null},children:S})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?R.createElement(TM,{location:n.location,revalidation:n.revalidation,component:H,error:w,children:M(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:l}):M()},null)}function $E(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kj(e){let A=R.useContext(dh);return As(A,$E(e)),A}function jj(e){let A=R.useContext(GI);return As(A,$E(e)),A}function _j(e){let A=R.useContext(ml);return As(A,$E(e)),A}function A3(e){let A=_j(e),t=A.matches[A.matches.length-1];return As(t.route.id,`${e} can only be used on routes that contain a unique "id"`),t.route.id}function qj(){return A3("useRouteId")}function $j(){let e=R.useContext(_E),A=jj("useRouteError"),t=A3("useRouteError");return e!==void 0?e:A.errors?.[t]}function A_(){let{router:e}=Kj("useNavigate"),A=A3("useNavigate"),t=R.useRef(!1);return xM(()=>{t.current=!0}),R.useCallback(async(s,r={})=>{eB(t.current,MM),t.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:A,...r}))},[e,A])}var RM={};function SM(e,A,t){!A&&!RM[e]&&(RM[e]=!0,eB(!1,t))}R.memo(e_);function e_({routes:e,future:A,state:t,isStatic:n,onError:s}){return PM(e,void 0,{state:t,isStatic:n,onError:s})}function t_({basename:e,children:A,initialEntries:t,initialIndex:n,unstable_useTransitions:s}){let r=R.useRef();r.current==null&&(r.current=oj({initialEntries:t,initialIndex:n,v5Compat:!0}));let a=r.current,[o,c]=R.useState({action:a.action,location:a.location}),l=R.useCallback(g=>{s===!1?c(g):R.startTransition(()=>c(g))},[s]);return R.useLayoutEffect(()=>a.listen(l),[a,l]),R.createElement(n_,{basename:e,children:A,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:s})}function Gc(e){As(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function n_({basename:e="/",children:A=null,location:t,navigationType:n="POP",navigator:s,static:r=!1,unstable_useTransitions:a}){As(!FQ(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),c=R.useMemo(()=>({basename:o,navigator:s,static:r,unstable_useTransitions:a,future:{}}),[o,s,r,a]);typeof t=="string"&&(t=oG(t));let{pathname:l="/",search:g="",hash:u="",state:f=null,key:w="default",unstable_mask:v}=t,H=R.useMemo(()=>{let E=Hl(l,o);return E==null?null:{location:{pathname:E,search:g,hash:u,state:f,key:w,unstable_mask:v},navigationType:n}},[o,l,g,u,f,w,n,v]);return eB(H!=null,`<Router basename="${o}"> is not able to match the URL "${l}${g}${u}" because it does not start with the basename, so the <Router> won't render anything.`),H==null?null:R.createElement(co.Provider,{value:c},R.createElement(DQ.Provider,{children:A,value:H}))}function s_({children:e,location:A}){return Nj(e3(e),A)}function e3(e,A=[]){let t=[];return R.Children.forEach(e,(n,s)=>{if(!R.isValidElement(n))return;let r=[...A,s];if(n.type===R.Fragment){t.push.apply(t,e3(n.props.children,r));return}As(n.type===Gc,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),As(!n.props.index||!n.props.children,"An index route cannot have child routes.");let a={id:n.props.id||r.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=e3(n.props.children,r)),t.push(a)}),t}var fI="get",hI="application/x-www-form-urlencoded";function wI(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function r_(e){return wI(e)&&e.tagName.toLowerCase()==="button"}function a_(e){return wI(e)&&e.tagName.toLowerCase()==="form"}function i_(e){return wI(e)&&e.tagName.toLowerCase()==="input"}function o_(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function B_(e,A){return e.button===0&&(!A||A==="_self")&&!o_(e)}var QI=null;function c_(){if(QI===null)try{new FormData(document.createElement("form"),0),QI=!1}catch{QI=!0}return QI}var l_=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function t3(e){return e!=null&&!l_.has(e)?(eB(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${hI}"`),null):e}function g_(e,A){let t,n,s,r,a;if(a_(e)){let o=e.getAttribute("action");n=o?Hl(o,A):null,t=e.getAttribute("method")||fI,s=t3(e.getAttribute("enctype"))||hI,r=new FormData(e)}else if(r_(e)||i_(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||o.getAttribute("action");if(n=c?Hl(c,A):null,t=e.getAttribute("formmethod")||o.getAttribute("method")||fI,s=t3(e.getAttribute("formenctype"))||t3(o.getAttribute("enctype"))||hI,r=new FormData(o,e),!c_()){let{name:l,type:g,value:u}=e;if(g==="image"){let f=l?`${l}.`:"";r.append(`${f}x`,"0"),r.append(`${f}y`,"0")}else l&&r.append(l,u)}}else{if(wI(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=fI,n=null,s=hI,a=e}return r&&s==="text/plain"&&(a=r,r=void 0),{action:n,method:t.toLowerCase(),encType:s,formData:r,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function n3(e,A){if(e===!1||e===null||typeof e>"u")throw new Error(A)}function VM(e,A,t,n){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${n}`:s.pathname=`${s.pathname}.${n}`:s.pathname==="/"?s.pathname=`_root.${n}`:A&&Hl(s.pathname,A)==="/"?s.pathname=`${A.replace(/\/$/,"")}/_root.${n}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${n}`,s}async function d_(e,A){if(e.id in A)return A[e.id];try{let t=await import(e.module);return A[e.id]=t,t}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function u_(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function G_(e,A,t){let n=await Promise.all(e.map(async s=>{let r=A.routes[s.route.id];if(r){let a=await d_(r,t);return a.links?a.links():[]}return[]}));return Q_(n.flat(1).filter(u_).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function WM(e,A,t,n,s,r){let a=(c,l)=>t[l]?c.route.id!==t[l].route.id:!0,o=(c,l)=>t[l].pathname!==c.pathname||t[l].route.path?.endsWith("*")&&t[l].params["*"]!==c.params["*"];return r==="assets"?A.filter((c,l)=>a(c,l)||o(c,l)):r==="data"?A.filter((c,l)=>{let g=n.routes[c.route.id];if(!g||!g.hasLoader)return!1;if(a(c,l)||o(c,l))return!0;if(c.route.shouldRevalidate){let u=c.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof u=="boolean")return u}return!0}):[]}function f_(e,A,{includeHydrateFallback:t}={}){return h_(e.map(n=>{let s=A.routes[n.route.id];if(!s)return[];let r=[s.module];return s.clientActionModule&&(r=r.concat(s.clientActionModule)),s.clientLoaderModule&&(r=r.concat(s.clientLoaderModule)),t&&s.hydrateFallbackModule&&(r=r.concat(s.hydrateFallbackModule)),s.imports&&(r=r.concat(s.imports)),r}).flat(1))}function h_(e){return[...new Set(e)]}function w_(e){let A={},t=Object.keys(e).sort();for(let n of t)A[n]=e[n];return A}function Q_(e,A){let t=new Set;return new Set(A),e.reduce((n,s)=>{let r=JSON.stringify(w_(s));return t.has(r)||(t.add(r),n.push({key:r,link:s})),n},[])}function s3(){let e=R.useContext(dh);return n3(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function b_(){let e=R.useContext(GI);return n3(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var r3=R.createContext(void 0);r3.displayName="FrameworkContext";function a3(){let e=R.useContext(r3);return n3(e,"You must render this element inside a <HydratedRouter> element"),e}function C_(e,A){let t=R.useContext(r3),[n,s]=R.useState(!1),[r,a]=R.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:l,onMouseLeave:g,onTouchStart:u}=A,f=R.useRef(null);R.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let H=Z=>{Z.forEach(M=>{a(M.isIntersecting)})},E=new IntersectionObserver(H,{threshold:.5});return f.current&&E.observe(f.current),()=>{E.disconnect()}}},[e]),R.useEffect(()=>{if(n){let H=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(H)}}},[n]);let w=()=>{s(!0)},v=()=>{s(!1),a(!1)};return t?e!=="intent"?[r,f,{}]:[r,f,{onFocus:xQ(o,w),onBlur:xQ(c,v),onMouseEnter:xQ(l,w),onMouseLeave:xQ(g,v),onTouchStart:xQ(u,w)}]:[!1,f,{}]}function xQ(e,A){return t=>{e&&e(t),t.defaultPrevented||A(t)}}function v_({page:e,...A}){let t=Fj(),{router:n}=s3(),s=R.useMemo(()=>IM(n.routes,e,n.basename),[n.routes,e,n.basename]);return s?t?R.createElement(p_,{page:e,matches:s,...A}):R.createElement(H_,{page:e,matches:s,...A}):null}function I_(e){let{manifest:A,routeModules:t}=a3(),[n,s]=R.useState([]);return R.useEffect(()=>{let r=!1;return G_(e,A,t).then(a=>{r||s(a)}),()=>{r=!0}},[e,A,t]),n}function p_({page:e,matches:A,...t}){let n=tB(),{future:s}=a3(),{basename:r}=s3(),a=R.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let o=VM(e,r,s.unstable_trailingSlashAwareDataRequests,"rsc"),c=!1,l=[];for(let g of A)typeof g.route.shouldRevalidate=="function"?c=!0:l.push(g.route.id);return c&&l.length>0&&o.searchParams.set("_routes",l.join(",")),[o.pathname+o.search]},[r,s.unstable_trailingSlashAwareDataRequests,e,n,A]);return R.createElement(R.Fragment,null,a.map(o=>R.createElement("link",{key:o,rel:"prefetch",as:"fetch",href:o,...t})))}function H_({page:e,matches:A,...t}){let n=tB(),{future:s,manifest:r,routeModules:a}=a3(),{basename:o}=s3(),{loaderData:c,matches:l}=b_(),g=R.useMemo(()=>WM(e,A,l,r,n,"data"),[e,A,l,r,n]),u=R.useMemo(()=>WM(e,A,l,r,n,"assets"),[e,A,l,r,n]),f=R.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let H=new Set,E=!1;if(A.forEach(M=>{let S=r.routes[M.route.id];!S||!S.hasLoader||(!g.some(x=>x.route.id===M.route.id)&&M.route.id in c&&a[M.route.id]?.shouldRevalidate||S.hasClientLoader?E=!0:H.add(M.route.id))}),H.size===0)return[];let Z=VM(e,o,s.unstable_trailingSlashAwareDataRequests,"data");return E&&H.size>0&&Z.searchParams.set("_routes",A.filter(M=>H.has(M.route.id)).map(M=>M.route.id).join(",")),[Z.pathname+Z.search]},[o,s.unstable_trailingSlashAwareDataRequests,c,n,r,g,A,e,a]),w=R.useMemo(()=>f_(u,r),[u,r]),v=I_(u);return R.createElement(R.Fragment,null,f.map(H=>R.createElement("link",{key:H,rel:"prefetch",as:"fetch",href:H,...t})),w.map(H=>R.createElement("link",{key:H,rel:"modulepreload",href:H,...t})),v.map(({key:H,link:E})=>R.createElement("link",{key:H,nonce:t.nonce,...E,crossOrigin:E.crossOrigin??t.crossOrigin})))}function m_(...e){return A=>{e.forEach(t=>{typeof t=="function"?t(A):t!=null&&(t.current=A)})}}var E_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{E_&&(window.__reactRouterVersion="7.14.0")}catch{}var NM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bI=R.forwardRef(function({onClick:A,discover:t="render",prefetch:n="none",relative:s,reloadDocument:r,replace:a,unstable_mask:o,state:c,target:l,to:g,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:w,...v},H){let{basename:E,navigator:Z,unstable_useTransitions:M}=R.useContext(co),S=typeof g=="string"&&NM.test(g),x=ZM(g,E);g=x.to;let D=Vj(g,{relative:s}),V=tB(),W=null;if(o){let yA=jE(o,[],V.unstable_mask?V.unstable_mask.pathname:"/",!0);E!=="/"&&(yA.pathname=yA.pathname==="/"?E:uc([E,yA.pathname])),W=Z.createHref(yA)}let[z,eA,$]=C_(n,v),rA=k_(g,{replace:a,unstable_mask:o,state:c,target:l,preventScrollReset:u,relative:s,viewTransition:f,unstable_defaultShouldRevalidate:w,unstable_useTransitions:M});function iA(yA){A&&A(yA),yA.defaultPrevented||rA(yA)}let hA=!(x.isExternal||r),fA=R.createElement("a",{...v,...$,href:(hA?W:void 0)||x.absoluteURL||D,onClick:hA?iA:A,ref:m_(H,eA),target:l,"data-discover":!S&&t==="render"?"true":void 0});return z&&!S?R.createElement(R.Fragment,null,fA,R.createElement(v_,{page:D})):fA});bI.displayName="Link";var y_=R.forwardRef(function({"aria-current":A="page",caseSensitive:t=!1,className:n="",end:s=!1,style:r,to:a,viewTransition:o,children:c,...l},g){let u=MQ(a,{relative:l.relative}),f=tB(),w=R.useContext(GI),{navigator:v,basename:H}=R.useContext(co),E=w!=null&&x_(u)&&o===!0,Z=v.encodeLocation?v.encodeLocation(u).pathname:u.pathname,M=f.pathname,S=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;t||(M=M.toLowerCase(),S=S?S.toLowerCase():null,Z=Z.toLowerCase()),S&&H&&(S=Hl(S,H)||S);const x=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let D=M===Z||!s&&M.startsWith(Z)&&M.charAt(x)==="/",V=S!=null&&(S===Z||!s&&S.startsWith(Z)&&S.charAt(Z.length)==="/"),W={isActive:D,isPending:V,isTransitioning:E},z=D?A:void 0,eA;typeof n=="function"?eA=n(W):eA=[n,D?"active":null,V?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let $=typeof r=="function"?r(W):r;return R.createElement(bI,{...l,"aria-current":z,className:eA,ref:g,style:$,to:a,viewTransition:o},typeof c=="function"?c(W):c)});y_.displayName="NavLink";var Y_=R.forwardRef(({discover:e="render",fetcherKey:A,navigate:t,reloadDocument:n,replace:s,state:r,method:a=fI,action:o,onSubmit:c,relative:l,preventScrollReset:g,viewTransition:u,unstable_defaultShouldRevalidate:f,...w},v)=>{let{unstable_useTransitions:H}=R.useContext(co),E=F_(),Z=M_(o,{relative:l}),M=a.toLowerCase()==="get"?"get":"post",S=typeof o=="string"&&NM.test(o),x=D=>{if(c&&c(D),D.defaultPrevented)return;D.preventDefault();let V=D.nativeEvent.submitter,W=V?.getAttribute("formmethod")||a,z=()=>E(V||D.currentTarget,{fetcherKey:A,method:W,navigate:t,replace:s,state:r,relative:l,preventScrollReset:g,viewTransition:u,unstable_defaultShouldRevalidate:f});H&&t!==!1?R.startTransition(()=>z()):z()};return R.createElement("form",{ref:v,method:M,action:Z,onSubmit:n?c:x,...w,"data-discover":!S&&e==="render"?"true":void 0})});Y_.displayName="Form";function Z_(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zM(e){let A=R.useContext(dh);return As(A,Z_(e)),A}function k_(e,{target:A,replace:t,unstable_mask:n,state:s,preventScrollReset:r,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let g=za(),u=tB(),f=MQ(e,{relative:a});return R.useCallback(w=>{if(B_(w,A)){w.preventDefault();let v=t!==void 0?t:dI(u)===dI(f),H=()=>g(e,{replace:v,unstable_mask:n,state:s,preventScrollReset:r,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:c});l?R.startTransition(()=>H()):H()}},[u,g,f,t,n,s,A,e,r,a,o,c,l])}var U_=0,D_=()=>`__${String(++U_)}__`;function F_(){let{router:e}=zM("useSubmit"),{basename:A}=R.useContext(co),t=qj(),n=e.fetch,s=e.navigate;return R.useCallback(async(r,a={})=>{let{action:o,method:c,encType:l,formData:g,body:u}=g_(r,A);if(a.navigate===!1){let f=a.fetcherKey||D_();await n(f,t,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:g,body:u,formMethod:a.method||c,formEncType:a.encType||l,flushSync:a.flushSync})}else await s(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:g,body:u,formMethod:a.method||c,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:t,flushSync:a.flushSync,viewTransition:a.viewTransition})},[n,s,A,t])}function M_(e,{relative:A}={}){let{basename:t}=R.useContext(co),n=R.useContext(ml);As(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),r={...MQ(e||".",{relative:A})},a=tB();if(e==null){r.search=a.search;let o=new URLSearchParams(r.search),c=o.getAll("index");if(c.some(g=>g==="")){o.delete("index"),c.filter(u=>u).forEach(u=>o.append("index",u));let g=o.toString();r.search=g?`?${g}`:""}}return(!e||e===".")&&s.route.index&&(r.search=r.search?r.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(r.pathname=r.pathname==="/"?t:uc([t,r.pathname])),dI(r)}function x_(e,{relative:A}={}){let t=R.useContext(DM);As(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=zM("useViewTransitionState"),s=MQ(e,{relative:A});if(!t.isTransitioning)return!1;let r=Hl(t.currentLocation.pathname,n)||t.currentLocation.pathname,a=Hl(t.nextLocation.pathname,n)||t.nextLocation.pathname;return uI(s.pathname,a)!=null||uI(s.pathname,r)!=null}const i3="ela@careshiphealth.com",BG="https://ela.careshiphealth.com",CI="https://api.ela.careshiphealth.com",vI=`${CI}/rt`,o3=420,PQ=540,P_=520,nB={FACE_LG_ICON:`${BG}/bolt/faceLg.svg`,AI_ASSISTANT_TALK_ICON:`${BG}/bolt/new/ai-assistant-talk-icon.svg`,AI_ASSISTANT_CHAT_ICON:`${BG}/bolt/new/ai-assistant-chat-icon.svg`,AI_ASSISTANT__CALL_ICON:`${BG}/bolt/new/ai-assistant-call-icon.svg`,AI_ASSISTANT_ICON_BW:`${BG}/bolt/new/ai-assistant-icon-bw.svg`,MINIMIZE_ICON:`${BG}/bolt/new/minimize-icon.svg`,MAXIMIZE_ICON:`${BG}/bolt/new/maximize-icon.svg`},B3="Ela",T_=e=>p.jsxs("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("path",{d:"M14.788 9.48971C14.5248 9.05746 14.1061 8.74231 13.6179 8.60892C13.1297 8.47552 12.609 8.53399 12.1625 8.77233C10.0479 9.9113 8.85588 12.1545 9.63525 14.3233C10.5054 16.7288 11.8175 18.9504 13.5041 20.8736C15.178 22.7934 17.1908 24.3887 19.4421 25.5799C21.4658 26.6469 23.8375 25.7746 25.2439 23.8137C25.5398 23.4011 25.6681 22.8917 25.603 22.3882C25.538 21.8848 25.2843 21.4247 24.8933 21.1009L23.3591 19.8338C23.0516 19.5788 22.6745 19.4221 22.2768 19.384C21.8791 19.346 21.4792 19.4283 21.1288 19.6203L18.456 21.0859L17.857 20.6704C17.1019 20.1437 16.411 19.5305 15.7985 18.8432C15.1987 18.1437 14.6865 17.3736 14.2732 16.55L13.9463 15.9052L15.7449 13.4461C15.9827 13.1198 16.1177 12.73 16.1327 12.3265C16.1477 11.923 16.042 11.5243 15.829 11.1813L14.788 9.48971ZM11.0452 6.69431C12.0219 6.171 13.1616 6.041 14.231 6.33095C15.3004 6.6209 16.2184 7.30884 16.797 8.2538L17.8352 9.94349C18.2934 10.6853 18.5203 11.5468 18.4868 12.4181C18.4533 13.2893 18.161 14.1309 17.6471 14.8353L16.7193 16.1029C16.9446 16.4768 17.2323 16.8985 17.575 17.2949C17.9164 17.6843 18.2917 18.0262 18.6269 18.299L19.9935 17.5482C20.7578 17.1299 21.63 16.9506 22.4973 17.0335C23.3646 17.1164 24.1871 17.4578 24.8582 18.0133L26.3925 19.2804C27.2451 19.9846 27.7986 20.9863 27.9411 22.0829C28.0836 23.1796 27.8044 24.2894 27.1601 25.1881C25.2861 27.8016 21.707 29.439 18.3439 27.665C15.8368 26.3392 13.5952 24.5633 11.7308 22.4261C9.84914 20.2812 8.38523 17.8032 7.41459 15.1201C6.13111 11.5432 8.22187 8.21369 11.0457 6.69662",fill:e?.color||"black"}),p.jsx("path",{d:"M25.026 11.6502L25.3027 11.0139C25.7888 9.88815 26.6795 8.9853 27.7991 8.48354L28.6541 8.10358C28.7574 8.05583 28.8449 7.97955 28.9061 7.88374C28.9674 7.78793 29 7.67659 29 7.56288C29 7.44918 28.9674 7.33784 28.9061 7.24203C28.8449 7.14622 28.7574 7.06993 28.6541 7.02218L27.8464 6.66247C26.6986 6.14642 25.7927 5.21019 25.3151 4.04664L25.0305 3.36093C24.9887 3.25454 24.9158 3.1632 24.8213 3.09882C24.7267 3.03444 24.615 3 24.5006 3C24.3862 3 24.2745 3.03444 24.18 3.09882C24.0854 3.1632 24.0125 3.25454 23.9707 3.36093L23.6861 4.04777C23.208 5.2111 22.3017 6.14692 21.1537 6.66247L20.3471 7.02106C20.2435 7.06867 20.1557 7.14497 20.0942 7.2409C20.0327 7.33684 20 7.44838 20 7.56232C20 7.67626 20.0327 7.78781 20.0942 7.88374C20.1557 7.97967 20.2435 8.05597 20.3471 8.10358L21.201 8.48466C22.3208 8.98593 23.2119 9.88837 23.6985 11.0139L23.9752 11.6502C24.0185 11.7538 24.0914 11.8423 24.1849 11.9045C24.2784 11.9668 24.3883 12 24.5006 12C24.613 12 24.7228 11.9668 24.8163 11.9045C24.9098 11.8423 24.9827 11.7538 25.026 11.6502Z",fill:e?.color||"black"})]}),c3=R.createContext({});function II(e){const A=R.useRef(null);return A.current===null&&(A.current=e()),A.current}const l3=typeof window<"u"?R.useLayoutEffect:R.useEffect,pI=R.createContext(null);function g3(e,A){e.indexOf(A)===-1&&e.push(A)}function HI(e,A){const t=e.indexOf(A);t>-1&&e.splice(t,1)}const fc=(e,A,t)=>t>A?A:t<e?e:t;let d3=()=>{};const ed={},LM=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function XM(e){return typeof e=="object"&&e!==null}const OM=e=>/^0[^.\s]+$/u.test(e);function JM(e){let A;return()=>(A===void 0&&(A=e()),A)}const lo=e=>e,R_=(e,A)=>t=>A(e(t)),TQ=(...e)=>e.reduce(R_),RQ=(e,A,t)=>{const n=A-e;return n===0?1:(t-e)/n};class u3{constructor(){this.subscriptions=[]}add(A){return g3(this.subscriptions,A),()=>HI(this.subscriptions,A)}notify(A,t,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](A,t,n);else for(let r=0;r<s;r++){const a=this.subscriptions[r];a&&a(A,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Hi=e=>e*1e3,go=e=>e/1e3;function KM(e,A){return A?e*(1e3/A):0}const jM=(e,A,t)=>(((1-3*t+3*A)*e+(3*t-6*A))*e+3*A)*e,S_=1e-7,V_=12;function W_(e,A,t,n,s){let r,a,o=0;do a=A+(t-A)/2,r=jM(a,n,s)-e,r>0?t=a:A=a;while(Math.abs(r)>S_&&++o<V_);return a}function SQ(e,A,t,n){if(e===A&&t===n)return lo;const s=r=>W_(r,0,1,e,t);return r=>r===0||r===1?r:jM(s(r),A,n)}const _M=e=>A=>A<=.5?e(2*A)/2:(2-e(2*(1-A)))/2,qM=e=>A=>1-e(1-A),$M=SQ(.33,1.53,.69,.99),G3=qM($M),Ax=_M(G3),ex=e=>e>=1?1:(e*=2)<1?.5*G3(e):.5*(2-Math.pow(2,-10*(e-1))),f3=e=>1-Math.sin(Math.acos(e)),tx=qM(f3),nx=_M(f3),N_=SQ(.42,0,1,1),z_=SQ(0,0,.58,1),sx=SQ(.42,0,.58,1),L_=e=>Array.isArray(e)&&typeof e[0]!="number",rx=e=>Array.isArray(e)&&typeof e[0]=="number",X_={linear:lo,easeIn:N_,easeInOut:sx,easeOut:z_,circIn:f3,circInOut:nx,circOut:tx,backIn:G3,backInOut:Ax,backOut:$M,anticipate:ex},O_=e=>typeof e=="string",ax=e=>{if(rx(e)){d3(e.length===4);const[A,t,n,s]=e;return SQ(A,t,n,s)}else if(O_(e))return X_[e];return e},mI=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function J_(e,A){let t=new Set,n=new Set,s=!1,r=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(g){a.has(g)&&(l.schedule(g),e()),g(o)}const l={schedule:(g,u=!1,f=!1)=>{const v=f&&s?t:n;return u&&a.add(g),v.add(g),g},cancel:g=>{n.delete(g),a.delete(g)},process:g=>{if(o=g,s){r=!0;return}s=!0;const u=t;t=n,n=u,t.forEach(c),t.clear(),s=!1,r&&(r=!1,l.process(g))}};return l}const K_=40;function ix(e,A){let t=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>t=!0,a=mI.reduce((S,x)=>(S[x]=J_(r),S),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:g,update:u,preRender:f,render:w,postRender:v}=a,H=()=>{const S=ed.useManualTiming,x=S?s.timestamp:performance.now();t=!1,S||(s.delta=n?1e3/60:Math.max(Math.min(x-s.timestamp,K_),1)),s.timestamp=x,s.isProcessing=!0,o.process(s),c.process(s),l.process(s),g.process(s),u.process(s),f.process(s),w.process(s),v.process(s),s.isProcessing=!1,t&&A&&(n=!1,e(H))},E=()=>{t=!0,n=!0,s.isProcessing||e(H)};return{schedule:mI.reduce((S,x)=>{const D=a[x];return S[x]=(V,W=!1,z=!1)=>(t||E(),D.schedule(V,W,z)),S},{}),cancel:S=>{for(let x=0;x<mI.length;x++)a[mI[x]].cancel(S)},state:s,steps:a}}const{schedule:Bn,cancel:td,state:Ur,steps:h3}=ix(typeof requestAnimationFrame<"u"?requestAnimationFrame:lo,!0);let EI;function j_(){EI=void 0}const ca={now:()=>(EI===void 0&&ca.set(Ur.isProcessing||ed.useManualTiming?Ur.timestamp:performance.now()),EI),set:e=>{EI=e,queueMicrotask(j_)}},ox=e=>A=>typeof A=="string"&&A.startsWith(e),Bx=ox("--"),__=ox("var(--"),w3=e=>__(e)?q_.test(e.split("/*")[0].trim()):!1,q_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function cx(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const uh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},VQ={...uh,transform:e=>fc(0,1,e)},yI={...uh,default:1},WQ=e=>Math.round(e*1e5)/1e5,Q3=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $_(e){return e==null}const A6=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,b3=(e,A)=>t=>!!(typeof t=="string"&&A6.test(t)&&t.startsWith(e)||A&&!$_(t)&&Object.prototype.hasOwnProperty.call(t,A)),lx=(e,A,t)=>n=>{if(typeof n!="string")return n;const[s,r,a,o]=n.match(Q3);return{[e]:parseFloat(s),[A]:parseFloat(r),[t]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},e6=e=>fc(0,255,e),C3={...uh,transform:e=>Math.round(e6(e))},cG={test:b3("rgb","red"),parse:lx("red","green","blue"),transform:({red:e,green:A,blue:t,alpha:n=1})=>"rgba("+C3.transform(e)+", "+C3.transform(A)+", "+C3.transform(t)+", "+WQ(VQ.transform(n))+")"};function t6(e){let A="",t="",n="",s="";return e.length>5?(A=e.substring(1,3),t=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(A=e.substring(1,2),t=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),A+=A,t+=t,n+=n,s+=s),{red:parseInt(A,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const v3={test:b3("#"),parse:t6,transform:cG.transform},NQ=e=>({test:A=>typeof A=="string"&&A.endsWith(e)&&A.split(" ").length===1,parse:parseFloat,transform:A=>`${A}${e}`}),nd=NQ("deg"),hc=NQ("%"),oe=NQ("px"),n6=NQ("vh"),s6=NQ("vw"),gx={...hc,parse:e=>hc.parse(e)/100,transform:e=>hc.transform(e*100)},Gh={test:b3("hsl","hue"),parse:lx("hue","saturation","lightness"),transform:({hue:e,saturation:A,lightness:t,alpha:n=1})=>"hsla("+Math.round(e)+", "+hc.transform(WQ(A))+", "+hc.transform(WQ(t))+", "+WQ(VQ.transform(n))+")"},Ds={test:e=>cG.test(e)||v3.test(e)||Gh.test(e),parse:e=>cG.test(e)?cG.parse(e):Gh.test(e)?Gh.parse(e):v3.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?cG.transform(e):Gh.transform(e),getAnimatableNone:e=>{const A=Ds.parse(e);return A.alpha=0,Ds.transform(A)}},r6=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function a6(e){return isNaN(e)&&typeof e=="string"&&(e.match(Q3)?.length||0)+(e.match(r6)?.length||0)>0}const dx="number",ux="color",i6="var",o6="var(",Gx="${}",B6=/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 fh(e){const A=e.toString(),t=[],n={color:[],number:[],var:[]},s=[];let r=0;const o=A.replace(B6,c=>(Ds.test(c)?(n.color.push(r),s.push(ux),t.push(Ds.parse(c))):c.startsWith(o6)?(n.var.push(r),s.push(i6),t.push(c)):(n.number.push(r),s.push(dx),t.push(parseFloat(c))),++r,Gx)).split(Gx);return{values:t,split:o,indexes:n,types:s}}function c6(e){return fh(e).values}function fx({split:e,types:A}){const t=e.length;return n=>{let s="";for(let r=0;r<t;r++)if(s+=e[r],n[r]!==void 0){const a=A[r];a===dx?s+=WQ(n[r]):a===ux?s+=Ds.transform(n[r]):s+=n[r]}return s}}function l6(e){return fx(fh(e))}const g6=e=>typeof e=="number"?0:Ds.test(e)?Ds.getAnimatableNone(e):e,d6=(e,A)=>typeof e=="number"?A?.trim().endsWith("/")?e:0:g6(e);function u6(e){const A=fh(e);return fx(A)(A.values.map((n,s)=>d6(n,A.split[s])))}const sB={test:a6,parse:c6,createTransformer:l6,getAnimatableNone:u6};function I3(e,A,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(A-e)*6*t:t<1/2?A:t<2/3?e+(A-e)*(2/3-t)*6:e}function G6({hue:e,saturation:A,lightness:t,alpha:n}){e/=360,A/=100,t/=100;let s=0,r=0,a=0;if(!A)s=r=a=t;else{const o=t<.5?t*(1+A):t+A-t*A,c=2*t-o;s=I3(c,o,e+1/3),r=I3(c,o,e),a=I3(c,o,e-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(a*255),alpha:n}}function YI(e,A){return t=>t>0?A:e}const Hn=(e,A,t)=>e+(A-e)*t,p3=(e,A,t)=>{const n=e*e,s=t*(A*A-n)+n;return s<0?0:Math.sqrt(s)},f6=[v3,cG,Gh],h6=e=>f6.find(A=>A.test(e));function hx(e){const A=h6(e);if(!A)return!1;let t=A.parse(e);return A===Gh&&(t=G6(t)),t}const wx=(e,A)=>{const t=hx(e),n=hx(A);if(!t||!n)return YI(e,A);const s={...t};return r=>(s.red=p3(t.red,n.red,r),s.green=p3(t.green,n.green,r),s.blue=p3(t.blue,n.blue,r),s.alpha=Hn(t.alpha,n.alpha,r),cG.transform(s))},H3=new Set(["none","hidden"]);function w6(e,A){return H3.has(e)?t=>t<=0?e:A:t=>t>=1?A:e}function Q6(e,A){return t=>Hn(e,A,t)}function m3(e){return typeof e=="number"?Q6:typeof e=="string"?w3(e)?YI:Ds.test(e)?wx:v6:Array.isArray(e)?Qx:typeof e=="object"?Ds.test(e)?wx:b6:YI}function Qx(e,A){const t=[...e],n=t.length,s=e.map((r,a)=>m3(r)(r,A[a]));return r=>{for(let a=0;a<n;a++)t[a]=s[a](r);return t}}function b6(e,A){const t={...e,...A},n={};for(const s in t)e[s]!==void 0&&A[s]!==void 0&&(n[s]=m3(e[s])(e[s],A[s]));return s=>{for(const r in n)t[r]=n[r](s);return t}}function C6(e,A){const t=[],n={color:0,var:0,number:0};for(let s=0;s<A.values.length;s++){const r=A.types[s],a=e.indexes[r][n[r]],o=e.values[a]??0;t[s]=o,n[r]++}return t}const v6=(e,A)=>{const t=sB.createTransformer(A),n=fh(e),s=fh(A);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?H3.has(e)&&!s.values.length||H3.has(A)&&!n.values.length?w6(e,A):TQ(Qx(C6(n,s),s.values),t):YI(e,A)};function bx(e,A,t){return typeof e=="number"&&typeof A=="number"&&typeof t=="number"?Hn(e,A,t):m3(e)(e,A)}const I6=e=>{const A=({timestamp:t})=>e(t);return{start:(t=!0)=>Bn.update(A,t),stop:()=>td(A),now:()=>Ur.isProcessing?Ur.timestamp:ca.now()}},Cx=(e,A,t=10)=>{let n="";const s=Math.max(Math.round(A/t),2);for(let r=0;r<s;r++)n+=Math.round(e(r/(s-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},ZI=2e4;function E3(e){let A=0;const t=50;let n=e.next(A);for(;!n.done&&A<ZI;)A+=t,n=e.next(A);return A>=ZI?1/0:A}function p6(e,A=100,t){const n=t({...e,keyframes:[0,A]}),s=Math.min(E3(n),ZI);return{type:"keyframes",ease:r=>n.next(s*r).value/A,duration:go(s)}}const es={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function y3(e,A){return e*Math.sqrt(1-A*A)}const H6=12;function m6(e,A,t){let n=t;for(let s=1;s<H6;s++)n=n-e(n)/A(n);return n}const Y3=.001;function E6({duration:e=es.duration,bounce:A=es.bounce,velocity:t=es.velocity,mass:n=es.mass}){let s,r,a=1-A;a=fc(es.minDamping,es.maxDamping,a),e=fc(es.minDuration,es.maxDuration,go(e)),a<1?(s=l=>{const g=l*a,u=g*e,f=g-t,w=y3(l,a),v=Math.exp(-u);return Y3-f/w*v},r=l=>{const u=l*a*e,f=u*t+t,w=Math.pow(a,2)*Math.pow(l,2)*e,v=Math.exp(-u),H=y3(Math.pow(l,2),a);return(-s(l)+Y3>0?-1:1)*((f-w)*v)/H}):(s=l=>{const g=Math.exp(-l*e),u=(l-t)*e+1;return-Y3+g*u},r=l=>{const g=Math.exp(-l*e),u=(t-l)*(e*e);return g*u});const o=5/e,c=m6(s,r,o);if(e=Hi(e),isNaN(c))return{stiffness:es.stiffness,damping:es.damping,duration:e};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:a*2*Math.sqrt(n*l),duration:e}}}const y6=["duration","bounce"],Y6=["stiffness","damping","mass"];function vx(e,A){return A.some(t=>e[t]!==void 0)}function Z6(e){let A={velocity:es.velocity,stiffness:es.stiffness,damping:es.damping,mass:es.mass,isResolvedFromDuration:!1,...e};if(!vx(e,Y6)&&vx(e,y6))if(A.velocity=0,e.visualDuration){const t=e.visualDuration,n=2*Math.PI/(t*1.2),s=n*n,r=2*fc(.05,1,1-(e.bounce||0))*Math.sqrt(s);A={...A,mass:es.mass,stiffness:s,damping:r}}else{const t=E6({...e,velocity:0});A={...A,...t,mass:es.mass},A.isResolvedFromDuration=!0}return A}function kI(e=es.visualDuration,A=es.bounce){const t=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:A}:e;let{restSpeed:n,restDelta:s}=t;const r=t.keyframes[0],a=t.keyframes[t.keyframes.length-1],o={done:!1,value:r},{stiffness:c,damping:l,mass:g,duration:u,velocity:f,isResolvedFromDuration:w}=Z6({...t,velocity:-go(t.velocity||0)}),v=f||0,H=l/(2*Math.sqrt(c*g)),E=a-r,Z=go(Math.sqrt(c/g)),M=Math.abs(E)<5;n||(n=M?es.restSpeed.granular:es.restSpeed.default),s||(s=M?es.restDelta.granular:es.restDelta.default);let S,x,D,V,W,z;if(H<1)D=y3(Z,H),V=(v+H*Z*E)/D,S=$=>{const rA=Math.exp(-H*Z*$);return a-rA*(V*Math.sin(D*$)+E*Math.cos(D*$))},W=H*Z*V+E*D,z=H*Z*E-V*D,x=$=>Math.exp(-H*Z*$)*(W*Math.sin(D*$)+z*Math.cos(D*$));else if(H===1){S=rA=>a-Math.exp(-Z*rA)*(E+(v+Z*E)*rA);const $=v+Z*E;x=rA=>Math.exp(-Z*rA)*(Z*$*rA-v)}else{const $=Z*Math.sqrt(H*H-1);S=fA=>{const yA=Math.exp(-H*Z*fA),X=Math.min($*fA,300);return a-yA*((v+H*Z*E)*Math.sinh(X)+$*E*Math.cosh(X))/$};const rA=(v+H*Z*E)/$,iA=H*Z*rA-E*$,hA=H*Z*E-rA*$;x=fA=>{const yA=Math.exp(-H*Z*fA),X=Math.min($*fA,300);return yA*(iA*Math.sinh(X)+hA*Math.cosh(X))}}const eA={calculatedDuration:w&&u||null,velocity:$=>Hi(x($)),next:$=>{if(!w&&H<1){const iA=Math.exp(-H*Z*$),hA=Math.sin(D*$),fA=Math.cos(D*$),yA=a-iA*(V*hA+E*fA),X=Hi(iA*(W*hA+z*fA));return o.done=Math.abs(X)<=n&&Math.abs(a-yA)<=s,o.value=o.done?a:yA,o}const rA=S($);if(w)o.done=$>=u;else{const iA=Hi(x($));o.done=Math.abs(iA)<=n&&Math.abs(a-rA)<=s}return o.value=o.done?a:rA,o},toString:()=>{const $=Math.min(E3(eA),ZI),rA=Cx(iA=>eA.next($*iA).value,$,30);return $+"ms "+rA},toTransition:()=>{}};return eA}kI.applyToOptions=e=>{const A=p6(e,100,kI);return e.ease=A.ease,e.duration=Hi(A.duration),e.type="keyframes",e};const k6=5;function Ix(e,A,t){const n=Math.max(A-k6,0);return KM(t-e(n),A-n)}function Z3({keyframes:e,velocity:A=0,power:t=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:c,restDelta:l=.5,restSpeed:g}){const u=e[0],f={done:!1,value:u},w=z=>o!==void 0&&z<o||c!==void 0&&z>c,v=z=>o===void 0?c:c===void 0||Math.abs(o-z)<Math.abs(c-z)?o:c;let H=t*A;const E=u+H,Z=a===void 0?E:a(E);Z!==E&&(H=Z-u);const M=z=>-H*Math.exp(-z/n),S=z=>Z+M(z),x=z=>{const eA=M(z),$=S(z);f.done=Math.abs(eA)<=l,f.value=f.done?Z:$};let D,V;const W=z=>{w(f.value)&&(D=z,V=kI({keyframes:[f.value,v(f.value)],velocity:Ix(S,z,f.value),damping:s,stiffness:r,restDelta:l,restSpeed:g}))};return W(0),{calculatedDuration:null,next:z=>{let eA=!1;return!V&&D===void 0&&(eA=!0,x(z),W(z)),D!==void 0&&z>=D?V.next(z-D):(!eA&&x(z),f)}}}function U6(e,A,t){const n=[],s=t||ed.mix||bx,r=e.length-1;for(let a=0;a<r;a++){let o=s(e[a],e[a+1]);if(A){const c=Array.isArray(A)?A[a]||lo:A;o=TQ(c,o)}n.push(o)}return n}function D6(e,A,{clamp:t=!0,ease:n,mixer:s}={}){const r=e.length;if(d3(r===A.length),r===1)return()=>A[0];if(r===2&&A[0]===A[1])return()=>A[1];const a=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),A=[...A].reverse());const o=U6(A,n,s),c=o.length,l=g=>{if(a&&g<e[0])return A[0];let u=0;if(c>1)for(;u<e.length-2&&!(g<e[u+1]);u++);const f=RQ(e[u],e[u+1],g);return o[u](f)};return t?g=>l(fc(e[0],e[r-1],g)):l}function F6(e,A){const t=e[e.length-1];for(let n=1;n<=A;n++){const s=RQ(0,A,n);e.push(Hn(t,1,s))}}function M6(e){const A=[0];return F6(A,e.length-1),A}function x6(e,A){return e.map(t=>t*A)}function P6(e,A){return e.map(()=>A||sx).splice(0,e.length-1)}function zQ({duration:e=300,keyframes:A,times:t,ease:n="easeInOut"}){const s=L_(n)?n.map(ax):ax(n),r={done:!1,value:A[0]},a=x6(t&&t.length===A.length?t:M6(A),e),o=D6(a,A,{ease:Array.isArray(s)?s:P6(A,s)});return{calculatedDuration:e,next:c=>(r.value=o(c),r.done=c>=e,r)}}const T6=e=>e!==null;function UI(e,{repeat:A,repeatType:t="loop"},n,s=1){const r=e.filter(T6),o=s<0||A&&t!=="loop"&&A%2===1?0:r.length-1;return!o||n===void 0?r[o]:n}const R6={decay:Z3,inertia:Z3,tween:zQ,keyframes:zQ,spring:kI};function px(e){typeof e.type=="string"&&(e.type=R6[e.type])}class k3{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(A=>{this.resolve=A})}notifyFinished(){this.resolve()}then(A,t){return this.finished.then(A,t)}}const S6=e=>e/100;class DI extends k3{constructor(A){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==ca.now()&&this.tick(ca.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=A,this.initAnimation(),this.play(),A.autoplay===!1&&this.pause()}initAnimation(){const{options:A}=this;px(A);const{type:t=zQ,repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:a=0}=A;let{keyframes:o}=A;const c=t||zQ;c!==zQ&&typeof o[0]!="number"&&(this.mixKeyframes=TQ(S6,bx(o[0],o[1])),o=[0,100]);const l=c({...A,keyframes:o});r==="mirror"&&(this.mirroredGenerator=c({...A,keyframes:[...o].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=E3(l));const{calculatedDuration:g}=l;this.calculatedDuration=g,this.resolvedDuration=g+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=l}updateTime(A){const t=Math.round(A-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(A,t=!1){const{generator:n,totalDuration:s,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:g,repeat:u,repeatType:f,repeatDelay:w,type:v,onUpdate:H,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,A):this.speed<0&&(this.startTime=Math.min(A-s/this.speed,this.startTime)),t?this.currentTime=A:this.updateTime(A);const Z=this.currentTime-l*(this.playbackSpeed>=0?1:-1),M=this.playbackSpeed>=0?Z<0:Z>s;this.currentTime=Math.max(Z,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let S=this.currentTime,x=n;if(u){const z=Math.min(this.currentTime,s)/o;let eA=Math.floor(z),$=z%1;!$&&z>=1&&($=1),$===1&&eA--,eA=Math.min(eA,u+1),eA%2&&(f==="reverse"?($=1-$,w&&($-=w/o)):f==="mirror"&&(x=a)),S=fc(0,1,$)*o}let D;M?(this.delayState.value=g[0],D=this.delayState):D=x.next(S),r&&!M&&(D.value=r(D.value));let{done:V}=D;!M&&c!==null&&(V=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const W=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return W&&v!==Z3&&(D.value=UI(g,this.options,E,this.speed)),H&&H(D.value),W&&this.finish(),D}then(A,t){return this.finished.then(A,t)}get duration(){return go(this.calculatedDuration)}get iterationDuration(){const{delay:A=0}=this.options||{};return this.duration+go(A)}get time(){return go(this.currentTime)}set time(A){A=Hi(A),this.currentTime=A,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=A:this.driver&&(this.startTime=this.driver.now()-A/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=A,this.tick(A))}getGeneratorVelocity(){const A=this.currentTime;if(A<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(A);const t=this.generator.next(A).value;return Ix(n=>this.generator.next(n).value,A,t)}get speed(){return this.playbackSpeed}set speed(A){const t=this.playbackSpeed!==A;t&&this.driver&&this.updateTime(ca.now()),this.playbackSpeed=A,t&&this.driver&&(this.time=go(this.currentTime))}play(){if(this.isStopped)return;const{driver:A=I6,startTime:t}=this.options;this.driver||(this.driver=A(s=>this.tick(s))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ca.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(A){return this.startTime=0,this.tick(A,!0)}attachTimeline(A){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),A.observe(this)}}function V6(e){for(let A=1;A<e.length;A++)e[A]??(e[A]=e[A-1])}const lG=e=>e*180/Math.PI,U3=e=>{const A=lG(Math.atan2(e[1],e[0]));return D3(A)},W6={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:U3,rotateZ:U3,skewX:e=>lG(Math.atan(e[1])),skewY:e=>lG(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},D3=e=>(e=e%360,e<0&&(e+=360),e),Hx=U3,mx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ex=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),N6={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:mx,scaleY:Ex,scale:e=>(mx(e)+Ex(e))/2,rotateX:e=>D3(lG(Math.atan2(e[6],e[5]))),rotateY:e=>D3(lG(Math.atan2(-e[2],e[0]))),rotateZ:Hx,rotate:Hx,skewX:e=>lG(Math.atan(e[4])),skewY:e=>lG(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function F3(e){return e.includes("scale")?1:0}function M3(e,A){if(!e||e==="none")return F3(A);const t=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(t)n=N6,s=t;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=W6,s=o}if(!s)return F3(A);const r=n[A],a=s[1].split(",").map(L6);return typeof r=="function"?r(a):a[r]}const z6=(e,A)=>{const{transform:t="none"}=getComputedStyle(e);return M3(t,A)};function L6(e){return parseFloat(e.trim())}const hh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],wh=new Set(hh),yx=e=>e===uh||e===oe,X6=new Set(["x","y","z"]),O6=hh.filter(e=>!X6.has(e));function J6(e){const A=[];return O6.forEach(t=>{const n=e.getValue(t);n!==void 0&&(A.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),A}const sd={width:({x:e},{paddingLeft:A="0",paddingRight:t="0",boxSizing:n})=>{const s=e.max-e.min;return n==="border-box"?s:s-parseFloat(A)-parseFloat(t)},height:({y:e},{paddingTop:A="0",paddingBottom:t="0",boxSizing:n})=>{const s=e.max-e.min;return n==="border-box"?s:s-parseFloat(A)-parseFloat(t)},top:(e,{top:A})=>parseFloat(A),left:(e,{left:A})=>parseFloat(A),bottom:({y:e},{top:A})=>parseFloat(A)+(e.max-e.min),right:({x:e},{left:A})=>parseFloat(A)+(e.max-e.min),x:(e,{transform:A})=>M3(A,"x"),y:(e,{transform:A})=>M3(A,"y")};sd.translateX=sd.x,sd.translateY=sd.y;const gG=new Set;let x3=!1,P3=!1,T3=!1;function Yx(){if(P3){const e=Array.from(gG).filter(n=>n.needsMeasurement),A=new Set(e.map(n=>n.element)),t=new Map;A.forEach(n=>{const s=J6(n);s.length&&(t.set(n,s),n.render())}),e.forEach(n=>n.measureInitialState()),A.forEach(n=>{n.render();const s=t.get(n);s&&s.forEach(([r,a])=>{n.getValue(r)?.set(a)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}P3=!1,x3=!1,gG.forEach(e=>e.complete(T3)),gG.clear()}function Zx(){gG.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(P3=!0)})}function K6(){T3=!0,Zx(),Yx(),T3=!1}class R3{constructor(A,t,n,s,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...A],this.onComplete=t,this.name=n,this.motionValue=s,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(gG.add(this),x3||(x3=!0,Bn.read(Zx),Bn.resolveKeyframes(Yx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:A,name:t,element:n,motionValue:s}=this;if(A[0]===null){const r=s?.get(),a=A[A.length-1];if(r!==void 0)A[0]=r;else if(n&&t){const o=n.readValue(t,a);o!=null&&(A[0]=o)}A[0]===void 0&&(A[0]=a),s&&r===void 0&&s.set(A[0])}V6(A)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(A=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,A),gG.delete(this)}cancel(){this.state==="scheduled"&&(gG.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const j6=e=>e.startsWith("--");function kx(e,A,t){j6(A)?e.style.setProperty(A,t):e.style[A]=t}const _6={};function Ux(e,A){const t=JM(e);return()=>_6[A]??t()}const q6=Ux(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Dx=Ux(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),LQ=([e,A,t,n])=>`cubic-bezier(${e}, ${A}, ${t}, ${n})`,Fx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:LQ([0,.65,.55,1]),circOut:LQ([.55,0,1,.45]),backIn:LQ([.31,.01,.66,-.59]),backOut:LQ([.33,1.53,.69,.99])};function Mx(e,A){if(e)return typeof e=="function"?Dx()?Cx(e,A):"ease-out":rx(e)?LQ(e):Array.isArray(e)?e.map(t=>Mx(t,A)||Fx.easeOut):Fx[e]}function $6(e,A,t,{delay:n=0,duration:s=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:c}={},l=void 0){const g={[A]:t};c&&(g.offset=c);const u=Mx(o,s);Array.isArray(u)&&(g.easing=u);const f={delay:n,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"};return l&&(f.pseudoElement=l),e.animate(g,f)}function xx(e){return typeof e=="function"&&"applyToOptions"in e}function Aq({type:e,...A}){return xx(e)&&Dx()?e.applyToOptions(A):(A.duration??(A.duration=300),A.ease??(A.ease="easeOut"),A)}class Px extends k3{constructor(A){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!A)return;const{element:t,name:n,keyframes:s,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:o,onComplete:c}=A;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=A,d3(typeof A.type!="string");const l=Aq(A);this.animation=$6(t,n,s,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const g=UI(s,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(g),kx(t,n,g),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:A}=this;A==="idle"||A==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const A=this.options?.element;!this.isPseudoElement&&A?.isConnected&&this.animation.commitStyles?.()}get duration(){const A=this.animation.effect?.getComputedTiming?.().duration||0;return go(Number(A))}get iterationDuration(){const{delay:A=0}=this.options||{};return this.duration+go(A)}get time(){return go(Number(this.animation.currentTime)||0)}set time(A){const t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Hi(A),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(A){A<0&&(this.finishedTime=null),this.animation.playbackRate=A}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(A){this.manualStartTime=this.animation.startTime=A}attachTimeline({timeline:A,rangeStart:t,rangeEnd:n,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,A&&q6()?(this.animation.timeline=A,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),lo):s(this)}}const Tx={anticipate:ex,backInOut:Ax,circInOut:nx};function eq(e){return e in Tx}function tq(e){typeof e.ease=="string"&&eq(e.ease)&&(e.ease=Tx[e.ease])}const S3=10;class nq extends Px{constructor(A){tq(A),px(A),super(A),A.startTime!==void 0&&A.autoplay!==!1&&(this.startTime=A.startTime),this.options=A}updateMotionValue(A){const{motionValue:t,onUpdate:n,onComplete:s,element:r,...a}=this.options;if(!t)return;if(A!==void 0){t.set(A);return}const o=new DI({...a,autoplay:!1}),c=Math.max(S3,ca.now()-this.startTime),l=fc(0,S3,c-S3),g=o.sample(c).value,{name:u}=this.options;r&&u&&kx(r,u,g),t.setWithVelocity(o.sample(Math.max(0,c-l)).value,g,l),o.stop()}}const Rx=(e,A)=>A==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(sB.test(e)||e==="0")&&!e.startsWith("url("));function sq(e){const A=e[0];if(e.length===1)return!0;for(let t=0;t<e.length;t++)if(e[t]!==A)return!0}function rq(e,A,t,n){const s=e[0];if(s===null)return!1;if(A==="display"||A==="visibility")return!0;const r=e[e.length-1],a=Rx(s,A),o=Rx(r,A);return!a||!o?!1:sq(e)||(t==="spring"||xx(t))&&n}function V3(e){e.duration=0,e.type="keyframes"}const Sx=new Set(["opacity","clipPath","filter","transform"]),aq=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function iq(e){for(let A=0;A<e.length;A++)if(typeof e[A]=="string"&&aq.test(e[A]))return!0;return!1}const oq=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Bq=JM(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function cq(e){const{motionValue:A,name:t,repeatDelay:n,repeatType:s,damping:r,type:a,keyframes:o}=e;if(!(A?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:g}=A.owner.getProps();return Bq()&&t&&(Sx.has(t)||oq.has(t)&&iq(o))&&(t!=="transform"||!g)&&!l&&!n&&s!=="mirror"&&r!==0&&a!=="inertia"}const lq=40;class gq extends k3{constructor({autoplay:A=!0,delay:t=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:a="loop",keyframes:o,name:c,motionValue:l,element:g,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ca.now();const f={autoplay:A,delay:t,type:n,repeat:s,repeatDelay:r,repeatType:a,name:c,motionValue:l,element:g,...u},w=g?.KeyframeResolver||R3;this.keyframeResolver=new w(o,(v,H,E)=>this.onKeyframesResolved(v,H,f,!E),c,l,g),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(A,t,n,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:o,delay:c,isHandoff:l,onUpdate:g}=n;this.resolvedAt=ca.now();let u=!0;rq(A,r,a,o)||(u=!1,(ed.instantAnimations||!c)&&g?.(UI(A,n,t)),A[0]=A[A.length-1],V3(n),n.repeat=0);const w={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>lq?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:A},v=u&&!l&&cq(w),H=w.motionValue?.owner?.current;let E;if(v)try{E=new nq({...w,element:H})}catch{E=new DI(w)}else E=new DI(w);E.finished.then(()=>{this.notifyFinished()}).catch(lo),this.pendingTimeline&&(this.stopTimeline=E.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=E}get finished(){return this._animation?this.animation.finished:this._finished}then(A,t){return this.finished.finally(A).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),K6()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(A){this.animation.time=A}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(A){this.animation.speed=A}get startTime(){return this.animation.startTime}attachTimeline(A){return this._animation?this.stopTimeline=this.animation.attachTimeline(A):this.pendingTimeline=A,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Vx(e,A,t,n=0,s=1){const r=Array.from(e).sort((l,g)=>l.sortNodePosition(g)).indexOf(A),a=e.size,o=(a-1)*n;return typeof t=="function"?t(r,a):s===1?r*n:o-r*n}const dq=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function uq(e){const A=dq.exec(e);if(!A)return[,];const[,t,n,s]=A;return[`--${t??n}`,s]}function Wx(e,A,t=1){const[n,s]=uq(e);if(!n)return;const r=window.getComputedStyle(A).getPropertyValue(n);if(r){const a=r.trim();return LM(a)?parseFloat(a):a}return w3(s)?Wx(s,A,t+1):s}const Gq={type:"spring",stiffness:500,damping:25,restSpeed:10},fq=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),hq={type:"keyframes",duration:.8},wq={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Qq=(e,{keyframes:A})=>A.length>2?hq:wh.has(e)?e.startsWith("scale")?fq(A[1]):Gq:wq;function Nx(e,A){if(e?.inherit&&A){const{inherit:t,...n}=e;return{...A,...n}}return e}function W3(e,A){const t=e?.[A]??e?.default??e;return t!==e?Nx(t,e):t}const bq=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Cq(e){for(const A in e)if(!bq.has(A))return!0;return!1}const N3=(e,A,t,n={},s,r)=>a=>{const o=W3(n,e)||{},c=o.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Hi(c);const g={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:A.getVelocity(),...o,delay:-l,onUpdate:f=>{A.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:A,element:r?void 0:s};Cq(o)||Object.assign(g,Qq(e,g)),g.duration&&(g.duration=Hi(g.duration)),g.repeatDelay&&(g.repeatDelay=Hi(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let u=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(V3(g),g.delay===0&&(u=!0)),(ed.instantAnimations||ed.skipAnimations||s?.shouldSkipAnimations)&&(u=!0,V3(g),g.delay=0),g.allowFlatten=!o.type&&!o.ease,u&&!r&&A.get()!==void 0){const f=UI(g.keyframes,o);if(f!==void 0){Bn.update(()=>{g.onUpdate(f),g.onComplete()});return}}return o.isSync?new DI(g):new gq(g)};function zx(e){const A=[{},{}];return e?.values.forEach((t,n)=>{A[0][n]=t.get(),A[1][n]=t.getVelocity()}),A}function z3(e,A,t,n){if(typeof A=="function"){const[s,r]=zx(n);A=A(t!==void 0?t:e.custom,s,r)}if(typeof A=="string"&&(A=e.variants&&e.variants[A]),typeof A=="function"){const[s,r]=zx(n);A=A(t!==void 0?t:e.custom,s,r)}return A}function dG(e,A,t){const n=e.getProps();return z3(n,A,t!==void 0?t:n.custom,e)}const Lx=new Set(["width","height","top","left","right","bottom",...hh]),Xx=30,vq=e=>!isNaN(parseFloat(e));class Iq{constructor(A,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const s=ca.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(A),this.owner=t.owner}setCurrent(A){this.current=A,this.updatedAt=ca.now(),this.canTrackVelocity===null&&A!==void 0&&(this.canTrackVelocity=vq(this.current))}setPrevFrameValue(A=this.current){this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt}onChange(A){return this.on("change",A)}on(A,t){this.events[A]||(this.events[A]=new u3);const n=this.events[A].add(t);return A==="change"?()=>{n(),Bn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const A in this.events)this.events[A].clear()}attach(A,t){this.passiveEffect=A,this.stopPassiveEffect=t}set(A){this.passiveEffect?this.passiveEffect(A,this.updateAndNotify):this.updateAndNotify(A)}setWithVelocity(A,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt-n}jump(A,t=!0){this.updateAndNotify(A),this.prev=A,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(A){this.dependents||(this.dependents=new Set),this.dependents.add(A)}removeDependent(A){this.dependents&&this.dependents.delete(A)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const A=ca.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||A-this.updatedAt>Xx)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,Xx);return KM(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(A){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=A(t),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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qh(e,A){return new Iq(e,A)}const L3=e=>Array.isArray(e);function pq(e,A,t){e.hasValue(A)?e.getValue(A).set(t):e.addValue(A,Qh(t))}function Hq(e){return L3(e)?e[e.length-1]||0:e}function X3(e,A){const t=dG(e,A);let{transitionEnd:n={},transition:s={},...r}=t||{};r={...r,...n};for(const a in r){const o=Hq(r[a]);pq(e,a,o)}}const Dr=e=>!!(e&&e.getVelocity);function mq(e){return!!(Dr(e)&&e.add)}function O3(e,A){const t=e.getValue("willChange");if(mq(t))return t.add(A);if(!t&&ed.WillChange){const n=new ed.WillChange("auto");e.addValue("willChange",n),n.add(A)}}function J3(e){return e.replace(/([A-Z])/g,A=>`-${A.toLowerCase()}`)}const Ox="data-"+J3("framerAppearId");function Jx(e){return e.props[Ox]}function Eq({protectedKeys:e,needsAnimating:A},t){const n=e.hasOwnProperty(t)&&A[t]!==!0;return A[t]=!1,n}function Kx(e,A,{delay:t=0,transitionOverride:n,type:s}={}){let{transition:r,transitionEnd:a,...o}=A;const c=e.getDefaultTransition();r=r?Nx(r,c):c;const l=r?.reduceMotion;n&&(r=n);const g=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const f in o){const w=e.getValue(f,e.latestValues[f]??null),v=o[f];if(v===void 0||u&&Eq(u,f))continue;const H={delay:t,...W3(r||{},f)},E=w.get();if(E!==void 0&&!w.isAnimating()&&!Array.isArray(v)&&v===E&&!H.velocity){Bn.update(()=>w.set(v));continue}let Z=!1;if(window.MotionHandoffAnimation){const x=Jx(e);if(x){const D=window.MotionHandoffAnimation(x,f,Bn);D!==null&&(H.startTime=D,Z=!0)}}O3(e,f);const M=l??e.shouldReduceMotion;w.start(N3(f,w,v,M&&Lx.has(f)?{type:!1}:H,e,Z));const S=w.animation;S&&g.push(S)}if(a){const f=()=>Bn.update(()=>{a&&X3(e,a)});g.length?Promise.all(g).then(f):f()}return g}function K3(e,A,t={}){const n=dG(e,A,t.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=n||{};t.transitionOverride&&(s=t.transitionOverride);const r=n?()=>Promise.all(Kx(e,n,t)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:g,staggerDirection:u}=s;return yq(e,A,c,l,g,u,t)}:()=>Promise.resolve(),{when:o}=s;if(o){const[c,l]=o==="beforeChildren"?[r,a]:[a,r];return c().then(()=>l())}else return Promise.all([r(),a(t.delay)])}function yq(e,A,t=0,n=0,s=0,r=1,a){const o=[];for(const c of e.variantChildren)c.notify("AnimationStart",A),o.push(K3(c,A,{...a,delay:t+(typeof n=="function"?0:n)+Vx(e.variantChildren,c,n,s,r)}).then(()=>c.notify("AnimationComplete",A)));return Promise.all(o)}function jx(e,A,t={}){e.notify("AnimationStart",A);let n;if(Array.isArray(A)){const s=A.map(r=>K3(e,r,t));n=Promise.all(s)}else if(typeof A=="string")n=K3(e,A,t);else{const s=typeof A=="function"?dG(e,A,t.custom):A;n=Promise.all(Kx(e,s,t))}return n.then(()=>{e.notify("AnimationComplete",A)})}const Yq={test:e=>e==="auto",parse:e=>e},_x=e=>A=>A.test(e),qx=[uh,oe,hc,nd,s6,n6,Yq],$x=e=>qx.find(_x(e));function Zq(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||OM(e):!0}const kq=new Set(["brightness","contrast","saturate","opacity"]);function Uq(e){const[A,t]=e.slice(0,-1).split("(");if(A==="drop-shadow")return e;const[n]=t.match(Q3)||[];if(!n)return e;const s=t.replace(n,"");let r=kq.has(A)?1:0;return n!==t&&(r*=100),A+"("+r+s+")"}const Dq=/\b([a-z-]*)\(.*?\)/gu,j3={...sB,getAnimatableNone:e=>{const A=e.match(Dq);return A?A.map(Uq).join(" "):e}},_3={...sB,getAnimatableNone:e=>{const A=sB.parse(e);return sB.createTransformer(e)(A.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}},A2={...uh,transform:Math.round},q3={borderWidth:oe,borderTopWidth:oe,borderRightWidth:oe,borderBottomWidth:oe,borderLeftWidth:oe,borderRadius:oe,borderTopLeftRadius:oe,borderTopRightRadius:oe,borderBottomRightRadius:oe,borderBottomLeftRadius:oe,width:oe,maxWidth:oe,height:oe,maxHeight:oe,top:oe,right:oe,bottom:oe,left:oe,inset:oe,insetBlock:oe,insetBlockStart:oe,insetBlockEnd:oe,insetInline:oe,insetInlineStart:oe,insetInlineEnd:oe,padding:oe,paddingTop:oe,paddingRight:oe,paddingBottom:oe,paddingLeft:oe,paddingBlock:oe,paddingBlockStart:oe,paddingBlockEnd:oe,paddingInline:oe,paddingInlineStart:oe,paddingInlineEnd:oe,margin:oe,marginTop:oe,marginRight:oe,marginBottom:oe,marginLeft:oe,marginBlock:oe,marginBlockStart:oe,marginBlockEnd:oe,marginInline:oe,marginInlineStart:oe,marginInlineEnd:oe,fontSize:oe,backgroundPositionX:oe,backgroundPositionY:oe,...{rotate:nd,rotateX:nd,rotateY:nd,rotateZ:nd,scale:yI,scaleX:yI,scaleY:yI,scaleZ:yI,skew:nd,skewX:nd,skewY:nd,distance:oe,translateX:oe,translateY:oe,translateZ:oe,x:oe,y:oe,z:oe,perspective:oe,transformPerspective:oe,opacity:VQ,originX:gx,originY:gx,originZ:oe},zIndex:A2,fillOpacity:VQ,strokeOpacity:VQ,numOctaves:A2},Fq={...q3,color:Ds,backgroundColor:Ds,outlineColor:Ds,fill:Ds,stroke:Ds,borderColor:Ds,borderTopColor:Ds,borderRightColor:Ds,borderBottomColor:Ds,borderLeftColor:Ds,filter:j3,WebkitFilter:j3,mask:_3,WebkitMask:_3},e2=e=>Fq[e],Mq=new Set([j3,_3]);function t2(e,A){let t=e2(e);return Mq.has(t)||(t=sB),t.getAnimatableNone?t.getAnimatableNone(A):void 0}const xq=new Set(["auto","none","0"]);function Pq(e,A,t){let n=0,s;for(;n<e.length&&!s;){const r=e[n];typeof r=="string"&&!xq.has(r)&&fh(r).values.length&&(s=e[n]),n++}if(s&&t)for(const r of A)e[r]=t2(t,s)}class Tq extends R3{constructor(A,t,n,s,r){super(A,t,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:A,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let g=0;g<A.length;g++){let u=A[g];if(typeof u=="string"&&(u=u.trim(),w3(u))){const f=Wx(u,t.current);f!==void 0&&(A[g]=f),g===A.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Lx.has(n)||A.length!==2)return;const[s,r]=A,a=$x(s),o=$x(r),c=cx(s),l=cx(r);if(c!==l&&sd[n]){this.needsMeasurement=!0;return}if(a!==o)if(yx(a)&&yx(o))for(let g=0;g<A.length;g++){const u=A[g];typeof u=="string"&&(A[g]=parseFloat(u))}else sd[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:A,name:t}=this,n=[];for(let s=0;s<A.length;s++)(A[s]===null||Zq(A[s]))&&n.push(s);n.length&&Pq(A,n,t)}measureInitialState(){const{element:A,unresolvedKeyframes:t,name:n}=this;if(!A||!A.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=sd[n](A.measureViewportBox(),window.getComputedStyle(A.current)),t[0]=this.measuredOrigin;const s=t[t.length-1];s!==void 0&&A.getValue(n,s).jump(s,!1)}measureEndState(){const{element:A,name:t,unresolvedKeyframes:n}=this;if(!A||!A.current)return;const s=A.getValue(t);s&&s.jump(this.measuredOrigin,!1);const r=n.length-1,a=n[r];n[r]=sd[t](A.measureViewportBox(),window.getComputedStyle(A.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([o,c])=>{A.getValue(o).set(c)}),this.resolveNoneKeyframes()}}function n2(e,A,t){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const s=t?.[e]??n.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(n=>n!=null)}const s2=(e,A)=>A&&typeof e=="number"?A.transform(e):e;function FI(e){return XM(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:$3}=ix(queueMicrotask,!1),rB={x:!1,y:!1};function r2(){return rB.x||rB.y}function Rq(e){return e==="x"||e==="y"?rB[e]?null:(rB[e]=!0,()=>{rB[e]=!1}):rB.x||rB.y?null:(rB.x=rB.y=!0,()=>{rB.x=rB.y=!1})}function a2(e,A){const t=n2(e),n=new AbortController,s={passive:!0,...A,signal:n.signal};return[t,s,()=>n.abort()]}function Sq(e){return!(e.pointerType==="touch"||r2())}function Vq(e,A,t={}){const[n,s,r]=a2(e,t);return n.forEach(a=>{let o=!1,c=!1,l;const g=()=>{a.removeEventListener("pointerleave",v)},u=E=>{l&&(l(E),l=void 0),g()},f=E=>{o=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,u(E))},w=()=>{o=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},v=E=>{if(E.pointerType!=="touch"){if(o){c=!0;return}u(E)}},H=E=>{if(!Sq(E))return;c=!1;const Z=A(a,E);typeof Z=="function"&&(l=Z,a.addEventListener("pointerleave",v,s))};a.addEventListener("pointerenter",H,s),a.addEventListener("pointerdown",w,s)}),r}const i2=(e,A)=>A?e===A?!0:i2(e,A.parentElement):!1,Ay=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Wq=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Nq(e){return Wq.has(e.tagName)||e.isContentEditable===!0}const zq=new Set(["INPUT","SELECT","TEXTAREA"]);function Lq(e){return zq.has(e.tagName)||e.isContentEditable===!0}const MI=new WeakSet;function o2(e){return A=>{A.key==="Enter"&&e(A)}}function ey(e,A){e.dispatchEvent(new PointerEvent("pointer"+A,{isPrimary:!0,bubbles:!0}))}const Xq=(e,A)=>{const t=e.currentTarget;if(!t)return;const n=o2(()=>{if(MI.has(t))return;ey(t,"down");const s=o2(()=>{ey(t,"up")}),r=()=>ey(t,"cancel");t.addEventListener("keyup",s,A),t.addEventListener("blur",r,A)});t.addEventListener("keydown",n,A),t.addEventListener("blur",()=>t.removeEventListener("keydown",n),A)};function B2(e){return Ay(e)&&!r2()}const c2=new WeakSet;function Oq(e,A,t={}){const[n,s,r]=a2(e,t),a=o=>{const c=o.currentTarget;if(!B2(o)||c2.has(o))return;MI.add(c),t.stopPropagation&&c2.add(o);const l=A(c,o),g=(w,v)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",f),MI.has(c)&&MI.delete(c),B2(w)&&typeof l=="function"&&l(w,{success:v})},u=w=>{g(w,c===window||c===document||t.useGlobalTarget||i2(c,w.target))},f=w=>{g(w,!1)};window.addEventListener("pointerup",u,s),window.addEventListener("pointercancel",f,s)};return n.forEach(o=>{(t.useGlobalTarget?window:o).addEventListener("pointerdown",a,s),FI(o)&&(o.addEventListener("focus",l=>Xq(l,s)),!Nq(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),r}function ty(e){return XM(e)&&"ownerSVGElement"in e}const xI=new WeakMap;let PI;const l2=(e,A,t)=>(n,s)=>s&&s[0]?s[0][e+"Size"]:ty(n)&&"getBBox"in n?n.getBBox()[A]:n[t],Jq=l2("inline","width","offsetWidth"),Kq=l2("block","height","offsetHeight");function jq({target:e,borderBoxSize:A}){xI.get(e)?.forEach(t=>{t(e,{get width(){return Jq(e,A)},get height(){return Kq(e,A)}})})}function _q(e){e.forEach(jq)}function qq(){typeof ResizeObserver>"u"||(PI=new ResizeObserver(_q))}function $q(e,A){PI||qq();const t=n2(e);return t.forEach(n=>{let s=xI.get(n);s||(s=new Set,xI.set(n,s)),s.add(A),PI?.observe(n)}),()=>{t.forEach(n=>{const s=xI.get(n);s?.delete(A),s?.size||PI?.unobserve(n)})}}const TI=new Set;let bh;function A$(){bh=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};TI.forEach(A=>A(e))},window.addEventListener("resize",bh)}function e$(e){return TI.add(e),bh||A$(),()=>{TI.delete(e),!TI.size&&typeof bh=="function"&&(window.removeEventListener("resize",bh),bh=void 0)}}function g2(e,A){return typeof e=="function"?e$(e):$q(e,A)}function t$(e){return ty(e)&&e.tagName==="svg"}const n$=[...qx,Ds,sB],s$=e=>n$.find(_x(e)),d2=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ch=()=>({x:d2(),y:d2()}),u2=()=>({min:0,max:0}),Ks=()=>({x:u2(),y:u2()}),r$=new WeakMap;function RI(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function XQ(e){return typeof e=="string"||Array.isArray(e)}const ny=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],sy=["initial",...ny];function SI(e){return RI(e.animate)||sy.some(A=>XQ(e[A]))}function G2(e){return!!(SI(e)||e.variants)}function a$(e,A,t){for(const n in A){const s=A[n],r=t[n];if(Dr(s))e.addValue(n,s);else if(Dr(r))e.addValue(n,Qh(s,{owner:e}));else if(r!==s)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(n);e.addValue(n,Qh(a!==void 0?a:s,{owner:e}))}}for(const n in t)A[n]===void 0&&e.removeValue(n);return A}const ry={current:null},f2={current:!1},i$=typeof window<"u";function o$(){if(f2.current=!0,!!i$)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),A=()=>ry.current=e.matches;e.addEventListener("change",A),A()}else ry.current=!1}const h2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let VI={};function w2(e){VI=e}function B$(){return VI}class c${scrapeMotionValuesFromProps(A,t,n){return{}}constructor({parent:A,props:t,presenceContext:n,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:a,visualState:o},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=R3,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 w=ca.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,Bn.render(this.render,!1,!0))};const{latestValues:l,renderState:g}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=g,this.parent=A,this.props=t,this.presenceContext=n,this.depth=A?A.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=SI(t),this.isVariantNode=G2(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(A&&A.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(t,{},this);for(const w in f){const v=f[w];l[w]!==void 0&&Dr(v)&&v.set(l[w])}}mount(A){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=A,r$.set(A,this),this.projection&&!this.projection.instance&&this.projection.mount(A),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,n)=>this.bindToMotionValue(n,t)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(f2.current||o$(),this.shouldReduceMotion=ry.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),td(this.notifyUpdate),td(this.render),this.valueSubscriptions.forEach(A=>A()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const A in this.events)this.events[A].clear();for(const A in this.features){const t=this.features[A];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(A){this.children.add(A),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(A)}removeChild(A){this.children.delete(A),this.enteringChildren&&this.enteringChildren.delete(A)}bindToMotionValue(A,t){if(this.valueSubscriptions.has(A)&&this.valueSubscriptions.get(A)(),t.accelerate&&Sx.has(A)&&this.current instanceof HTMLElement){const{factory:a,keyframes:o,times:c,ease:l,duration:g}=t.accelerate,u=new Px({element:this.current,name:A,keyframes:o,times:c,ease:l,duration:Hi(g)}),f=a(u);this.valueSubscriptions.set(A,()=>{f(),u.cancel()});return}const n=wh.has(A);n&&this.onBindTransform&&this.onBindTransform();const s=t.on("change",a=>{this.latestValues[A]=a,this.props.onUpdate&&Bn.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,A,t)),this.valueSubscriptions.set(A,()=>{s(),r&&r(),t.owner&&t.stop()})}sortNodePosition(A){return!this.current||!this.sortInstanceNodePosition||this.type!==A.type?0:this.sortInstanceNodePosition(this.current,A.current)}updateFeatures(){let A="animation";for(A in VI){const t=VI[A];if(!t)continue;const{isEnabled:n,Feature:s}=t;if(!this.features[A]&&s&&n(this.props)&&(this.features[A]=new s(this)),this.features[A]){const r=this.features[A];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ks()}getStaticValue(A){return this.latestValues[A]}setStaticValue(A,t){this.latestValues[A]=t}update(A,t){(A.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=A,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<h2.length;n++){const s=h2[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,a=A[r];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=a$(this,this.scrapeMotionValuesFromProps(A,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(A){return this.props.variants?this.props.variants[A]: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(A){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(A),()=>t.variantChildren.delete(A)}addValue(A,t){const n=this.values.get(A);t!==n&&(n&&this.removeValue(A),this.bindToMotionValue(A,t),this.values.set(A,t),this.latestValues[A]=t.get())}removeValue(A){this.values.delete(A);const t=this.valueSubscriptions.get(A);t&&(t(),this.valueSubscriptions.delete(A)),delete this.latestValues[A],this.removeValueFromRenderState(A,this.renderState)}hasValue(A){return this.values.has(A)}getValue(A,t){if(this.props.values&&this.props.values[A])return this.props.values[A];let n=this.values.get(A);return n===void 0&&t!==void 0&&(n=Qh(t===null?void 0:t,{owner:this}),this.addValue(A,n)),n}readValue(A,t){let n=this.latestValues[A]!==void 0||!this.current?this.latestValues[A]:this.getBaseTargetFromProps(this.props,A)??this.readValueFromInstance(this.current,A,this.options);return n!=null&&(typeof n=="string"&&(LM(n)||OM(n))?n=parseFloat(n):!s$(n)&&sB.test(t)&&(n=t2(A,t)),this.setBaseTarget(A,Dr(n)?n.get():n)),Dr(n)?n.get():n}setBaseTarget(A,t){this.baseTarget[A]=t}getBaseTarget(A){const{initial:t}=this.props;let n;if(typeof t=="string"||typeof t=="object"){const r=z3(this.props,t,this.presenceContext?.custom);r&&(n=r[A])}if(t&&n!==void 0)return n;const s=this.getBaseTargetFromProps(this.props,A);return s!==void 0&&!Dr(s)?s:this.initialValues[A]!==void 0&&n===void 0?void 0:this.baseTarget[A]}on(A,t){return this.events[A]||(this.events[A]=new u3),this.events[A].add(t)}notify(A,...t){this.events[A]&&this.events[A].notify(...t)}scheduleRenderMicrotask(){$3.render(this.render)}}class Q2 extends c${constructor(){super(...arguments),this.KeyframeResolver=Tq}sortInstanceNodePosition(A,t){return A.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(A,t){const n=A.style;return n?n[t]:void 0}removeValueFromRenderState(A,{vars:t,style:n}){delete t[A],delete n[A]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:A}=this.props;Dr(A)&&(this.childSubscription=A.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class rd{constructor(A){this.isMounted=!1,this.node=A}update(){}}function b2({top:e,left:A,right:t,bottom:n}){return{x:{min:A,max:t},y:{min:e,max:n}}}function l$({x:e,y:A}){return{top:A.min,right:e.max,bottom:A.max,left:e.min}}function g$(e,A){if(!A)return e;const t=A({x:e.left,y:e.top}),n=A({x:e.right,y:e.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function ay(e){return e===void 0||e===1}function iy({scale:e,scaleX:A,scaleY:t}){return!ay(e)||!ay(A)||!ay(t)}function uG(e){return iy(e)||C2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function C2(e){return v2(e.x)||v2(e.y)}function v2(e){return e&&e!=="0%"}function WI(e,A,t){const n=e-t,s=A*n;return t+s}function I2(e,A,t,n,s){return s!==void 0&&(e=WI(e,s,n)),WI(e,t,n)+A}function oy(e,A=0,t=1,n,s){e.min=I2(e.min,A,t,n,s),e.max=I2(e.max,A,t,n,s)}function p2(e,{x:A,y:t}){oy(e.x,A.translate,A.scale,A.originPoint),oy(e.y,t.translate,t.scale,t.originPoint)}const H2=.999999999999,m2=1.0000000000001;function d$(e,A,t,n=!1){const s=t.length;if(!s)return;A.x=A.y=1;let r,a;for(let o=0;o<s;o++){r=t[o],a=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(wc(e.x,-r.scroll.offset.x),wc(e.y,-r.scroll.offset.y)),a&&(A.x*=a.x.scale,A.y*=a.y.scale,p2(e,a)),n&&uG(r.latestValues)&&NI(e,r.latestValues,r.layout?.layoutBox))}A.x<m2&&A.x>H2&&(A.x=1),A.y<m2&&A.y>H2&&(A.y=1)}function wc(e,A){e.min+=A,e.max+=A}function E2(e,A,t,n,s=.5){const r=Hn(e.min,e.max,s);oy(e,A,t,r,n)}function y2(e,A){return typeof e=="string"?parseFloat(e)/100*(A.max-A.min):e}function NI(e,A,t){const n=t??e;E2(e.x,y2(A.x,n.x),A.scaleX,A.scale,A.originX),E2(e.y,y2(A.y,n.y),A.scaleY,A.scale,A.originY)}function Y2(e,A){return b2(g$(e.getBoundingClientRect(),A))}function u$(e,A,t){const n=Y2(e,t),{scroll:s}=A;return s&&(wc(n.x,s.offset.x),wc(n.y,s.offset.y)),n}const G$={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},f$=hh.length;function h$(e,A,t){let n="",s=!0;for(let r=0;r<f$;r++){const a=hh[r],o=e[a];if(o===void 0)continue;let c=!0;if(typeof o=="number")c=o===(a.startsWith("scale")?1:0);else{const l=parseFloat(o);c=a.startsWith("scale")?l===1:l===0}if(!c||t){const l=s2(o,q3[a]);if(!c){s=!1;const g=G$[a]||a;n+=`${g}(${l}) `}t&&(A[a]=l)}}return n=n.trim(),t?n=t(A,s?"":n):s&&(n="none"),n}function By(e,A,t){const{style:n,vars:s,transformOrigin:r}=e;let a=!1,o=!1;for(const c in A){const l=A[c];if(wh.has(c)){a=!0;continue}else if(Bx(c)){s[c]=l;continue}else{const g=s2(l,q3[c]);c.startsWith("origin")?(o=!0,r[c]=g):n[c]=g}}if(A.transform||(a||t?n.transform=h$(A,e.transform,t):n.transform&&(n.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:g=0}=r;n.transformOrigin=`${c} ${l} ${g}`}}function Z2(e,{style:A,vars:t},n,s){const r=e.style;let a;for(a in A)r[a]=A[a];s?.applyProjectionStyles(r,n);for(a in t)r.setProperty(a,t[a])}function k2(e,A){return A.max===A.min?0:e/(A.max-A.min)*100}const OQ={correct:(e,A)=>{if(!A.target)return e;if(typeof e=="string")if(oe.test(e))e=parseFloat(e);else return e;const t=k2(e,A.target.x),n=k2(e,A.target.y);return`${t}% ${n}%`}},w$={correct:(e,{treeScale:A,projectionDelta:t})=>{const n=e,s=sB.parse(e);if(s.length>5)return n;const r=sB.createTransformer(e),a=typeof s[0]!="number"?1:0,o=t.x.scale*A.x,c=t.y.scale*A.y;s[0+a]/=o,s[1+a]/=c;const l=Hn(o,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=l),typeof s[3+a]=="number"&&(s[3+a]/=l),r(s)}},cy={borderRadius:{...OQ,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:OQ,borderTopRightRadius:OQ,borderBottomLeftRadius:OQ,borderBottomRightRadius:OQ,boxShadow:w$};function U2(e,{layout:A,layoutId:t}){return wh.has(e)||e.startsWith("origin")||(A||t!==void 0)&&(!!cy[e]||e==="opacity")}function ly(e,A,t){const n=e.style,s=A?.style,r={};if(!n)return r;for(const a in n)(Dr(n[a])||s&&Dr(s[a])||U2(a,e)||t?.getValue(a)?.liveStyle!==void 0)&&(r[a]=n[a]);return r}function Q$(e){return window.getComputedStyle(e)}class b$ extends Q2{constructor(){super(...arguments),this.type="html",this.renderInstance=Z2}readValueFromInstance(A,t){if(wh.has(t))return this.projection?.isProjecting?F3(t):z6(A,t);{const n=Q$(A),s=(Bx(t)?n.getPropertyValue(t):n[t])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(A,{transformPagePoint:t}){return Y2(A,t)}build(A,t,n){By(A,t,n.transformTemplate)}scrapeMotionValuesFromProps(A,t,n){return ly(A,t,n)}}const C$={offset:"stroke-dashoffset",array:"stroke-dasharray"},v$={offset:"strokeDashoffset",array:"strokeDasharray"};function I$(e,A,t=1,n=0,s=!0){e.pathLength=1;const r=s?C$:v$;e[r.offset]=`${-n}`,e[r.array]=`${A} ${t}`}const p$=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function D2(e,{attrX:A,attrY:t,attrScale:n,pathLength:s,pathSpacing:r=1,pathOffset:a=0,...o},c,l,g){if(By(e,o,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:u,style:f}=e;u.transform&&(f.transform=u.transform,delete u.transform),(f.transform||u.transformOrigin)&&(f.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),f.transform&&(f.transformBox=g?.transformBox??"fill-box",delete u.transformBox);for(const w of p$)u[w]!==void 0&&(f[w]=u[w],delete u[w]);A!==void 0&&(u.x=A),t!==void 0&&(u.y=t),n!==void 0&&(u.scale=n),s!==void 0&&I$(u,s,r,a,!1)}const F2=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"]),M2=e=>typeof e=="string"&&e.toLowerCase()==="svg";function H$(e,A,t,n){Z2(e,A,void 0,n);for(const s in A.attrs)e.setAttribute(F2.has(s)?s:J3(s),A.attrs[s])}function x2(e,A,t){const n=ly(e,A,t);for(const s in e)if(Dr(e[s])||Dr(A[s])){const r=hh.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[r]=e[s]}return n}class m$ extends Q2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ks}getBaseTargetFromProps(A,t){return A[t]}readValueFromInstance(A,t){if(wh.has(t)){const n=e2(t);return n&&n.default||0}return t=F2.has(t)?t:J3(t),A.getAttribute(t)}scrapeMotionValuesFromProps(A,t,n){return x2(A,t,n)}build(A,t,n){D2(A,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(A,t,n,s){H$(A,t,n,s)}mount(A){this.isSVGTag=M2(A.tagName),super.mount(A)}}const E$=sy.length;function P2(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent?P2(e.parent)||{}:{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}const A={};for(let t=0;t<E$;t++){const n=sy[t],s=e.props[n];(XQ(s)||s===!1)&&(A[n]=s)}return A}function T2(e,A){if(!Array.isArray(A))return!1;const t=A.length;if(t!==e.length)return!1;for(let n=0;n<t;n++)if(A[n]!==e[n])return!1;return!0}const y$=[...ny].reverse(),Y$=ny.length;function Z$(e){return A=>Promise.all(A.map(({animation:t,options:n})=>jx(e,t,n)))}function k$(e){let A=Z$(e),t=R2(),n=!0,s=!1;const r=l=>(g,u)=>{const f=dG(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:w,transitionEnd:v,...H}=f;g={...g,...H,...v}}return g};function a(l){A=l(e)}function o(l){const{props:g}=e,u=P2(e.parent)||{},f=[],w=new Set;let v={},H=1/0;for(let Z=0;Z<Y$;Z++){const M=y$[Z],S=t[M],x=g[M]!==void 0?g[M]:u[M],D=XQ(x),V=M===l?S.isActive:null;V===!1&&(H=Z);let W=x===u[M]&&x!==g[M]&&D;if(W&&(n||s)&&e.manuallyAnimateOnMount&&(W=!1),S.protectedKeys={...v},!S.isActive&&V===null||!x&&!S.prevProp||RI(x)||typeof x=="boolean")continue;if(M==="exit"&&S.isActive&&V!==!0){S.prevResolvedValues&&(v={...v,...S.prevResolvedValues});continue}const z=U$(S.prevProp,x);let eA=z||M===l&&S.isActive&&!W&&D||Z>H&&D,$=!1;const rA=Array.isArray(x)?x:[x];let iA=rA.reduce(r(M),{});V===!1&&(iA={});const{prevResolvedValues:hA={}}=S,fA={...hA,...iA},yA=AA=>{eA=!0,w.has(AA)&&($=!0,w.delete(AA)),S.needsAnimating[AA]=!0;const MA=e.getValue(AA);MA&&(MA.liveStyle=!1)};for(const AA in fA){const MA=iA[AA],q=hA[AA];if(v.hasOwnProperty(AA))continue;let N=!1;L3(MA)&&L3(q)?N=!T2(MA,q):N=MA!==q,N?MA!=null?yA(AA):w.add(AA):MA!==void 0&&w.has(AA)?yA(AA):S.protectedKeys[AA]=!0}S.prevProp=x,S.prevResolvedValues=iA,S.isActive&&(v={...v,...iA}),(n||s)&&e.blockInitialAnimation&&(eA=!1);const X=W&&z;eA&&(!X||$)&&f.push(...rA.map(AA=>{const MA={type:M};if(typeof AA=="string"&&(n||s)&&!X&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,N=dG(q,AA);if(q.enteringChildren&&N){const{delayChildren:dA}=N.transition||{};MA.delay=Vx(q.enteringChildren,e,dA)}}return{animation:AA,options:MA}}))}if(w.size){const Z={};if(typeof g.initial!="boolean"){const M=dG(e,Array.isArray(g.initial)?g.initial[0]:g.initial);M&&M.transition&&(Z.transition=M.transition)}w.forEach(M=>{const S=e.getBaseTarget(M),x=e.getValue(M);x&&(x.liveStyle=!0),Z[M]=S??null}),f.push({animation:Z})}let E=!!f.length;return n&&(g.initial===!1||g.initial===g.animate)&&!e.manuallyAnimateOnMount&&(E=!1),n=!1,s=!1,E?A(f):Promise.resolve()}function c(l,g){if(t[l].isActive===g)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,g)),t[l].isActive=g;const u=o(l);for(const f in t)t[f].protectedKeys={};return u}return{animateChanges:o,setActive:c,setAnimateFunction:a,getState:()=>t,reset:()=>{t=R2(),s=!0}}}function U$(e,A){return typeof A=="string"?A!==e:Array.isArray(A)?!T2(A,e):!1}function GG(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function R2(){return{animate:GG(!0),whileInView:GG(),whileHover:GG(),whileTap:GG(),whileDrag:GG(),whileFocus:GG(),exit:GG()}}function gy(e,A){e.min=A.min,e.max=A.max}function aB(e,A){gy(e.x,A.x),gy(e.y,A.y)}function S2(e,A){e.translate=A.translate,e.scale=A.scale,e.originPoint=A.originPoint,e.origin=A.origin}const V2=1e-4,D$=1-V2,F$=1+V2,W2=.01,M$=0-W2,x$=0+W2;function la(e){return e.max-e.min}function P$(e,A,t){return Math.abs(e-A)<=t}function N2(e,A,t,n=.5){e.origin=n,e.originPoint=Hn(A.min,A.max,e.origin),e.scale=la(t)/la(A),e.translate=Hn(t.min,t.max,e.origin)-e.originPoint,(e.scale>=D$&&e.scale<=F$||isNaN(e.scale))&&(e.scale=1),(e.translate>=M$&&e.translate<=x$||isNaN(e.translate))&&(e.translate=0)}function JQ(e,A,t,n){N2(e.x,A.x,t.x,n?n.originX:void 0),N2(e.y,A.y,t.y,n?n.originY:void 0)}function z2(e,A,t,n=0){const s=n?Hn(t.min,t.max,n):t.min;e.min=s+A.min,e.max=e.min+la(A)}function T$(e,A,t,n){z2(e.x,A.x,t.x,n?.x),z2(e.y,A.y,t.y,n?.y)}function L2(e,A,t,n=0){const s=n?Hn(t.min,t.max,n):t.min;e.min=A.min-s,e.max=e.min+la(A)}function zI(e,A,t,n){L2(e.x,A.x,t.x,n?.x),L2(e.y,A.y,t.y,n?.y)}function X2(e,A,t,n,s){return e-=A,e=WI(e,1/t,n),s!==void 0&&(e=WI(e,1/s,n)),e}function R$(e,A=0,t=1,n=.5,s,r=e,a=e){if(hc.test(A)&&(A=parseFloat(A),A=Hn(a.min,a.max,A/100)-a.min),typeof A!="number")return;let o=Hn(r.min,r.max,n);e===r&&(o-=A),e.min=X2(e.min,A,t,o,s),e.max=X2(e.max,A,t,o,s)}function O2(e,A,[t,n,s],r,a){R$(e,A[t],A[n],A[s],A.scale,r,a)}const S$=["x","scaleX","originX"],V$=["y","scaleY","originY"];function J2(e,A,t,n){O2(e.x,A,S$,t?t.x:void 0,n?n.x:void 0),O2(e.y,A,V$,t?t.y:void 0,n?n.y:void 0)}function K2(e){return e.translate===0&&e.scale===1}function j2(e){return K2(e.x)&&K2(e.y)}function _2(e,A){return e.min===A.min&&e.max===A.max}function W$(e,A){return _2(e.x,A.x)&&_2(e.y,A.y)}function q2(e,A){return Math.round(e.min)===Math.round(A.min)&&Math.round(e.max)===Math.round(A.max)}function $2(e,A){return q2(e.x,A.x)&&q2(e.y,A.y)}function AP(e){return la(e.x)/la(e.y)}function eP(e,A){return e.translate===A.translate&&e.scale===A.scale&&e.originPoint===A.originPoint}function Qc(e){return[e("x"),e("y")]}function N$(e,A,t){let n="";const s=e.x.translate/A.x,r=e.y.translate/A.y,a=t?.z||0;if((s||r||a)&&(n=`translate3d(${s}px, ${r}px, ${a}px) `),(A.x!==1||A.y!==1)&&(n+=`scale(${1/A.x}, ${1/A.y}) `),t){const{transformPerspective:l,rotate:g,rotateX:u,rotateY:f,skewX:w,skewY:v}=t;l&&(n=`perspective(${l}px) ${n}`),g&&(n+=`rotate(${g}deg) `),u&&(n+=`rotateX(${u}deg) `),f&&(n+=`rotateY(${f}deg) `),w&&(n+=`skewX(${w}deg) `),v&&(n+=`skewY(${v}deg) `)}const o=e.x.scale*A.x,c=e.y.scale*A.y;return(o!==1||c!==1)&&(n+=`scale(${o}, ${c})`),n||"none"}const tP=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],z$=tP.length,nP=e=>typeof e=="string"?parseFloat(e):e,sP=e=>typeof e=="number"||oe.test(e);function L$(e,A,t,n,s,r){s?(e.opacity=Hn(0,t.opacity??1,X$(n)),e.opacityExit=Hn(A.opacity??1,0,O$(n))):r&&(e.opacity=Hn(A.opacity??1,t.opacity??1,n));for(let a=0;a<z$;a++){const o=tP[a];let c=rP(A,o),l=rP(t,o);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||sP(c)===sP(l)?(e[o]=Math.max(Hn(nP(c),nP(l),n),0),(hc.test(l)||hc.test(c))&&(e[o]+="%")):e[o]=l}(A.rotate||t.rotate)&&(e.rotate=Hn(A.rotate||0,t.rotate||0,n))}function rP(e,A){return e[A]!==void 0?e[A]:e.borderRadius}const X$=aP(0,.5,tx),O$=aP(.5,.95,lo);function aP(e,A,t){return n=>n<e?0:n>A?1:t(RQ(e,A,n))}function J$(e,A,t){const n=Dr(e)?e:Qh(e);return n.start(N3("",n,A,t)),n.animation}function KQ(e,A,t,n={passive:!0}){return e.addEventListener(A,t,n),()=>e.removeEventListener(A,t)}const K$=(e,A)=>e.depth-A.depth;class j${constructor(){this.children=[],this.isDirty=!1}add(A){g3(this.children,A),this.isDirty=!0}remove(A){HI(this.children,A),this.isDirty=!0}forEach(A){this.isDirty&&this.children.sort(K$),this.isDirty=!1,this.children.forEach(A)}}function _$(e,A){const t=ca.now(),n=({timestamp:s})=>{const r=s-t;r>=A&&(td(n),e(r-A))};return Bn.setup(n,!0),()=>td(n)}function LI(e){return Dr(e)?e.get():e}class q${constructor(){this.members=[]}add(A){g3(this.members,A);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===A||n===this.lead||n===this.prevLead)continue;const s=n.instance;(!s||s.isConnected===!1)&&!n.snapshot&&(HI(this.members,n),n.unmount())}A.scheduleRender()}remove(A){if(HI(this.members,A),A===this.prevLead&&(this.prevLead=void 0),A===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(A){for(let t=this.members.indexOf(A)-1;t>=0;t--){const n=this.members[t];if(n.isPresent!==!1&&n.instance?.isConnected!==!1)return this.promote(n),!0}return!1}promote(A,t){const n=this.lead;if(A!==n&&(this.prevLead=n,this.lead=A,A.show(),n)){n.updateSnapshot(),A.scheduleRender();const{layoutDependency:s}=n.options,{layoutDependency:r}=A.options;(s===void 0||s!==r)&&(A.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(A.snapshot=n.snapshot,A.snapshot.latestValues=n.animationValues||n.latestValues),A.root?.isUpdating&&(A.isLayoutDirty=!0)),A.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(A=>{A.options.onExitComplete?.(),A.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(A=>A.instance&&A.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const XI={hasAnimatedSinceResize:!0,hasEverUpdated:!1},dy=["","X","Y","Z"],$$=1e3;let AAA=0;function uy(e,A,t,n){const{latestValues:s}=A;s[e]&&(t[e]=s[e],A.setStaticValue(e,0),n&&(n[e]=0))}function iP(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:A}=e.options;if(!A)return;const t=Jx(A);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:s,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(t,"transform",Bn,!(s||r))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&iP(n)}function oP({attachResizeListener:e,defaultParent:A,measureScroll:t,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(a={},o=A?.()){this.id=AAA++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(nAA),this.nodes.forEach(BAA),this.nodes.forEach(cAA),this.nodes.forEach(sAA)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new j$)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new u3),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const c=this.eventHandlers.get(a);c&&c.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=ty(a)&&!t$(a),this.instance=a;const{layoutId:o,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||o)&&(this.isLayoutDirty=!0),e){let g,u=0;const f=()=>this.root.updateBlockedByResize=!1;Bn.read(()=>{u=window.innerWidth}),e(a,()=>{const w=window.innerWidth;w!==u&&(u=w,this.root.updateBlockedByResize=!0,g&&g(),g=_$(f,250),XI.hasAnimatedSinceResize&&(XI.hasAnimatedSinceResize=!1,this.nodes.forEach(lP)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&l&&(o||c)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:u,hasRelativeLayoutChanged:f,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||l.getDefaultTransition()||GAA,{onLayoutAnimationStart:H,onLayoutAnimationComplete:E}=l.getProps(),Z=!this.targetLayout||!$2(this.targetLayout,w),M=!u&&f;if(this.options.layoutRoot||this.resumeFrom||M||u&&(Z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...W3(v,"layout"),onPlay:H,onComplete:E};(l.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(g,M)}else u||lP(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),td(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(lAA),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&iP(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const u=this.path[g];u.shouldResetTransform=!0,(typeof u.latestValues.x=="string"||typeof u.latestValues.y=="string")&&(u.isLayoutDirty=!0),u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:o,layout:c}=this.options;if(o===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(aAA),this.nodes.forEach(BP);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(cP);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(iAA),this.nodes.forEach(oAA),this.nodes.forEach(eAA),this.nodes.forEach(tAA)):this.nodes.forEach(cP),this.clearAllSnapshots();const o=ca.now();Ur.delta=fc(0,1e3/60,o-Ur.timestamp),Ur.timestamp=o,Ur.isProcessing=!0,h3.update.process(Ur),h3.preRender.process(Ur),h3.render.process(Ur),Ur.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$3.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rAA),this.sharedNodes.forEach(gAA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Bn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Bn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!la(this.snapshot.measuredBox.x)&&!la(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ks()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!j2(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,g=l!==this.prevTransformTemplateValue;a&&this.instance&&(o||uG(this.latestValues)||g)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let c=this.removeElementScroll(o);return a&&(c=this.removeTransform(c)),fAA(c),{animationId:this.root.animationId,measuredBox:o,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Ks();const o=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(hAA))){const{scroll:l}=this.root;l&&(wc(o.x,l.offset.x),wc(o.y,l.offset.y))}return o}removeElementScroll(a){const o=Ks();if(aB(o,a),this.scroll?.wasRoot)return o;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:g,options:u}=l;l!==this.root&&g&&u.layoutScroll&&(g.wasRoot&&aB(o,a),wc(o.x,g.offset.x),wc(o.y,g.offset.y))}return o}applyTransform(a,o=!1,c){const l=c||Ks();aB(l,a);for(let g=0;g<this.path.length;g++){const u=this.path[g];!o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&(wc(l.x,-u.scroll.offset.x),wc(l.y,-u.scroll.offset.y)),uG(u.latestValues)&&NI(l,u.latestValues,u.layout?.layoutBox)}return uG(this.latestValues)&&NI(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(a){const o=Ks();aB(o,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!uG(l.latestValues))continue;let g;l.instance&&(iy(l.latestValues)&&l.updateSnapshot(),g=Ks(),aB(g,l.measurePageBox())),J2(o,l.latestValues,l.snapshot?.layoutBox,g)}return uG(this.latestValues)&&J2(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Ur.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==o;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:u}=this.options;if(!this.layout||!(g||u))return;this.resolvedRelativeTargetAt=Ur.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ks(),this.targetWithTransforms=Ks()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),T$(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):aB(this.target,this.layout.layoutBox),p2(this.target,this.targetDelta)):aB(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||iy(this.parent.latestValues)||C2(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,o,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ks(),this.relativeTargetOrigin=Ks(),zI(this.relativeTargetOrigin,o,c,this.options.layoutAnchor||void 0),aB(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),o=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ur.timestamp&&(c=!1),c)return;const{layout:l,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||g))return;aB(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,f=this.treeScale.y;d$(this.layoutCorrected,this.treeScale,this.path,o),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ks());const{target:w}=a;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(S2(this.prevProjectionDelta.x,this.projectionDelta.x),S2(this.prevProjectionDelta.y,this.projectionDelta.y)),JQ(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==f||!eP(this.projectionDelta.x,this.prevProjectionDelta.x)||!eP(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ch(),this.projectionDelta=Ch(),this.projectionDeltaWithTransform=Ch()}setAnimationOrigin(a,o=!1){const c=this.snapshot,l=c?c.latestValues:{},g={...this.latestValues},u=Ch();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=Ks(),w=c?c.source:void 0,v=this.layout?this.layout.source:void 0,H=w!==v,E=this.getStack(),Z=!E||E.members.length<=1,M=!!(H&&!Z&&this.options.crossfade===!0&&!this.path.some(uAA));this.animationProgress=0;let S;this.mixTargetDelta=x=>{const D=x/1e3;gP(u.x,a.x,D),gP(u.y,a.y,D),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zI(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),dAA(this.relativeTarget,this.relativeTargetOrigin,f,D),S&&W$(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Ks()),aB(S,this.relativeTarget)),H&&(this.animationValues=g,L$(g,l,this.latestValues,D,M,Z)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=D},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(td(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Bn.update(()=>{XI.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qh(0)),this.motionValue.jump(0,!1),this.currentAnimation=J$(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:o=>{this.mixTargetDelta(o),a.onUpdate&&a.onUpdate(o)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta($$),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:c,layout:l,latestValues:g}=a;if(!(!o||!c||!l)){if(this!==a&&this.layout&&l&&hP(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ks();const u=la(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+u;const f=la(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}aB(o,c),NI(o,g),JQ(this.projectionDeltaWithTransform,this.layoutCorrected,o,g)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new q$),this.sharedNodes.get(a).add(o);const l=o.options.initialPromotionConfig;o.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(o=!0),!o)return;const l={};c.z&&uy("z",a,l,this.animationValues);for(let g=0;g<dy.length;g++)uy(`rotate${dy[g]}`,a,l,this.animationValues),uy(`skew${dy[g]}`,a,l,this.animationValues);a.render();for(const g in l)a.setStaticValue(g,l[g]),this.animationValues&&(this.animationValues[g]=l[g]);a.scheduleRender()}applyProjectionStyles(a,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=LI(o?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=LI(o?.pointerEvents)||""),this.hasProjected&&!uG(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const g=l.animationValues||l.latestValues;this.applyTransformsToTarget();let u=N$(this.projectionDeltaWithTransform,this.treeScale,g);c&&(u=c(g,u)),a.transform=u;const{x:f,y:w}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${w.origin*100}% 0`,l.animationValues?a.opacity=l===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:a.opacity=l===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const v in cy){if(g[v]===void 0)continue;const{correct:H,applyTo:E,isCSSVariable:Z}=cy[v],M=u==="none"?g[v]:H(g[v],l);if(E){const S=E.length;for(let x=0;x<S;x++)a[E[x]]=M}else Z?this.options.visualElement.renderState.vars[v]=M:a[v]=M}this.options.layoutId&&(a.pointerEvents=l===this?LI(o?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(BP),this.root.sharedNodes.clear()}}}function eAA(e){e.updateLayout()}function tAA(e){const A=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&A&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:s}=e.options,r=A.source!==e.layout.source;if(s==="size")Qc(g=>{const u=r?A.measuredBox[g]:A.layoutBox[g],f=la(u);u.min=t[g].min,u.max=u.min+f});else if(s==="x"||s==="y"){const g=s==="x"?"y":"x";gy(r?A.measuredBox[g]:A.layoutBox[g],t[g])}else hP(s,A.layoutBox,t)&&Qc(g=>{const u=r?A.measuredBox[g]:A.layoutBox[g],f=la(t[g]);u.max=u.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+f)});const a=Ch();JQ(a,t,A.layoutBox);const o=Ch();r?JQ(o,e.applyTransform(n,!0),A.measuredBox):JQ(o,t,A.layoutBox);const c=!j2(a);let l=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:u,layout:f}=g;if(u&&f){const w=e.options.layoutAnchor||void 0,v=Ks();zI(v,A.layoutBox,u.layoutBox,w);const H=Ks();zI(H,t,f.layoutBox,w),$2(v,H)||(l=!0),g.options.layoutRoot&&(e.relativeTarget=H,e.relativeTargetOrigin=v,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:A,delta:o,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function nAA(e){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 sAA(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function rAA(e){e.clearSnapshot()}function BP(e){e.clearMeasurements()}function aAA(e){e.isLayoutDirty=!0,e.updateLayout()}function cP(e){e.isLayoutDirty=!1}function iAA(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function oAA(e){const{visualElement:A}=e.options;A&&A.getProps().onBeforeLayoutMeasure&&A.notify("BeforeLayoutMeasure"),e.resetTransform()}function lP(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function BAA(e){e.resolveTargetDelta()}function cAA(e){e.calcProjection()}function lAA(e){e.resetSkewAndRotation()}function gAA(e){e.removeLeadSnapshot()}function gP(e,A,t){e.translate=Hn(A.translate,0,t),e.scale=Hn(A.scale,1,t),e.origin=A.origin,e.originPoint=A.originPoint}function dP(e,A,t,n){e.min=Hn(A.min,t.min,n),e.max=Hn(A.max,t.max,n)}function dAA(e,A,t,n){dP(e.x,A.x,t.x,n),dP(e.y,A.y,t.y,n)}function uAA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const GAA={duration:.45,ease:[.4,0,.1,1]},uP=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),GP=uP("applewebkit/")&&!uP("chrome/")?Math.round:lo;function fP(e){e.min=GP(e.min),e.max=GP(e.max)}function fAA(e){fP(e.x),fP(e.y)}function hP(e,A,t){return e==="position"||e==="preserve-aspect"&&!P$(AP(A),AP(t),.2)}function hAA(e){return e!==e.root&&e.scroll?.wasRoot}const wAA=oP({attachResizeListener:(e,A)=>KQ(e,"resize",A),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Gy={current:void 0},wP=oP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Gy.current){const e=new wAA({});e.mount(window),e.setOptions({layoutScroll:!0}),Gy.current=e}return Gy.current},resetTransform:(e,A)=>{e.style.transform=A!==void 0?A:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fy=R.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function QP(e,A){if(typeof e=="function")return e(A);e!=null&&(e.current=A)}function QAA(...e){return A=>{let t=!1;const n=e.map(s=>{const r=QP(s,A);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let s=0;s<n.length;s++){const r=n[s];typeof r=="function"?r():QP(e[s],null)}}}}function bAA(...e){return R.useCallback(QAA(...e),e)}class CAA extends R.Component{getSnapshotBeforeUpdate(A){const t=this.props.childRef.current;if(FI(t)&&A.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const n=t.offsetParent,s=FI(n)&&n.offsetWidth||0,r=FI(n)&&n.offsetHeight||0,a=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(a.height),o.width=parseFloat(a.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=s-o.width-o.left,o.bottom=r-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function vAA({children:e,isPresent:A,anchorX:t,anchorY:n,root:s,pop:r}){const a=R.useId(),o=R.useRef(null),c=R.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=R.useContext(fy),g=e.props?.ref??e?.ref,u=bAA(o,g);return R.useInsertionEffect(()=>{const{width:f,height:w,top:v,left:H,right:E,bottom:Z}=c.current;if(A||r===!1||!o.current||!f||!w)return;const M=t==="left"?`left: ${H}`:`right: ${E}`,S=n==="bottom"?`bottom: ${Z}`:`top: ${v}`;o.current.dataset.motionPopId=a;const x=document.createElement("style");l&&(x.nonce=l);const D=s??document.head;return D.appendChild(x),x.sheet&&x.sheet.insertRule(`
|
|
56
|
+
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let g=tB(),u;if(A){let E=typeof A=="string"?oG(A):A;As(c==="/"||E.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${E.pathname}" was given in the \`location\` prop.`),u=E}else u=g;let f=u.pathname||"/",w=f;if(c!=="/"){let E=c.replace(/^\//,"").split("/");w="/"+f.replace(/^\//,"").split("/").slice(E.length).join("/")}let v=IM(e,{pathname:w});eB(l||v!=null,`No routes matched location "${u.pathname}${u.search}${u.hash}" `),eB(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${u.pathname}${u.search}${u.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let H=Jj(v&&v.map(E=>Object.assign({},E,{params:Object.assign({},a,E.params),pathname:uc([c,n.encodeLocation?n.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?c:uc([c,n.encodeLocation?n.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),s,t);return A&&H?R.createElement(DQ.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...u},navigationType:"POP"}},H):H}function zj(){let e=$j(),A=kj(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},r={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=R.createElement(R.Fragment,null,R.createElement("p",null,"💿 Hey developer 👋"),R.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",R.createElement("code",{style:r},"ErrorBoundary")," or"," ",R.createElement("code",{style:r},"errorElement")," prop on your route.")),R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},A),t?R.createElement("pre",{style:s},t):null,a)}var Lj=R.createElement(zj,null),TM=class extends R.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,A){return A.location!==e.location||A.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:A.error,location:A.location,revalidation:e.revalidation||A.revalidation}}componentDidCatch(e,A){this.props.onError?this.props.onError(e,A):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const t=Sj(e.digest);t&&(e=t)}let A=e!==void 0?R.createElement(ml.Provider,{value:this.props.routeContext},R.createElement(_E.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?R.createElement(Xj,{error:e},A):A}};TM.contextType=UM;var qE=new WeakMap;function Xj({children:e,error:A}){let{basename:t}=R.useContext(co);if(typeof A=="object"&&A&&"digest"in A&&typeof A.digest=="string"){let n=Rj(A.digest);if(n){let s=qE.get(A);if(s)throw s;let r=ZM(n.location,t);if(YM&&!qE.get(A))if(r.isExternal||n.reloadDocument)window.location.href=r.absoluteURL||r.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(r.to,{replace:n.replace}));throw qE.set(A,a),a}return R.createElement("meta",{httpEquiv:"refresh",content:`0;url=${r.absoluteURL||r.to}`})}}return e}function Oj({routeContext:e,match:A,children:t}){let n=R.useContext(dh);return n&&n.static&&n.staticContext&&(A.route.errorElement||A.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=A.route.id),R.createElement(ml.Provider,{value:e},t)}function Jj(e,A=[],t){let n=t?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(A.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,r=n?.errors;if(r!=null){let g=s.findIndex(u=>u.route.id&&r?.[u.route.id]!==void 0);As(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(r).join(",")}`),s=s.slice(0,Math.min(s.length,g+1))}let a=!1,o=-1;if(t&&n){a=n.renderFallback;for(let g=0;g<s.length;g++){let u=s[g];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(o=g),u.route.id){let{loaderData:f,errors:w}=n,v=u.route.loader&&!f.hasOwnProperty(u.route.id)&&(!w||w[u.route.id]===void 0);if(u.route.lazy||v){t.isStatic&&(a=!0),o>=0?s=s.slice(0,o+1):s=[s[0]];break}}}}let c=t?.onError,l=n&&c?(g,u)=>{c(g,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Uj(n.matches),errorInfo:u})}:void 0;return s.reduceRight((g,u,f)=>{let w,v=!1,H=null,E=null;n&&(w=r&&u.route.id?r[u.route.id]:void 0,H=u.route.errorElement||Lj,a&&(o<0&&f===0?(SM("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,E=null):o===f&&(v=!0,E=u.route.hydrateFallbackElement||null)));let Z=A.concat(s.slice(0,f+1)),M=()=>{let S;return w?S=H:v?S=E:u.route.Component?S=R.createElement(u.route.Component,null):u.route.element?S=u.route.element:S=g,R.createElement(Oj,{match:u,routeContext:{outlet:g,matches:Z,isDataRoute:n!=null},children:S})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?R.createElement(TM,{location:n.location,revalidation:n.revalidation,component:H,error:w,children:M(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:l}):M()},null)}function $E(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kj(e){let A=R.useContext(dh);return As(A,$E(e)),A}function jj(e){let A=R.useContext(GI);return As(A,$E(e)),A}function _j(e){let A=R.useContext(ml);return As(A,$E(e)),A}function A3(e){let A=_j(e),t=A.matches[A.matches.length-1];return As(t.route.id,`${e} can only be used on routes that contain a unique "id"`),t.route.id}function qj(){return A3("useRouteId")}function $j(){let e=R.useContext(_E),A=jj("useRouteError"),t=A3("useRouteError");return e!==void 0?e:A.errors?.[t]}function A_(){let{router:e}=Kj("useNavigate"),A=A3("useNavigate"),t=R.useRef(!1);return xM(()=>{t.current=!0}),R.useCallback(async(s,r={})=>{eB(t.current,MM),t.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:A,...r}))},[e,A])}var RM={};function SM(e,A,t){!A&&!RM[e]&&(RM[e]=!0,eB(!1,t))}R.memo(e_);function e_({routes:e,future:A,state:t,isStatic:n,onError:s}){return PM(e,void 0,{state:t,isStatic:n,onError:s})}function t_({basename:e,children:A,initialEntries:t,initialIndex:n,unstable_useTransitions:s}){let r=R.useRef();r.current==null&&(r.current=oj({initialEntries:t,initialIndex:n,v5Compat:!0}));let a=r.current,[o,c]=R.useState({action:a.action,location:a.location}),l=R.useCallback(g=>{s===!1?c(g):R.startTransition(()=>c(g))},[s]);return R.useLayoutEffect(()=>a.listen(l),[a,l]),R.createElement(n_,{basename:e,children:A,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:s})}function Gc(e){As(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function n_({basename:e="/",children:A=null,location:t,navigationType:n="POP",navigator:s,static:r=!1,unstable_useTransitions:a}){As(!FQ(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),c=R.useMemo(()=>({basename:o,navigator:s,static:r,unstable_useTransitions:a,future:{}}),[o,s,r,a]);typeof t=="string"&&(t=oG(t));let{pathname:l="/",search:g="",hash:u="",state:f=null,key:w="default",unstable_mask:v}=t,H=R.useMemo(()=>{let E=Hl(l,o);return E==null?null:{location:{pathname:E,search:g,hash:u,state:f,key:w,unstable_mask:v},navigationType:n}},[o,l,g,u,f,w,n,v]);return eB(H!=null,`<Router basename="${o}"> is not able to match the URL "${l}${g}${u}" because it does not start with the basename, so the <Router> won't render anything.`),H==null?null:R.createElement(co.Provider,{value:c},R.createElement(DQ.Provider,{children:A,value:H}))}function s_({children:e,location:A}){return Nj(e3(e),A)}function e3(e,A=[]){let t=[];return R.Children.forEach(e,(n,s)=>{if(!R.isValidElement(n))return;let r=[...A,s];if(n.type===R.Fragment){t.push.apply(t,e3(n.props.children,r));return}As(n.type===Gc,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),As(!n.props.index||!n.props.children,"An index route cannot have child routes.");let a={id:n.props.id||r.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=e3(n.props.children,r)),t.push(a)}),t}var fI="get",hI="application/x-www-form-urlencoded";function wI(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function r_(e){return wI(e)&&e.tagName.toLowerCase()==="button"}function a_(e){return wI(e)&&e.tagName.toLowerCase()==="form"}function i_(e){return wI(e)&&e.tagName.toLowerCase()==="input"}function o_(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function B_(e,A){return e.button===0&&(!A||A==="_self")&&!o_(e)}var QI=null;function c_(){if(QI===null)try{new FormData(document.createElement("form"),0),QI=!1}catch{QI=!0}return QI}var l_=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function t3(e){return e!=null&&!l_.has(e)?(eB(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${hI}"`),null):e}function g_(e,A){let t,n,s,r,a;if(a_(e)){let o=e.getAttribute("action");n=o?Hl(o,A):null,t=e.getAttribute("method")||fI,s=t3(e.getAttribute("enctype"))||hI,r=new FormData(e)}else if(r_(e)||i_(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||o.getAttribute("action");if(n=c?Hl(c,A):null,t=e.getAttribute("formmethod")||o.getAttribute("method")||fI,s=t3(e.getAttribute("formenctype"))||t3(o.getAttribute("enctype"))||hI,r=new FormData(o,e),!c_()){let{name:l,type:g,value:u}=e;if(g==="image"){let f=l?`${l}.`:"";r.append(`${f}x`,"0"),r.append(`${f}y`,"0")}else l&&r.append(l,u)}}else{if(wI(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=fI,n=null,s=hI,a=e}return r&&s==="text/plain"&&(a=r,r=void 0),{action:n,method:t.toLowerCase(),encType:s,formData:r,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function n3(e,A){if(e===!1||e===null||typeof e>"u")throw new Error(A)}function VM(e,A,t,n){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${n}`:s.pathname=`${s.pathname}.${n}`:s.pathname==="/"?s.pathname=`_root.${n}`:A&&Hl(s.pathname,A)==="/"?s.pathname=`${A.replace(/\/$/,"")}/_root.${n}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${n}`,s}async function d_(e,A){if(e.id in A)return A[e.id];try{let t=await import(e.module);return A[e.id]=t,t}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function u_(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function G_(e,A,t){let n=await Promise.all(e.map(async s=>{let r=A.routes[s.route.id];if(r){let a=await d_(r,t);return a.links?a.links():[]}return[]}));return Q_(n.flat(1).filter(u_).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function WM(e,A,t,n,s,r){let a=(c,l)=>t[l]?c.route.id!==t[l].route.id:!0,o=(c,l)=>t[l].pathname!==c.pathname||t[l].route.path?.endsWith("*")&&t[l].params["*"]!==c.params["*"];return r==="assets"?A.filter((c,l)=>a(c,l)||o(c,l)):r==="data"?A.filter((c,l)=>{let g=n.routes[c.route.id];if(!g||!g.hasLoader)return!1;if(a(c,l)||o(c,l))return!0;if(c.route.shouldRevalidate){let u=c.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof u=="boolean")return u}return!0}):[]}function f_(e,A,{includeHydrateFallback:t}={}){return h_(e.map(n=>{let s=A.routes[n.route.id];if(!s)return[];let r=[s.module];return s.clientActionModule&&(r=r.concat(s.clientActionModule)),s.clientLoaderModule&&(r=r.concat(s.clientLoaderModule)),t&&s.hydrateFallbackModule&&(r=r.concat(s.hydrateFallbackModule)),s.imports&&(r=r.concat(s.imports)),r}).flat(1))}function h_(e){return[...new Set(e)]}function w_(e){let A={},t=Object.keys(e).sort();for(let n of t)A[n]=e[n];return A}function Q_(e,A){let t=new Set;return new Set(A),e.reduce((n,s)=>{let r=JSON.stringify(w_(s));return t.has(r)||(t.add(r),n.push({key:r,link:s})),n},[])}function s3(){let e=R.useContext(dh);return n3(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function b_(){let e=R.useContext(GI);return n3(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var r3=R.createContext(void 0);r3.displayName="FrameworkContext";function a3(){let e=R.useContext(r3);return n3(e,"You must render this element inside a <HydratedRouter> element"),e}function C_(e,A){let t=R.useContext(r3),[n,s]=R.useState(!1),[r,a]=R.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:l,onMouseLeave:g,onTouchStart:u}=A,f=R.useRef(null);R.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let H=Z=>{Z.forEach(M=>{a(M.isIntersecting)})},E=new IntersectionObserver(H,{threshold:.5});return f.current&&E.observe(f.current),()=>{E.disconnect()}}},[e]),R.useEffect(()=>{if(n){let H=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(H)}}},[n]);let w=()=>{s(!0)},v=()=>{s(!1),a(!1)};return t?e!=="intent"?[r,f,{}]:[r,f,{onFocus:xQ(o,w),onBlur:xQ(c,v),onMouseEnter:xQ(l,w),onMouseLeave:xQ(g,v),onTouchStart:xQ(u,w)}]:[!1,f,{}]}function xQ(e,A){return t=>{e&&e(t),t.defaultPrevented||A(t)}}function v_({page:e,...A}){let t=Fj(),{router:n}=s3(),s=R.useMemo(()=>IM(n.routes,e,n.basename),[n.routes,e,n.basename]);return s?t?R.createElement(p_,{page:e,matches:s,...A}):R.createElement(H_,{page:e,matches:s,...A}):null}function I_(e){let{manifest:A,routeModules:t}=a3(),[n,s]=R.useState([]);return R.useEffect(()=>{let r=!1;return G_(e,A,t).then(a=>{r||s(a)}),()=>{r=!0}},[e,A,t]),n}function p_({page:e,matches:A,...t}){let n=tB(),{future:s}=a3(),{basename:r}=s3(),a=R.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let o=VM(e,r,s.unstable_trailingSlashAwareDataRequests,"rsc"),c=!1,l=[];for(let g of A)typeof g.route.shouldRevalidate=="function"?c=!0:l.push(g.route.id);return c&&l.length>0&&o.searchParams.set("_routes",l.join(",")),[o.pathname+o.search]},[r,s.unstable_trailingSlashAwareDataRequests,e,n,A]);return R.createElement(R.Fragment,null,a.map(o=>R.createElement("link",{key:o,rel:"prefetch",as:"fetch",href:o,...t})))}function H_({page:e,matches:A,...t}){let n=tB(),{future:s,manifest:r,routeModules:a}=a3(),{basename:o}=s3(),{loaderData:c,matches:l}=b_(),g=R.useMemo(()=>WM(e,A,l,r,n,"data"),[e,A,l,r,n]),u=R.useMemo(()=>WM(e,A,l,r,n,"assets"),[e,A,l,r,n]),f=R.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let H=new Set,E=!1;if(A.forEach(M=>{let S=r.routes[M.route.id];!S||!S.hasLoader||(!g.some(x=>x.route.id===M.route.id)&&M.route.id in c&&a[M.route.id]?.shouldRevalidate||S.hasClientLoader?E=!0:H.add(M.route.id))}),H.size===0)return[];let Z=VM(e,o,s.unstable_trailingSlashAwareDataRequests,"data");return E&&H.size>0&&Z.searchParams.set("_routes",A.filter(M=>H.has(M.route.id)).map(M=>M.route.id).join(",")),[Z.pathname+Z.search]},[o,s.unstable_trailingSlashAwareDataRequests,c,n,r,g,A,e,a]),w=R.useMemo(()=>f_(u,r),[u,r]),v=I_(u);return R.createElement(R.Fragment,null,f.map(H=>R.createElement("link",{key:H,rel:"prefetch",as:"fetch",href:H,...t})),w.map(H=>R.createElement("link",{key:H,rel:"modulepreload",href:H,...t})),v.map(({key:H,link:E})=>R.createElement("link",{key:H,nonce:t.nonce,...E,crossOrigin:E.crossOrigin??t.crossOrigin})))}function m_(...e){return A=>{e.forEach(t=>{typeof t=="function"?t(A):t!=null&&(t.current=A)})}}var E_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{E_&&(window.__reactRouterVersion="7.14.0")}catch{}var NM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bI=R.forwardRef(function({onClick:A,discover:t="render",prefetch:n="none",relative:s,reloadDocument:r,replace:a,unstable_mask:o,state:c,target:l,to:g,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:w,...v},H){let{basename:E,navigator:Z,unstable_useTransitions:M}=R.useContext(co),S=typeof g=="string"&&NM.test(g),x=ZM(g,E);g=x.to;let D=Vj(g,{relative:s}),V=tB(),W=null;if(o){let yA=jE(o,[],V.unstable_mask?V.unstable_mask.pathname:"/",!0);E!=="/"&&(yA.pathname=yA.pathname==="/"?E:uc([E,yA.pathname])),W=Z.createHref(yA)}let[z,eA,$]=C_(n,v),rA=k_(g,{replace:a,unstable_mask:o,state:c,target:l,preventScrollReset:u,relative:s,viewTransition:f,unstable_defaultShouldRevalidate:w,unstable_useTransitions:M});function iA(yA){A&&A(yA),yA.defaultPrevented||rA(yA)}let hA=!(x.isExternal||r),fA=R.createElement("a",{...v,...$,href:(hA?W:void 0)||x.absoluteURL||D,onClick:hA?iA:A,ref:m_(H,eA),target:l,"data-discover":!S&&t==="render"?"true":void 0});return z&&!S?R.createElement(R.Fragment,null,fA,R.createElement(v_,{page:D})):fA});bI.displayName="Link";var y_=R.forwardRef(function({"aria-current":A="page",caseSensitive:t=!1,className:n="",end:s=!1,style:r,to:a,viewTransition:o,children:c,...l},g){let u=MQ(a,{relative:l.relative}),f=tB(),w=R.useContext(GI),{navigator:v,basename:H}=R.useContext(co),E=w!=null&&x_(u)&&o===!0,Z=v.encodeLocation?v.encodeLocation(u).pathname:u.pathname,M=f.pathname,S=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;t||(M=M.toLowerCase(),S=S?S.toLowerCase():null,Z=Z.toLowerCase()),S&&H&&(S=Hl(S,H)||S);const x=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let D=M===Z||!s&&M.startsWith(Z)&&M.charAt(x)==="/",V=S!=null&&(S===Z||!s&&S.startsWith(Z)&&S.charAt(Z.length)==="/"),W={isActive:D,isPending:V,isTransitioning:E},z=D?A:void 0,eA;typeof n=="function"?eA=n(W):eA=[n,D?"active":null,V?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let $=typeof r=="function"?r(W):r;return R.createElement(bI,{...l,"aria-current":z,className:eA,ref:g,style:$,to:a,viewTransition:o},typeof c=="function"?c(W):c)});y_.displayName="NavLink";var Y_=R.forwardRef(({discover:e="render",fetcherKey:A,navigate:t,reloadDocument:n,replace:s,state:r,method:a=fI,action:o,onSubmit:c,relative:l,preventScrollReset:g,viewTransition:u,unstable_defaultShouldRevalidate:f,...w},v)=>{let{unstable_useTransitions:H}=R.useContext(co),E=F_(),Z=M_(o,{relative:l}),M=a.toLowerCase()==="get"?"get":"post",S=typeof o=="string"&&NM.test(o),x=D=>{if(c&&c(D),D.defaultPrevented)return;D.preventDefault();let V=D.nativeEvent.submitter,W=V?.getAttribute("formmethod")||a,z=()=>E(V||D.currentTarget,{fetcherKey:A,method:W,navigate:t,replace:s,state:r,relative:l,preventScrollReset:g,viewTransition:u,unstable_defaultShouldRevalidate:f});H&&t!==!1?R.startTransition(()=>z()):z()};return R.createElement("form",{ref:v,method:M,action:Z,onSubmit:n?c:x,...w,"data-discover":!S&&e==="render"?"true":void 0})});Y_.displayName="Form";function Z_(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zM(e){let A=R.useContext(dh);return As(A,Z_(e)),A}function k_(e,{target:A,replace:t,unstable_mask:n,state:s,preventScrollReset:r,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let g=za(),u=tB(),f=MQ(e,{relative:a});return R.useCallback(w=>{if(B_(w,A)){w.preventDefault();let v=t!==void 0?t:dI(u)===dI(f),H=()=>g(e,{replace:v,unstable_mask:n,state:s,preventScrollReset:r,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:c});l?R.startTransition(()=>H()):H()}},[u,g,f,t,n,s,A,e,r,a,o,c,l])}var U_=0,D_=()=>`__${String(++U_)}__`;function F_(){let{router:e}=zM("useSubmit"),{basename:A}=R.useContext(co),t=qj(),n=e.fetch,s=e.navigate;return R.useCallback(async(r,a={})=>{let{action:o,method:c,encType:l,formData:g,body:u}=g_(r,A);if(a.navigate===!1){let f=a.fetcherKey||D_();await n(f,t,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:g,body:u,formMethod:a.method||c,formEncType:a.encType||l,flushSync:a.flushSync})}else await s(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:g,body:u,formMethod:a.method||c,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:t,flushSync:a.flushSync,viewTransition:a.viewTransition})},[n,s,A,t])}function M_(e,{relative:A}={}){let{basename:t}=R.useContext(co),n=R.useContext(ml);As(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),r={...MQ(e||".",{relative:A})},a=tB();if(e==null){r.search=a.search;let o=new URLSearchParams(r.search),c=o.getAll("index");if(c.some(g=>g==="")){o.delete("index"),c.filter(u=>u).forEach(u=>o.append("index",u));let g=o.toString();r.search=g?`?${g}`:""}}return(!e||e===".")&&s.route.index&&(r.search=r.search?r.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(r.pathname=r.pathname==="/"?t:uc([t,r.pathname])),dI(r)}function x_(e,{relative:A}={}){let t=R.useContext(DM);As(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=zM("useViewTransitionState"),s=MQ(e,{relative:A});if(!t.isTransitioning)return!1;let r=Hl(t.currentLocation.pathname,n)||t.currentLocation.pathname,a=Hl(t.nextLocation.pathname,n)||t.nextLocation.pathname;return uI(s.pathname,a)!=null||uI(s.pathname,r)!=null}const i3="ela@careshiphealth.com",BG="https://beta.careshiphealth.com",CI="https://api.beta.careshiphealth.com",vI=`${CI}/rt`,o3=420,PQ=540,P_=520,nB={FACE_LG_ICON:`${BG}/bolt/faceLg.svg`,AI_ASSISTANT_TALK_ICON:`${BG}/bolt/new/ai-assistant-talk-icon.svg`,AI_ASSISTANT_CHAT_ICON:`${BG}/bolt/new/ai-assistant-chat-icon.svg`,AI_ASSISTANT__CALL_ICON:`${BG}/bolt/new/ai-assistant-call-icon.svg`,AI_ASSISTANT_ICON_BW:`${BG}/bolt/new/ai-assistant-icon-bw.svg`,MINIMIZE_ICON:`${BG}/bolt/new/minimize-icon.svg`,MAXIMIZE_ICON:`${BG}/bolt/new/maximize-icon.svg`},B3="Ela",T_=e=>p.jsxs("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("path",{d:"M14.788 9.48971C14.5248 9.05746 14.1061 8.74231 13.6179 8.60892C13.1297 8.47552 12.609 8.53399 12.1625 8.77233C10.0479 9.9113 8.85588 12.1545 9.63525 14.3233C10.5054 16.7288 11.8175 18.9504 13.5041 20.8736C15.178 22.7934 17.1908 24.3887 19.4421 25.5799C21.4658 26.6469 23.8375 25.7746 25.2439 23.8137C25.5398 23.4011 25.6681 22.8917 25.603 22.3882C25.538 21.8848 25.2843 21.4247 24.8933 21.1009L23.3591 19.8338C23.0516 19.5788 22.6745 19.4221 22.2768 19.384C21.8791 19.346 21.4792 19.4283 21.1288 19.6203L18.456 21.0859L17.857 20.6704C17.1019 20.1437 16.411 19.5305 15.7985 18.8432C15.1987 18.1437 14.6865 17.3736 14.2732 16.55L13.9463 15.9052L15.7449 13.4461C15.9827 13.1198 16.1177 12.73 16.1327 12.3265C16.1477 11.923 16.042 11.5243 15.829 11.1813L14.788 9.48971ZM11.0452 6.69431C12.0219 6.171 13.1616 6.041 14.231 6.33095C15.3004 6.6209 16.2184 7.30884 16.797 8.2538L17.8352 9.94349C18.2934 10.6853 18.5203 11.5468 18.4868 12.4181C18.4533 13.2893 18.161 14.1309 17.6471 14.8353L16.7193 16.1029C16.9446 16.4768 17.2323 16.8985 17.575 17.2949C17.9164 17.6843 18.2917 18.0262 18.6269 18.299L19.9935 17.5482C20.7578 17.1299 21.63 16.9506 22.4973 17.0335C23.3646 17.1164 24.1871 17.4578 24.8582 18.0133L26.3925 19.2804C27.2451 19.9846 27.7986 20.9863 27.9411 22.0829C28.0836 23.1796 27.8044 24.2894 27.1601 25.1881C25.2861 27.8016 21.707 29.439 18.3439 27.665C15.8368 26.3392 13.5952 24.5633 11.7308 22.4261C9.84914 20.2812 8.38523 17.8032 7.41459 15.1201C6.13111 11.5432 8.22187 8.21369 11.0457 6.69662",fill:e?.color||"black"}),p.jsx("path",{d:"M25.026 11.6502L25.3027 11.0139C25.7888 9.88815 26.6795 8.9853 27.7991 8.48354L28.6541 8.10358C28.7574 8.05583 28.8449 7.97955 28.9061 7.88374C28.9674 7.78793 29 7.67659 29 7.56288C29 7.44918 28.9674 7.33784 28.9061 7.24203C28.8449 7.14622 28.7574 7.06993 28.6541 7.02218L27.8464 6.66247C26.6986 6.14642 25.7927 5.21019 25.3151 4.04664L25.0305 3.36093C24.9887 3.25454 24.9158 3.1632 24.8213 3.09882C24.7267 3.03444 24.615 3 24.5006 3C24.3862 3 24.2745 3.03444 24.18 3.09882C24.0854 3.1632 24.0125 3.25454 23.9707 3.36093L23.6861 4.04777C23.208 5.2111 22.3017 6.14692 21.1537 6.66247L20.3471 7.02106C20.2435 7.06867 20.1557 7.14497 20.0942 7.2409C20.0327 7.33684 20 7.44838 20 7.56232C20 7.67626 20.0327 7.78781 20.0942 7.88374C20.1557 7.97967 20.2435 8.05597 20.3471 8.10358L21.201 8.48466C22.3208 8.98593 23.2119 9.88837 23.6985 11.0139L23.9752 11.6502C24.0185 11.7538 24.0914 11.8423 24.1849 11.9045C24.2784 11.9668 24.3883 12 24.5006 12C24.613 12 24.7228 11.9668 24.8163 11.9045C24.9098 11.8423 24.9827 11.7538 25.026 11.6502Z",fill:e?.color||"black"})]}),c3=R.createContext({});function II(e){const A=R.useRef(null);return A.current===null&&(A.current=e()),A.current}const l3=typeof window<"u"?R.useLayoutEffect:R.useEffect,pI=R.createContext(null);function g3(e,A){e.indexOf(A)===-1&&e.push(A)}function HI(e,A){const t=e.indexOf(A);t>-1&&e.splice(t,1)}const fc=(e,A,t)=>t>A?A:t<e?e:t;let d3=()=>{};const ed={},LM=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function XM(e){return typeof e=="object"&&e!==null}const OM=e=>/^0[^.\s]+$/u.test(e);function JM(e){let A;return()=>(A===void 0&&(A=e()),A)}const lo=e=>e,R_=(e,A)=>t=>A(e(t)),TQ=(...e)=>e.reduce(R_),RQ=(e,A,t)=>{const n=A-e;return n===0?1:(t-e)/n};class u3{constructor(){this.subscriptions=[]}add(A){return g3(this.subscriptions,A),()=>HI(this.subscriptions,A)}notify(A,t,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](A,t,n);else for(let r=0;r<s;r++){const a=this.subscriptions[r];a&&a(A,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Hi=e=>e*1e3,go=e=>e/1e3;function KM(e,A){return A?e*(1e3/A):0}const jM=(e,A,t)=>(((1-3*t+3*A)*e+(3*t-6*A))*e+3*A)*e,S_=1e-7,V_=12;function W_(e,A,t,n,s){let r,a,o=0;do a=A+(t-A)/2,r=jM(a,n,s)-e,r>0?t=a:A=a;while(Math.abs(r)>S_&&++o<V_);return a}function SQ(e,A,t,n){if(e===A&&t===n)return lo;const s=r=>W_(r,0,1,e,t);return r=>r===0||r===1?r:jM(s(r),A,n)}const _M=e=>A=>A<=.5?e(2*A)/2:(2-e(2*(1-A)))/2,qM=e=>A=>1-e(1-A),$M=SQ(.33,1.53,.69,.99),G3=qM($M),Ax=_M(G3),ex=e=>e>=1?1:(e*=2)<1?.5*G3(e):.5*(2-Math.pow(2,-10*(e-1))),f3=e=>1-Math.sin(Math.acos(e)),tx=qM(f3),nx=_M(f3),N_=SQ(.42,0,1,1),z_=SQ(0,0,.58,1),sx=SQ(.42,0,.58,1),L_=e=>Array.isArray(e)&&typeof e[0]!="number",rx=e=>Array.isArray(e)&&typeof e[0]=="number",X_={linear:lo,easeIn:N_,easeInOut:sx,easeOut:z_,circIn:f3,circInOut:nx,circOut:tx,backIn:G3,backInOut:Ax,backOut:$M,anticipate:ex},O_=e=>typeof e=="string",ax=e=>{if(rx(e)){d3(e.length===4);const[A,t,n,s]=e;return SQ(A,t,n,s)}else if(O_(e))return X_[e];return e},mI=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function J_(e,A){let t=new Set,n=new Set,s=!1,r=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(g){a.has(g)&&(l.schedule(g),e()),g(o)}const l={schedule:(g,u=!1,f=!1)=>{const v=f&&s?t:n;return u&&a.add(g),v.add(g),g},cancel:g=>{n.delete(g),a.delete(g)},process:g=>{if(o=g,s){r=!0;return}s=!0;const u=t;t=n,n=u,t.forEach(c),t.clear(),s=!1,r&&(r=!1,l.process(g))}};return l}const K_=40;function ix(e,A){let t=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>t=!0,a=mI.reduce((S,x)=>(S[x]=J_(r),S),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:g,update:u,preRender:f,render:w,postRender:v}=a,H=()=>{const S=ed.useManualTiming,x=S?s.timestamp:performance.now();t=!1,S||(s.delta=n?1e3/60:Math.max(Math.min(x-s.timestamp,K_),1)),s.timestamp=x,s.isProcessing=!0,o.process(s),c.process(s),l.process(s),g.process(s),u.process(s),f.process(s),w.process(s),v.process(s),s.isProcessing=!1,t&&A&&(n=!1,e(H))},E=()=>{t=!0,n=!0,s.isProcessing||e(H)};return{schedule:mI.reduce((S,x)=>{const D=a[x];return S[x]=(V,W=!1,z=!1)=>(t||E(),D.schedule(V,W,z)),S},{}),cancel:S=>{for(let x=0;x<mI.length;x++)a[mI[x]].cancel(S)},state:s,steps:a}}const{schedule:Bn,cancel:td,state:Ur,steps:h3}=ix(typeof requestAnimationFrame<"u"?requestAnimationFrame:lo,!0);let EI;function j_(){EI=void 0}const ca={now:()=>(EI===void 0&&ca.set(Ur.isProcessing||ed.useManualTiming?Ur.timestamp:performance.now()),EI),set:e=>{EI=e,queueMicrotask(j_)}},ox=e=>A=>typeof A=="string"&&A.startsWith(e),Bx=ox("--"),__=ox("var(--"),w3=e=>__(e)?q_.test(e.split("/*")[0].trim()):!1,q_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function cx(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const uh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},VQ={...uh,transform:e=>fc(0,1,e)},yI={...uh,default:1},WQ=e=>Math.round(e*1e5)/1e5,Q3=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $_(e){return e==null}const A6=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,b3=(e,A)=>t=>!!(typeof t=="string"&&A6.test(t)&&t.startsWith(e)||A&&!$_(t)&&Object.prototype.hasOwnProperty.call(t,A)),lx=(e,A,t)=>n=>{if(typeof n!="string")return n;const[s,r,a,o]=n.match(Q3);return{[e]:parseFloat(s),[A]:parseFloat(r),[t]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},e6=e=>fc(0,255,e),C3={...uh,transform:e=>Math.round(e6(e))},cG={test:b3("rgb","red"),parse:lx("red","green","blue"),transform:({red:e,green:A,blue:t,alpha:n=1})=>"rgba("+C3.transform(e)+", "+C3.transform(A)+", "+C3.transform(t)+", "+WQ(VQ.transform(n))+")"};function t6(e){let A="",t="",n="",s="";return e.length>5?(A=e.substring(1,3),t=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(A=e.substring(1,2),t=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),A+=A,t+=t,n+=n,s+=s),{red:parseInt(A,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const v3={test:b3("#"),parse:t6,transform:cG.transform},NQ=e=>({test:A=>typeof A=="string"&&A.endsWith(e)&&A.split(" ").length===1,parse:parseFloat,transform:A=>`${A}${e}`}),nd=NQ("deg"),hc=NQ("%"),oe=NQ("px"),n6=NQ("vh"),s6=NQ("vw"),gx={...hc,parse:e=>hc.parse(e)/100,transform:e=>hc.transform(e*100)},Gh={test:b3("hsl","hue"),parse:lx("hue","saturation","lightness"),transform:({hue:e,saturation:A,lightness:t,alpha:n=1})=>"hsla("+Math.round(e)+", "+hc.transform(WQ(A))+", "+hc.transform(WQ(t))+", "+WQ(VQ.transform(n))+")"},Ds={test:e=>cG.test(e)||v3.test(e)||Gh.test(e),parse:e=>cG.test(e)?cG.parse(e):Gh.test(e)?Gh.parse(e):v3.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?cG.transform(e):Gh.transform(e),getAnimatableNone:e=>{const A=Ds.parse(e);return A.alpha=0,Ds.transform(A)}},r6=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function a6(e){return isNaN(e)&&typeof e=="string"&&(e.match(Q3)?.length||0)+(e.match(r6)?.length||0)>0}const dx="number",ux="color",i6="var",o6="var(",Gx="${}",B6=/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 fh(e){const A=e.toString(),t=[],n={color:[],number:[],var:[]},s=[];let r=0;const o=A.replace(B6,c=>(Ds.test(c)?(n.color.push(r),s.push(ux),t.push(Ds.parse(c))):c.startsWith(o6)?(n.var.push(r),s.push(i6),t.push(c)):(n.number.push(r),s.push(dx),t.push(parseFloat(c))),++r,Gx)).split(Gx);return{values:t,split:o,indexes:n,types:s}}function c6(e){return fh(e).values}function fx({split:e,types:A}){const t=e.length;return n=>{let s="";for(let r=0;r<t;r++)if(s+=e[r],n[r]!==void 0){const a=A[r];a===dx?s+=WQ(n[r]):a===ux?s+=Ds.transform(n[r]):s+=n[r]}return s}}function l6(e){return fx(fh(e))}const g6=e=>typeof e=="number"?0:Ds.test(e)?Ds.getAnimatableNone(e):e,d6=(e,A)=>typeof e=="number"?A?.trim().endsWith("/")?e:0:g6(e);function u6(e){const A=fh(e);return fx(A)(A.values.map((n,s)=>d6(n,A.split[s])))}const sB={test:a6,parse:c6,createTransformer:l6,getAnimatableNone:u6};function I3(e,A,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(A-e)*6*t:t<1/2?A:t<2/3?e+(A-e)*(2/3-t)*6:e}function G6({hue:e,saturation:A,lightness:t,alpha:n}){e/=360,A/=100,t/=100;let s=0,r=0,a=0;if(!A)s=r=a=t;else{const o=t<.5?t*(1+A):t+A-t*A,c=2*t-o;s=I3(c,o,e+1/3),r=I3(c,o,e),a=I3(c,o,e-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(a*255),alpha:n}}function YI(e,A){return t=>t>0?A:e}const Hn=(e,A,t)=>e+(A-e)*t,p3=(e,A,t)=>{const n=e*e,s=t*(A*A-n)+n;return s<0?0:Math.sqrt(s)},f6=[v3,cG,Gh],h6=e=>f6.find(A=>A.test(e));function hx(e){const A=h6(e);if(!A)return!1;let t=A.parse(e);return A===Gh&&(t=G6(t)),t}const wx=(e,A)=>{const t=hx(e),n=hx(A);if(!t||!n)return YI(e,A);const s={...t};return r=>(s.red=p3(t.red,n.red,r),s.green=p3(t.green,n.green,r),s.blue=p3(t.blue,n.blue,r),s.alpha=Hn(t.alpha,n.alpha,r),cG.transform(s))},H3=new Set(["none","hidden"]);function w6(e,A){return H3.has(e)?t=>t<=0?e:A:t=>t>=1?A:e}function Q6(e,A){return t=>Hn(e,A,t)}function m3(e){return typeof e=="number"?Q6:typeof e=="string"?w3(e)?YI:Ds.test(e)?wx:v6:Array.isArray(e)?Qx:typeof e=="object"?Ds.test(e)?wx:b6:YI}function Qx(e,A){const t=[...e],n=t.length,s=e.map((r,a)=>m3(r)(r,A[a]));return r=>{for(let a=0;a<n;a++)t[a]=s[a](r);return t}}function b6(e,A){const t={...e,...A},n={};for(const s in t)e[s]!==void 0&&A[s]!==void 0&&(n[s]=m3(e[s])(e[s],A[s]));return s=>{for(const r in n)t[r]=n[r](s);return t}}function C6(e,A){const t=[],n={color:0,var:0,number:0};for(let s=0;s<A.values.length;s++){const r=A.types[s],a=e.indexes[r][n[r]],o=e.values[a]??0;t[s]=o,n[r]++}return t}const v6=(e,A)=>{const t=sB.createTransformer(A),n=fh(e),s=fh(A);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?H3.has(e)&&!s.values.length||H3.has(A)&&!n.values.length?w6(e,A):TQ(Qx(C6(n,s),s.values),t):YI(e,A)};function bx(e,A,t){return typeof e=="number"&&typeof A=="number"&&typeof t=="number"?Hn(e,A,t):m3(e)(e,A)}const I6=e=>{const A=({timestamp:t})=>e(t);return{start:(t=!0)=>Bn.update(A,t),stop:()=>td(A),now:()=>Ur.isProcessing?Ur.timestamp:ca.now()}},Cx=(e,A,t=10)=>{let n="";const s=Math.max(Math.round(A/t),2);for(let r=0;r<s;r++)n+=Math.round(e(r/(s-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},ZI=2e4;function E3(e){let A=0;const t=50;let n=e.next(A);for(;!n.done&&A<ZI;)A+=t,n=e.next(A);return A>=ZI?1/0:A}function p6(e,A=100,t){const n=t({...e,keyframes:[0,A]}),s=Math.min(E3(n),ZI);return{type:"keyframes",ease:r=>n.next(s*r).value/A,duration:go(s)}}const es={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function y3(e,A){return e*Math.sqrt(1-A*A)}const H6=12;function m6(e,A,t){let n=t;for(let s=1;s<H6;s++)n=n-e(n)/A(n);return n}const Y3=.001;function E6({duration:e=es.duration,bounce:A=es.bounce,velocity:t=es.velocity,mass:n=es.mass}){let s,r,a=1-A;a=fc(es.minDamping,es.maxDamping,a),e=fc(es.minDuration,es.maxDuration,go(e)),a<1?(s=l=>{const g=l*a,u=g*e,f=g-t,w=y3(l,a),v=Math.exp(-u);return Y3-f/w*v},r=l=>{const u=l*a*e,f=u*t+t,w=Math.pow(a,2)*Math.pow(l,2)*e,v=Math.exp(-u),H=y3(Math.pow(l,2),a);return(-s(l)+Y3>0?-1:1)*((f-w)*v)/H}):(s=l=>{const g=Math.exp(-l*e),u=(l-t)*e+1;return-Y3+g*u},r=l=>{const g=Math.exp(-l*e),u=(t-l)*(e*e);return g*u});const o=5/e,c=m6(s,r,o);if(e=Hi(e),isNaN(c))return{stiffness:es.stiffness,damping:es.damping,duration:e};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:a*2*Math.sqrt(n*l),duration:e}}}const y6=["duration","bounce"],Y6=["stiffness","damping","mass"];function vx(e,A){return A.some(t=>e[t]!==void 0)}function Z6(e){let A={velocity:es.velocity,stiffness:es.stiffness,damping:es.damping,mass:es.mass,isResolvedFromDuration:!1,...e};if(!vx(e,Y6)&&vx(e,y6))if(A.velocity=0,e.visualDuration){const t=e.visualDuration,n=2*Math.PI/(t*1.2),s=n*n,r=2*fc(.05,1,1-(e.bounce||0))*Math.sqrt(s);A={...A,mass:es.mass,stiffness:s,damping:r}}else{const t=E6({...e,velocity:0});A={...A,...t,mass:es.mass},A.isResolvedFromDuration=!0}return A}function kI(e=es.visualDuration,A=es.bounce){const t=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:A}:e;let{restSpeed:n,restDelta:s}=t;const r=t.keyframes[0],a=t.keyframes[t.keyframes.length-1],o={done:!1,value:r},{stiffness:c,damping:l,mass:g,duration:u,velocity:f,isResolvedFromDuration:w}=Z6({...t,velocity:-go(t.velocity||0)}),v=f||0,H=l/(2*Math.sqrt(c*g)),E=a-r,Z=go(Math.sqrt(c/g)),M=Math.abs(E)<5;n||(n=M?es.restSpeed.granular:es.restSpeed.default),s||(s=M?es.restDelta.granular:es.restDelta.default);let S,x,D,V,W,z;if(H<1)D=y3(Z,H),V=(v+H*Z*E)/D,S=$=>{const rA=Math.exp(-H*Z*$);return a-rA*(V*Math.sin(D*$)+E*Math.cos(D*$))},W=H*Z*V+E*D,z=H*Z*E-V*D,x=$=>Math.exp(-H*Z*$)*(W*Math.sin(D*$)+z*Math.cos(D*$));else if(H===1){S=rA=>a-Math.exp(-Z*rA)*(E+(v+Z*E)*rA);const $=v+Z*E;x=rA=>Math.exp(-Z*rA)*(Z*$*rA-v)}else{const $=Z*Math.sqrt(H*H-1);S=fA=>{const yA=Math.exp(-H*Z*fA),X=Math.min($*fA,300);return a-yA*((v+H*Z*E)*Math.sinh(X)+$*E*Math.cosh(X))/$};const rA=(v+H*Z*E)/$,iA=H*Z*rA-E*$,hA=H*Z*E-rA*$;x=fA=>{const yA=Math.exp(-H*Z*fA),X=Math.min($*fA,300);return yA*(iA*Math.sinh(X)+hA*Math.cosh(X))}}const eA={calculatedDuration:w&&u||null,velocity:$=>Hi(x($)),next:$=>{if(!w&&H<1){const iA=Math.exp(-H*Z*$),hA=Math.sin(D*$),fA=Math.cos(D*$),yA=a-iA*(V*hA+E*fA),X=Hi(iA*(W*hA+z*fA));return o.done=Math.abs(X)<=n&&Math.abs(a-yA)<=s,o.value=o.done?a:yA,o}const rA=S($);if(w)o.done=$>=u;else{const iA=Hi(x($));o.done=Math.abs(iA)<=n&&Math.abs(a-rA)<=s}return o.value=o.done?a:rA,o},toString:()=>{const $=Math.min(E3(eA),ZI),rA=Cx(iA=>eA.next($*iA).value,$,30);return $+"ms "+rA},toTransition:()=>{}};return eA}kI.applyToOptions=e=>{const A=p6(e,100,kI);return e.ease=A.ease,e.duration=Hi(A.duration),e.type="keyframes",e};const k6=5;function Ix(e,A,t){const n=Math.max(A-k6,0);return KM(t-e(n),A-n)}function Z3({keyframes:e,velocity:A=0,power:t=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:c,restDelta:l=.5,restSpeed:g}){const u=e[0],f={done:!1,value:u},w=z=>o!==void 0&&z<o||c!==void 0&&z>c,v=z=>o===void 0?c:c===void 0||Math.abs(o-z)<Math.abs(c-z)?o:c;let H=t*A;const E=u+H,Z=a===void 0?E:a(E);Z!==E&&(H=Z-u);const M=z=>-H*Math.exp(-z/n),S=z=>Z+M(z),x=z=>{const eA=M(z),$=S(z);f.done=Math.abs(eA)<=l,f.value=f.done?Z:$};let D,V;const W=z=>{w(f.value)&&(D=z,V=kI({keyframes:[f.value,v(f.value)],velocity:Ix(S,z,f.value),damping:s,stiffness:r,restDelta:l,restSpeed:g}))};return W(0),{calculatedDuration:null,next:z=>{let eA=!1;return!V&&D===void 0&&(eA=!0,x(z),W(z)),D!==void 0&&z>=D?V.next(z-D):(!eA&&x(z),f)}}}function U6(e,A,t){const n=[],s=t||ed.mix||bx,r=e.length-1;for(let a=0;a<r;a++){let o=s(e[a],e[a+1]);if(A){const c=Array.isArray(A)?A[a]||lo:A;o=TQ(c,o)}n.push(o)}return n}function D6(e,A,{clamp:t=!0,ease:n,mixer:s}={}){const r=e.length;if(d3(r===A.length),r===1)return()=>A[0];if(r===2&&A[0]===A[1])return()=>A[1];const a=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),A=[...A].reverse());const o=U6(A,n,s),c=o.length,l=g=>{if(a&&g<e[0])return A[0];let u=0;if(c>1)for(;u<e.length-2&&!(g<e[u+1]);u++);const f=RQ(e[u],e[u+1],g);return o[u](f)};return t?g=>l(fc(e[0],e[r-1],g)):l}function F6(e,A){const t=e[e.length-1];for(let n=1;n<=A;n++){const s=RQ(0,A,n);e.push(Hn(t,1,s))}}function M6(e){const A=[0];return F6(A,e.length-1),A}function x6(e,A){return e.map(t=>t*A)}function P6(e,A){return e.map(()=>A||sx).splice(0,e.length-1)}function zQ({duration:e=300,keyframes:A,times:t,ease:n="easeInOut"}){const s=L_(n)?n.map(ax):ax(n),r={done:!1,value:A[0]},a=x6(t&&t.length===A.length?t:M6(A),e),o=D6(a,A,{ease:Array.isArray(s)?s:P6(A,s)});return{calculatedDuration:e,next:c=>(r.value=o(c),r.done=c>=e,r)}}const T6=e=>e!==null;function UI(e,{repeat:A,repeatType:t="loop"},n,s=1){const r=e.filter(T6),o=s<0||A&&t!=="loop"&&A%2===1?0:r.length-1;return!o||n===void 0?r[o]:n}const R6={decay:Z3,inertia:Z3,tween:zQ,keyframes:zQ,spring:kI};function px(e){typeof e.type=="string"&&(e.type=R6[e.type])}class k3{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(A=>{this.resolve=A})}notifyFinished(){this.resolve()}then(A,t){return this.finished.then(A,t)}}const S6=e=>e/100;class DI extends k3{constructor(A){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==ca.now()&&this.tick(ca.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=A,this.initAnimation(),this.play(),A.autoplay===!1&&this.pause()}initAnimation(){const{options:A}=this;px(A);const{type:t=zQ,repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:a=0}=A;let{keyframes:o}=A;const c=t||zQ;c!==zQ&&typeof o[0]!="number"&&(this.mixKeyframes=TQ(S6,bx(o[0],o[1])),o=[0,100]);const l=c({...A,keyframes:o});r==="mirror"&&(this.mirroredGenerator=c({...A,keyframes:[...o].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=E3(l));const{calculatedDuration:g}=l;this.calculatedDuration=g,this.resolvedDuration=g+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=l}updateTime(A){const t=Math.round(A-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(A,t=!1){const{generator:n,totalDuration:s,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:g,repeat:u,repeatType:f,repeatDelay:w,type:v,onUpdate:H,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,A):this.speed<0&&(this.startTime=Math.min(A-s/this.speed,this.startTime)),t?this.currentTime=A:this.updateTime(A);const Z=this.currentTime-l*(this.playbackSpeed>=0?1:-1),M=this.playbackSpeed>=0?Z<0:Z>s;this.currentTime=Math.max(Z,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let S=this.currentTime,x=n;if(u){const z=Math.min(this.currentTime,s)/o;let eA=Math.floor(z),$=z%1;!$&&z>=1&&($=1),$===1&&eA--,eA=Math.min(eA,u+1),eA%2&&(f==="reverse"?($=1-$,w&&($-=w/o)):f==="mirror"&&(x=a)),S=fc(0,1,$)*o}let D;M?(this.delayState.value=g[0],D=this.delayState):D=x.next(S),r&&!M&&(D.value=r(D.value));let{done:V}=D;!M&&c!==null&&(V=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const W=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return W&&v!==Z3&&(D.value=UI(g,this.options,E,this.speed)),H&&H(D.value),W&&this.finish(),D}then(A,t){return this.finished.then(A,t)}get duration(){return go(this.calculatedDuration)}get iterationDuration(){const{delay:A=0}=this.options||{};return this.duration+go(A)}get time(){return go(this.currentTime)}set time(A){A=Hi(A),this.currentTime=A,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=A:this.driver&&(this.startTime=this.driver.now()-A/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=A,this.tick(A))}getGeneratorVelocity(){const A=this.currentTime;if(A<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(A);const t=this.generator.next(A).value;return Ix(n=>this.generator.next(n).value,A,t)}get speed(){return this.playbackSpeed}set speed(A){const t=this.playbackSpeed!==A;t&&this.driver&&this.updateTime(ca.now()),this.playbackSpeed=A,t&&this.driver&&(this.time=go(this.currentTime))}play(){if(this.isStopped)return;const{driver:A=I6,startTime:t}=this.options;this.driver||(this.driver=A(s=>this.tick(s))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ca.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(A){return this.startTime=0,this.tick(A,!0)}attachTimeline(A){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),A.observe(this)}}function V6(e){for(let A=1;A<e.length;A++)e[A]??(e[A]=e[A-1])}const lG=e=>e*180/Math.PI,U3=e=>{const A=lG(Math.atan2(e[1],e[0]));return D3(A)},W6={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:U3,rotateZ:U3,skewX:e=>lG(Math.atan(e[1])),skewY:e=>lG(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},D3=e=>(e=e%360,e<0&&(e+=360),e),Hx=U3,mx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ex=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),N6={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:mx,scaleY:Ex,scale:e=>(mx(e)+Ex(e))/2,rotateX:e=>D3(lG(Math.atan2(e[6],e[5]))),rotateY:e=>D3(lG(Math.atan2(-e[2],e[0]))),rotateZ:Hx,rotate:Hx,skewX:e=>lG(Math.atan(e[4])),skewY:e=>lG(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function F3(e){return e.includes("scale")?1:0}function M3(e,A){if(!e||e==="none")return F3(A);const t=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(t)n=N6,s=t;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=W6,s=o}if(!s)return F3(A);const r=n[A],a=s[1].split(",").map(L6);return typeof r=="function"?r(a):a[r]}const z6=(e,A)=>{const{transform:t="none"}=getComputedStyle(e);return M3(t,A)};function L6(e){return parseFloat(e.trim())}const hh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],wh=new Set(hh),yx=e=>e===uh||e===oe,X6=new Set(["x","y","z"]),O6=hh.filter(e=>!X6.has(e));function J6(e){const A=[];return O6.forEach(t=>{const n=e.getValue(t);n!==void 0&&(A.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),A}const sd={width:({x:e},{paddingLeft:A="0",paddingRight:t="0",boxSizing:n})=>{const s=e.max-e.min;return n==="border-box"?s:s-parseFloat(A)-parseFloat(t)},height:({y:e},{paddingTop:A="0",paddingBottom:t="0",boxSizing:n})=>{const s=e.max-e.min;return n==="border-box"?s:s-parseFloat(A)-parseFloat(t)},top:(e,{top:A})=>parseFloat(A),left:(e,{left:A})=>parseFloat(A),bottom:({y:e},{top:A})=>parseFloat(A)+(e.max-e.min),right:({x:e},{left:A})=>parseFloat(A)+(e.max-e.min),x:(e,{transform:A})=>M3(A,"x"),y:(e,{transform:A})=>M3(A,"y")};sd.translateX=sd.x,sd.translateY=sd.y;const gG=new Set;let x3=!1,P3=!1,T3=!1;function Yx(){if(P3){const e=Array.from(gG).filter(n=>n.needsMeasurement),A=new Set(e.map(n=>n.element)),t=new Map;A.forEach(n=>{const s=J6(n);s.length&&(t.set(n,s),n.render())}),e.forEach(n=>n.measureInitialState()),A.forEach(n=>{n.render();const s=t.get(n);s&&s.forEach(([r,a])=>{n.getValue(r)?.set(a)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}P3=!1,x3=!1,gG.forEach(e=>e.complete(T3)),gG.clear()}function Zx(){gG.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(P3=!0)})}function K6(){T3=!0,Zx(),Yx(),T3=!1}class R3{constructor(A,t,n,s,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...A],this.onComplete=t,this.name=n,this.motionValue=s,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(gG.add(this),x3||(x3=!0,Bn.read(Zx),Bn.resolveKeyframes(Yx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:A,name:t,element:n,motionValue:s}=this;if(A[0]===null){const r=s?.get(),a=A[A.length-1];if(r!==void 0)A[0]=r;else if(n&&t){const o=n.readValue(t,a);o!=null&&(A[0]=o)}A[0]===void 0&&(A[0]=a),s&&r===void 0&&s.set(A[0])}V6(A)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(A=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,A),gG.delete(this)}cancel(){this.state==="scheduled"&&(gG.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const j6=e=>e.startsWith("--");function kx(e,A,t){j6(A)?e.style.setProperty(A,t):e.style[A]=t}const _6={};function Ux(e,A){const t=JM(e);return()=>_6[A]??t()}const q6=Ux(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Dx=Ux(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),LQ=([e,A,t,n])=>`cubic-bezier(${e}, ${A}, ${t}, ${n})`,Fx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:LQ([0,.65,.55,1]),circOut:LQ([.55,0,1,.45]),backIn:LQ([.31,.01,.66,-.59]),backOut:LQ([.33,1.53,.69,.99])};function Mx(e,A){if(e)return typeof e=="function"?Dx()?Cx(e,A):"ease-out":rx(e)?LQ(e):Array.isArray(e)?e.map(t=>Mx(t,A)||Fx.easeOut):Fx[e]}function $6(e,A,t,{delay:n=0,duration:s=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:c}={},l=void 0){const g={[A]:t};c&&(g.offset=c);const u=Mx(o,s);Array.isArray(u)&&(g.easing=u);const f={delay:n,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"};return l&&(f.pseudoElement=l),e.animate(g,f)}function xx(e){return typeof e=="function"&&"applyToOptions"in e}function Aq({type:e,...A}){return xx(e)&&Dx()?e.applyToOptions(A):(A.duration??(A.duration=300),A.ease??(A.ease="easeOut"),A)}class Px extends k3{constructor(A){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!A)return;const{element:t,name:n,keyframes:s,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:o,onComplete:c}=A;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=A,d3(typeof A.type!="string");const l=Aq(A);this.animation=$6(t,n,s,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const g=UI(s,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(g),kx(t,n,g),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:A}=this;A==="idle"||A==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const A=this.options?.element;!this.isPseudoElement&&A?.isConnected&&this.animation.commitStyles?.()}get duration(){const A=this.animation.effect?.getComputedTiming?.().duration||0;return go(Number(A))}get iterationDuration(){const{delay:A=0}=this.options||{};return this.duration+go(A)}get time(){return go(Number(this.animation.currentTime)||0)}set time(A){const t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Hi(A),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(A){A<0&&(this.finishedTime=null),this.animation.playbackRate=A}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(A){this.manualStartTime=this.animation.startTime=A}attachTimeline({timeline:A,rangeStart:t,rangeEnd:n,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,A&&q6()?(this.animation.timeline=A,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),lo):s(this)}}const Tx={anticipate:ex,backInOut:Ax,circInOut:nx};function eq(e){return e in Tx}function tq(e){typeof e.ease=="string"&&eq(e.ease)&&(e.ease=Tx[e.ease])}const S3=10;class nq extends Px{constructor(A){tq(A),px(A),super(A),A.startTime!==void 0&&A.autoplay!==!1&&(this.startTime=A.startTime),this.options=A}updateMotionValue(A){const{motionValue:t,onUpdate:n,onComplete:s,element:r,...a}=this.options;if(!t)return;if(A!==void 0){t.set(A);return}const o=new DI({...a,autoplay:!1}),c=Math.max(S3,ca.now()-this.startTime),l=fc(0,S3,c-S3),g=o.sample(c).value,{name:u}=this.options;r&&u&&kx(r,u,g),t.setWithVelocity(o.sample(Math.max(0,c-l)).value,g,l),o.stop()}}const Rx=(e,A)=>A==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(sB.test(e)||e==="0")&&!e.startsWith("url("));function sq(e){const A=e[0];if(e.length===1)return!0;for(let t=0;t<e.length;t++)if(e[t]!==A)return!0}function rq(e,A,t,n){const s=e[0];if(s===null)return!1;if(A==="display"||A==="visibility")return!0;const r=e[e.length-1],a=Rx(s,A),o=Rx(r,A);return!a||!o?!1:sq(e)||(t==="spring"||xx(t))&&n}function V3(e){e.duration=0,e.type="keyframes"}const Sx=new Set(["opacity","clipPath","filter","transform"]),aq=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function iq(e){for(let A=0;A<e.length;A++)if(typeof e[A]=="string"&&aq.test(e[A]))return!0;return!1}const oq=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Bq=JM(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function cq(e){const{motionValue:A,name:t,repeatDelay:n,repeatType:s,damping:r,type:a,keyframes:o}=e;if(!(A?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:g}=A.owner.getProps();return Bq()&&t&&(Sx.has(t)||oq.has(t)&&iq(o))&&(t!=="transform"||!g)&&!l&&!n&&s!=="mirror"&&r!==0&&a!=="inertia"}const lq=40;class gq extends k3{constructor({autoplay:A=!0,delay:t=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:a="loop",keyframes:o,name:c,motionValue:l,element:g,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ca.now();const f={autoplay:A,delay:t,type:n,repeat:s,repeatDelay:r,repeatType:a,name:c,motionValue:l,element:g,...u},w=g?.KeyframeResolver||R3;this.keyframeResolver=new w(o,(v,H,E)=>this.onKeyframesResolved(v,H,f,!E),c,l,g),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(A,t,n,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:o,delay:c,isHandoff:l,onUpdate:g}=n;this.resolvedAt=ca.now();let u=!0;rq(A,r,a,o)||(u=!1,(ed.instantAnimations||!c)&&g?.(UI(A,n,t)),A[0]=A[A.length-1],V3(n),n.repeat=0);const w={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>lq?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:A},v=u&&!l&&cq(w),H=w.motionValue?.owner?.current;let E;if(v)try{E=new nq({...w,element:H})}catch{E=new DI(w)}else E=new DI(w);E.finished.then(()=>{this.notifyFinished()}).catch(lo),this.pendingTimeline&&(this.stopTimeline=E.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=E}get finished(){return this._animation?this.animation.finished:this._finished}then(A,t){return this.finished.finally(A).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),K6()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(A){this.animation.time=A}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(A){this.animation.speed=A}get startTime(){return this.animation.startTime}attachTimeline(A){return this._animation?this.stopTimeline=this.animation.attachTimeline(A):this.pendingTimeline=A,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Vx(e,A,t,n=0,s=1){const r=Array.from(e).sort((l,g)=>l.sortNodePosition(g)).indexOf(A),a=e.size,o=(a-1)*n;return typeof t=="function"?t(r,a):s===1?r*n:o-r*n}const dq=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function uq(e){const A=dq.exec(e);if(!A)return[,];const[,t,n,s]=A;return[`--${t??n}`,s]}function Wx(e,A,t=1){const[n,s]=uq(e);if(!n)return;const r=window.getComputedStyle(A).getPropertyValue(n);if(r){const a=r.trim();return LM(a)?parseFloat(a):a}return w3(s)?Wx(s,A,t+1):s}const Gq={type:"spring",stiffness:500,damping:25,restSpeed:10},fq=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),hq={type:"keyframes",duration:.8},wq={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Qq=(e,{keyframes:A})=>A.length>2?hq:wh.has(e)?e.startsWith("scale")?fq(A[1]):Gq:wq;function Nx(e,A){if(e?.inherit&&A){const{inherit:t,...n}=e;return{...A,...n}}return e}function W3(e,A){const t=e?.[A]??e?.default??e;return t!==e?Nx(t,e):t}const bq=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Cq(e){for(const A in e)if(!bq.has(A))return!0;return!1}const N3=(e,A,t,n={},s,r)=>a=>{const o=W3(n,e)||{},c=o.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Hi(c);const g={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:A.getVelocity(),...o,delay:-l,onUpdate:f=>{A.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:A,element:r?void 0:s};Cq(o)||Object.assign(g,Qq(e,g)),g.duration&&(g.duration=Hi(g.duration)),g.repeatDelay&&(g.repeatDelay=Hi(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let u=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(V3(g),g.delay===0&&(u=!0)),(ed.instantAnimations||ed.skipAnimations||s?.shouldSkipAnimations)&&(u=!0,V3(g),g.delay=0),g.allowFlatten=!o.type&&!o.ease,u&&!r&&A.get()!==void 0){const f=UI(g.keyframes,o);if(f!==void 0){Bn.update(()=>{g.onUpdate(f),g.onComplete()});return}}return o.isSync?new DI(g):new gq(g)};function zx(e){const A=[{},{}];return e?.values.forEach((t,n)=>{A[0][n]=t.get(),A[1][n]=t.getVelocity()}),A}function z3(e,A,t,n){if(typeof A=="function"){const[s,r]=zx(n);A=A(t!==void 0?t:e.custom,s,r)}if(typeof A=="string"&&(A=e.variants&&e.variants[A]),typeof A=="function"){const[s,r]=zx(n);A=A(t!==void 0?t:e.custom,s,r)}return A}function dG(e,A,t){const n=e.getProps();return z3(n,A,t!==void 0?t:n.custom,e)}const Lx=new Set(["width","height","top","left","right","bottom",...hh]),Xx=30,vq=e=>!isNaN(parseFloat(e));class Iq{constructor(A,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const s=ca.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(A),this.owner=t.owner}setCurrent(A){this.current=A,this.updatedAt=ca.now(),this.canTrackVelocity===null&&A!==void 0&&(this.canTrackVelocity=vq(this.current))}setPrevFrameValue(A=this.current){this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt}onChange(A){return this.on("change",A)}on(A,t){this.events[A]||(this.events[A]=new u3);const n=this.events[A].add(t);return A==="change"?()=>{n(),Bn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const A in this.events)this.events[A].clear()}attach(A,t){this.passiveEffect=A,this.stopPassiveEffect=t}set(A){this.passiveEffect?this.passiveEffect(A,this.updateAndNotify):this.updateAndNotify(A)}setWithVelocity(A,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt-n}jump(A,t=!0){this.updateAndNotify(A),this.prev=A,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(A){this.dependents||(this.dependents=new Set),this.dependents.add(A)}removeDependent(A){this.dependents&&this.dependents.delete(A)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const A=ca.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||A-this.updatedAt>Xx)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,Xx);return KM(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(A){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=A(t),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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qh(e,A){return new Iq(e,A)}const L3=e=>Array.isArray(e);function pq(e,A,t){e.hasValue(A)?e.getValue(A).set(t):e.addValue(A,Qh(t))}function Hq(e){return L3(e)?e[e.length-1]||0:e}function X3(e,A){const t=dG(e,A);let{transitionEnd:n={},transition:s={},...r}=t||{};r={...r,...n};for(const a in r){const o=Hq(r[a]);pq(e,a,o)}}const Dr=e=>!!(e&&e.getVelocity);function mq(e){return!!(Dr(e)&&e.add)}function O3(e,A){const t=e.getValue("willChange");if(mq(t))return t.add(A);if(!t&&ed.WillChange){const n=new ed.WillChange("auto");e.addValue("willChange",n),n.add(A)}}function J3(e){return e.replace(/([A-Z])/g,A=>`-${A.toLowerCase()}`)}const Ox="data-"+J3("framerAppearId");function Jx(e){return e.props[Ox]}function Eq({protectedKeys:e,needsAnimating:A},t){const n=e.hasOwnProperty(t)&&A[t]!==!0;return A[t]=!1,n}function Kx(e,A,{delay:t=0,transitionOverride:n,type:s}={}){let{transition:r,transitionEnd:a,...o}=A;const c=e.getDefaultTransition();r=r?Nx(r,c):c;const l=r?.reduceMotion;n&&(r=n);const g=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const f in o){const w=e.getValue(f,e.latestValues[f]??null),v=o[f];if(v===void 0||u&&Eq(u,f))continue;const H={delay:t,...W3(r||{},f)},E=w.get();if(E!==void 0&&!w.isAnimating()&&!Array.isArray(v)&&v===E&&!H.velocity){Bn.update(()=>w.set(v));continue}let Z=!1;if(window.MotionHandoffAnimation){const x=Jx(e);if(x){const D=window.MotionHandoffAnimation(x,f,Bn);D!==null&&(H.startTime=D,Z=!0)}}O3(e,f);const M=l??e.shouldReduceMotion;w.start(N3(f,w,v,M&&Lx.has(f)?{type:!1}:H,e,Z));const S=w.animation;S&&g.push(S)}if(a){const f=()=>Bn.update(()=>{a&&X3(e,a)});g.length?Promise.all(g).then(f):f()}return g}function K3(e,A,t={}){const n=dG(e,A,t.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=n||{};t.transitionOverride&&(s=t.transitionOverride);const r=n?()=>Promise.all(Kx(e,n,t)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:g,staggerDirection:u}=s;return yq(e,A,c,l,g,u,t)}:()=>Promise.resolve(),{when:o}=s;if(o){const[c,l]=o==="beforeChildren"?[r,a]:[a,r];return c().then(()=>l())}else return Promise.all([r(),a(t.delay)])}function yq(e,A,t=0,n=0,s=0,r=1,a){const o=[];for(const c of e.variantChildren)c.notify("AnimationStart",A),o.push(K3(c,A,{...a,delay:t+(typeof n=="function"?0:n)+Vx(e.variantChildren,c,n,s,r)}).then(()=>c.notify("AnimationComplete",A)));return Promise.all(o)}function jx(e,A,t={}){e.notify("AnimationStart",A);let n;if(Array.isArray(A)){const s=A.map(r=>K3(e,r,t));n=Promise.all(s)}else if(typeof A=="string")n=K3(e,A,t);else{const s=typeof A=="function"?dG(e,A,t.custom):A;n=Promise.all(Kx(e,s,t))}return n.then(()=>{e.notify("AnimationComplete",A)})}const Yq={test:e=>e==="auto",parse:e=>e},_x=e=>A=>A.test(e),qx=[uh,oe,hc,nd,s6,n6,Yq],$x=e=>qx.find(_x(e));function Zq(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||OM(e):!0}const kq=new Set(["brightness","contrast","saturate","opacity"]);function Uq(e){const[A,t]=e.slice(0,-1).split("(");if(A==="drop-shadow")return e;const[n]=t.match(Q3)||[];if(!n)return e;const s=t.replace(n,"");let r=kq.has(A)?1:0;return n!==t&&(r*=100),A+"("+r+s+")"}const Dq=/\b([a-z-]*)\(.*?\)/gu,j3={...sB,getAnimatableNone:e=>{const A=e.match(Dq);return A?A.map(Uq).join(" "):e}},_3={...sB,getAnimatableNone:e=>{const A=sB.parse(e);return sB.createTransformer(e)(A.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}},A2={...uh,transform:Math.round},q3={borderWidth:oe,borderTopWidth:oe,borderRightWidth:oe,borderBottomWidth:oe,borderLeftWidth:oe,borderRadius:oe,borderTopLeftRadius:oe,borderTopRightRadius:oe,borderBottomRightRadius:oe,borderBottomLeftRadius:oe,width:oe,maxWidth:oe,height:oe,maxHeight:oe,top:oe,right:oe,bottom:oe,left:oe,inset:oe,insetBlock:oe,insetBlockStart:oe,insetBlockEnd:oe,insetInline:oe,insetInlineStart:oe,insetInlineEnd:oe,padding:oe,paddingTop:oe,paddingRight:oe,paddingBottom:oe,paddingLeft:oe,paddingBlock:oe,paddingBlockStart:oe,paddingBlockEnd:oe,paddingInline:oe,paddingInlineStart:oe,paddingInlineEnd:oe,margin:oe,marginTop:oe,marginRight:oe,marginBottom:oe,marginLeft:oe,marginBlock:oe,marginBlockStart:oe,marginBlockEnd:oe,marginInline:oe,marginInlineStart:oe,marginInlineEnd:oe,fontSize:oe,backgroundPositionX:oe,backgroundPositionY:oe,...{rotate:nd,rotateX:nd,rotateY:nd,rotateZ:nd,scale:yI,scaleX:yI,scaleY:yI,scaleZ:yI,skew:nd,skewX:nd,skewY:nd,distance:oe,translateX:oe,translateY:oe,translateZ:oe,x:oe,y:oe,z:oe,perspective:oe,transformPerspective:oe,opacity:VQ,originX:gx,originY:gx,originZ:oe},zIndex:A2,fillOpacity:VQ,strokeOpacity:VQ,numOctaves:A2},Fq={...q3,color:Ds,backgroundColor:Ds,outlineColor:Ds,fill:Ds,stroke:Ds,borderColor:Ds,borderTopColor:Ds,borderRightColor:Ds,borderBottomColor:Ds,borderLeftColor:Ds,filter:j3,WebkitFilter:j3,mask:_3,WebkitMask:_3},e2=e=>Fq[e],Mq=new Set([j3,_3]);function t2(e,A){let t=e2(e);return Mq.has(t)||(t=sB),t.getAnimatableNone?t.getAnimatableNone(A):void 0}const xq=new Set(["auto","none","0"]);function Pq(e,A,t){let n=0,s;for(;n<e.length&&!s;){const r=e[n];typeof r=="string"&&!xq.has(r)&&fh(r).values.length&&(s=e[n]),n++}if(s&&t)for(const r of A)e[r]=t2(t,s)}class Tq extends R3{constructor(A,t,n,s,r){super(A,t,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:A,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let g=0;g<A.length;g++){let u=A[g];if(typeof u=="string"&&(u=u.trim(),w3(u))){const f=Wx(u,t.current);f!==void 0&&(A[g]=f),g===A.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Lx.has(n)||A.length!==2)return;const[s,r]=A,a=$x(s),o=$x(r),c=cx(s),l=cx(r);if(c!==l&&sd[n]){this.needsMeasurement=!0;return}if(a!==o)if(yx(a)&&yx(o))for(let g=0;g<A.length;g++){const u=A[g];typeof u=="string"&&(A[g]=parseFloat(u))}else sd[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:A,name:t}=this,n=[];for(let s=0;s<A.length;s++)(A[s]===null||Zq(A[s]))&&n.push(s);n.length&&Pq(A,n,t)}measureInitialState(){const{element:A,unresolvedKeyframes:t,name:n}=this;if(!A||!A.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=sd[n](A.measureViewportBox(),window.getComputedStyle(A.current)),t[0]=this.measuredOrigin;const s=t[t.length-1];s!==void 0&&A.getValue(n,s).jump(s,!1)}measureEndState(){const{element:A,name:t,unresolvedKeyframes:n}=this;if(!A||!A.current)return;const s=A.getValue(t);s&&s.jump(this.measuredOrigin,!1);const r=n.length-1,a=n[r];n[r]=sd[t](A.measureViewportBox(),window.getComputedStyle(A.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([o,c])=>{A.getValue(o).set(c)}),this.resolveNoneKeyframes()}}function n2(e,A,t){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const s=t?.[e]??n.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(n=>n!=null)}const s2=(e,A)=>A&&typeof e=="number"?A.transform(e):e;function FI(e){return XM(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:$3}=ix(queueMicrotask,!1),rB={x:!1,y:!1};function r2(){return rB.x||rB.y}function Rq(e){return e==="x"||e==="y"?rB[e]?null:(rB[e]=!0,()=>{rB[e]=!1}):rB.x||rB.y?null:(rB.x=rB.y=!0,()=>{rB.x=rB.y=!1})}function a2(e,A){const t=n2(e),n=new AbortController,s={passive:!0,...A,signal:n.signal};return[t,s,()=>n.abort()]}function Sq(e){return!(e.pointerType==="touch"||r2())}function Vq(e,A,t={}){const[n,s,r]=a2(e,t);return n.forEach(a=>{let o=!1,c=!1,l;const g=()=>{a.removeEventListener("pointerleave",v)},u=E=>{l&&(l(E),l=void 0),g()},f=E=>{o=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,u(E))},w=()=>{o=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},v=E=>{if(E.pointerType!=="touch"){if(o){c=!0;return}u(E)}},H=E=>{if(!Sq(E))return;c=!1;const Z=A(a,E);typeof Z=="function"&&(l=Z,a.addEventListener("pointerleave",v,s))};a.addEventListener("pointerenter",H,s),a.addEventListener("pointerdown",w,s)}),r}const i2=(e,A)=>A?e===A?!0:i2(e,A.parentElement):!1,Ay=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Wq=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Nq(e){return Wq.has(e.tagName)||e.isContentEditable===!0}const zq=new Set(["INPUT","SELECT","TEXTAREA"]);function Lq(e){return zq.has(e.tagName)||e.isContentEditable===!0}const MI=new WeakSet;function o2(e){return A=>{A.key==="Enter"&&e(A)}}function ey(e,A){e.dispatchEvent(new PointerEvent("pointer"+A,{isPrimary:!0,bubbles:!0}))}const Xq=(e,A)=>{const t=e.currentTarget;if(!t)return;const n=o2(()=>{if(MI.has(t))return;ey(t,"down");const s=o2(()=>{ey(t,"up")}),r=()=>ey(t,"cancel");t.addEventListener("keyup",s,A),t.addEventListener("blur",r,A)});t.addEventListener("keydown",n,A),t.addEventListener("blur",()=>t.removeEventListener("keydown",n),A)};function B2(e){return Ay(e)&&!r2()}const c2=new WeakSet;function Oq(e,A,t={}){const[n,s,r]=a2(e,t),a=o=>{const c=o.currentTarget;if(!B2(o)||c2.has(o))return;MI.add(c),t.stopPropagation&&c2.add(o);const l=A(c,o),g=(w,v)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",f),MI.has(c)&&MI.delete(c),B2(w)&&typeof l=="function"&&l(w,{success:v})},u=w=>{g(w,c===window||c===document||t.useGlobalTarget||i2(c,w.target))},f=w=>{g(w,!1)};window.addEventListener("pointerup",u,s),window.addEventListener("pointercancel",f,s)};return n.forEach(o=>{(t.useGlobalTarget?window:o).addEventListener("pointerdown",a,s),FI(o)&&(o.addEventListener("focus",l=>Xq(l,s)),!Nq(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),r}function ty(e){return XM(e)&&"ownerSVGElement"in e}const xI=new WeakMap;let PI;const l2=(e,A,t)=>(n,s)=>s&&s[0]?s[0][e+"Size"]:ty(n)&&"getBBox"in n?n.getBBox()[A]:n[t],Jq=l2("inline","width","offsetWidth"),Kq=l2("block","height","offsetHeight");function jq({target:e,borderBoxSize:A}){xI.get(e)?.forEach(t=>{t(e,{get width(){return Jq(e,A)},get height(){return Kq(e,A)}})})}function _q(e){e.forEach(jq)}function qq(){typeof ResizeObserver>"u"||(PI=new ResizeObserver(_q))}function $q(e,A){PI||qq();const t=n2(e);return t.forEach(n=>{let s=xI.get(n);s||(s=new Set,xI.set(n,s)),s.add(A),PI?.observe(n)}),()=>{t.forEach(n=>{const s=xI.get(n);s?.delete(A),s?.size||PI?.unobserve(n)})}}const TI=new Set;let bh;function A$(){bh=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};TI.forEach(A=>A(e))},window.addEventListener("resize",bh)}function e$(e){return TI.add(e),bh||A$(),()=>{TI.delete(e),!TI.size&&typeof bh=="function"&&(window.removeEventListener("resize",bh),bh=void 0)}}function g2(e,A){return typeof e=="function"?e$(e):$q(e,A)}function t$(e){return ty(e)&&e.tagName==="svg"}const n$=[...qx,Ds,sB],s$=e=>n$.find(_x(e)),d2=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ch=()=>({x:d2(),y:d2()}),u2=()=>({min:0,max:0}),Ks=()=>({x:u2(),y:u2()}),r$=new WeakMap;function RI(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function XQ(e){return typeof e=="string"||Array.isArray(e)}const ny=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],sy=["initial",...ny];function SI(e){return RI(e.animate)||sy.some(A=>XQ(e[A]))}function G2(e){return!!(SI(e)||e.variants)}function a$(e,A,t){for(const n in A){const s=A[n],r=t[n];if(Dr(s))e.addValue(n,s);else if(Dr(r))e.addValue(n,Qh(s,{owner:e}));else if(r!==s)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(n);e.addValue(n,Qh(a!==void 0?a:s,{owner:e}))}}for(const n in t)A[n]===void 0&&e.removeValue(n);return A}const ry={current:null},f2={current:!1},i$=typeof window<"u";function o$(){if(f2.current=!0,!!i$)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),A=()=>ry.current=e.matches;e.addEventListener("change",A),A()}else ry.current=!1}const h2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let VI={};function w2(e){VI=e}function B$(){return VI}class c${scrapeMotionValuesFromProps(A,t,n){return{}}constructor({parent:A,props:t,presenceContext:n,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:a,visualState:o},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=R3,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 w=ca.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,Bn.render(this.render,!1,!0))};const{latestValues:l,renderState:g}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=g,this.parent=A,this.props=t,this.presenceContext=n,this.depth=A?A.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=SI(t),this.isVariantNode=G2(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(A&&A.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(t,{},this);for(const w in f){const v=f[w];l[w]!==void 0&&Dr(v)&&v.set(l[w])}}mount(A){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=A,r$.set(A,this),this.projection&&!this.projection.instance&&this.projection.mount(A),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,n)=>this.bindToMotionValue(n,t)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(f2.current||o$(),this.shouldReduceMotion=ry.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),td(this.notifyUpdate),td(this.render),this.valueSubscriptions.forEach(A=>A()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const A in this.events)this.events[A].clear();for(const A in this.features){const t=this.features[A];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(A){this.children.add(A),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(A)}removeChild(A){this.children.delete(A),this.enteringChildren&&this.enteringChildren.delete(A)}bindToMotionValue(A,t){if(this.valueSubscriptions.has(A)&&this.valueSubscriptions.get(A)(),t.accelerate&&Sx.has(A)&&this.current instanceof HTMLElement){const{factory:a,keyframes:o,times:c,ease:l,duration:g}=t.accelerate,u=new Px({element:this.current,name:A,keyframes:o,times:c,ease:l,duration:Hi(g)}),f=a(u);this.valueSubscriptions.set(A,()=>{f(),u.cancel()});return}const n=wh.has(A);n&&this.onBindTransform&&this.onBindTransform();const s=t.on("change",a=>{this.latestValues[A]=a,this.props.onUpdate&&Bn.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,A,t)),this.valueSubscriptions.set(A,()=>{s(),r&&r(),t.owner&&t.stop()})}sortNodePosition(A){return!this.current||!this.sortInstanceNodePosition||this.type!==A.type?0:this.sortInstanceNodePosition(this.current,A.current)}updateFeatures(){let A="animation";for(A in VI){const t=VI[A];if(!t)continue;const{isEnabled:n,Feature:s}=t;if(!this.features[A]&&s&&n(this.props)&&(this.features[A]=new s(this)),this.features[A]){const r=this.features[A];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ks()}getStaticValue(A){return this.latestValues[A]}setStaticValue(A,t){this.latestValues[A]=t}update(A,t){(A.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=A,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<h2.length;n++){const s=h2[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,a=A[r];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=a$(this,this.scrapeMotionValuesFromProps(A,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(A){return this.props.variants?this.props.variants[A]: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(A){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(A),()=>t.variantChildren.delete(A)}addValue(A,t){const n=this.values.get(A);t!==n&&(n&&this.removeValue(A),this.bindToMotionValue(A,t),this.values.set(A,t),this.latestValues[A]=t.get())}removeValue(A){this.values.delete(A);const t=this.valueSubscriptions.get(A);t&&(t(),this.valueSubscriptions.delete(A)),delete this.latestValues[A],this.removeValueFromRenderState(A,this.renderState)}hasValue(A){return this.values.has(A)}getValue(A,t){if(this.props.values&&this.props.values[A])return this.props.values[A];let n=this.values.get(A);return n===void 0&&t!==void 0&&(n=Qh(t===null?void 0:t,{owner:this}),this.addValue(A,n)),n}readValue(A,t){let n=this.latestValues[A]!==void 0||!this.current?this.latestValues[A]:this.getBaseTargetFromProps(this.props,A)??this.readValueFromInstance(this.current,A,this.options);return n!=null&&(typeof n=="string"&&(LM(n)||OM(n))?n=parseFloat(n):!s$(n)&&sB.test(t)&&(n=t2(A,t)),this.setBaseTarget(A,Dr(n)?n.get():n)),Dr(n)?n.get():n}setBaseTarget(A,t){this.baseTarget[A]=t}getBaseTarget(A){const{initial:t}=this.props;let n;if(typeof t=="string"||typeof t=="object"){const r=z3(this.props,t,this.presenceContext?.custom);r&&(n=r[A])}if(t&&n!==void 0)return n;const s=this.getBaseTargetFromProps(this.props,A);return s!==void 0&&!Dr(s)?s:this.initialValues[A]!==void 0&&n===void 0?void 0:this.baseTarget[A]}on(A,t){return this.events[A]||(this.events[A]=new u3),this.events[A].add(t)}notify(A,...t){this.events[A]&&this.events[A].notify(...t)}scheduleRenderMicrotask(){$3.render(this.render)}}class Q2 extends c${constructor(){super(...arguments),this.KeyframeResolver=Tq}sortInstanceNodePosition(A,t){return A.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(A,t){const n=A.style;return n?n[t]:void 0}removeValueFromRenderState(A,{vars:t,style:n}){delete t[A],delete n[A]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:A}=this.props;Dr(A)&&(this.childSubscription=A.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class rd{constructor(A){this.isMounted=!1,this.node=A}update(){}}function b2({top:e,left:A,right:t,bottom:n}){return{x:{min:A,max:t},y:{min:e,max:n}}}function l$({x:e,y:A}){return{top:A.min,right:e.max,bottom:A.max,left:e.min}}function g$(e,A){if(!A)return e;const t=A({x:e.left,y:e.top}),n=A({x:e.right,y:e.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function ay(e){return e===void 0||e===1}function iy({scale:e,scaleX:A,scaleY:t}){return!ay(e)||!ay(A)||!ay(t)}function uG(e){return iy(e)||C2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function C2(e){return v2(e.x)||v2(e.y)}function v2(e){return e&&e!=="0%"}function WI(e,A,t){const n=e-t,s=A*n;return t+s}function I2(e,A,t,n,s){return s!==void 0&&(e=WI(e,s,n)),WI(e,t,n)+A}function oy(e,A=0,t=1,n,s){e.min=I2(e.min,A,t,n,s),e.max=I2(e.max,A,t,n,s)}function p2(e,{x:A,y:t}){oy(e.x,A.translate,A.scale,A.originPoint),oy(e.y,t.translate,t.scale,t.originPoint)}const H2=.999999999999,m2=1.0000000000001;function d$(e,A,t,n=!1){const s=t.length;if(!s)return;A.x=A.y=1;let r,a;for(let o=0;o<s;o++){r=t[o],a=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(wc(e.x,-r.scroll.offset.x),wc(e.y,-r.scroll.offset.y)),a&&(A.x*=a.x.scale,A.y*=a.y.scale,p2(e,a)),n&&uG(r.latestValues)&&NI(e,r.latestValues,r.layout?.layoutBox))}A.x<m2&&A.x>H2&&(A.x=1),A.y<m2&&A.y>H2&&(A.y=1)}function wc(e,A){e.min+=A,e.max+=A}function E2(e,A,t,n,s=.5){const r=Hn(e.min,e.max,s);oy(e,A,t,r,n)}function y2(e,A){return typeof e=="string"?parseFloat(e)/100*(A.max-A.min):e}function NI(e,A,t){const n=t??e;E2(e.x,y2(A.x,n.x),A.scaleX,A.scale,A.originX),E2(e.y,y2(A.y,n.y),A.scaleY,A.scale,A.originY)}function Y2(e,A){return b2(g$(e.getBoundingClientRect(),A))}function u$(e,A,t){const n=Y2(e,t),{scroll:s}=A;return s&&(wc(n.x,s.offset.x),wc(n.y,s.offset.y)),n}const G$={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},f$=hh.length;function h$(e,A,t){let n="",s=!0;for(let r=0;r<f$;r++){const a=hh[r],o=e[a];if(o===void 0)continue;let c=!0;if(typeof o=="number")c=o===(a.startsWith("scale")?1:0);else{const l=parseFloat(o);c=a.startsWith("scale")?l===1:l===0}if(!c||t){const l=s2(o,q3[a]);if(!c){s=!1;const g=G$[a]||a;n+=`${g}(${l}) `}t&&(A[a]=l)}}return n=n.trim(),t?n=t(A,s?"":n):s&&(n="none"),n}function By(e,A,t){const{style:n,vars:s,transformOrigin:r}=e;let a=!1,o=!1;for(const c in A){const l=A[c];if(wh.has(c)){a=!0;continue}else if(Bx(c)){s[c]=l;continue}else{const g=s2(l,q3[c]);c.startsWith("origin")?(o=!0,r[c]=g):n[c]=g}}if(A.transform||(a||t?n.transform=h$(A,e.transform,t):n.transform&&(n.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:g=0}=r;n.transformOrigin=`${c} ${l} ${g}`}}function Z2(e,{style:A,vars:t},n,s){const r=e.style;let a;for(a in A)r[a]=A[a];s?.applyProjectionStyles(r,n);for(a in t)r.setProperty(a,t[a])}function k2(e,A){return A.max===A.min?0:e/(A.max-A.min)*100}const OQ={correct:(e,A)=>{if(!A.target)return e;if(typeof e=="string")if(oe.test(e))e=parseFloat(e);else return e;const t=k2(e,A.target.x),n=k2(e,A.target.y);return`${t}% ${n}%`}},w$={correct:(e,{treeScale:A,projectionDelta:t})=>{const n=e,s=sB.parse(e);if(s.length>5)return n;const r=sB.createTransformer(e),a=typeof s[0]!="number"?1:0,o=t.x.scale*A.x,c=t.y.scale*A.y;s[0+a]/=o,s[1+a]/=c;const l=Hn(o,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=l),typeof s[3+a]=="number"&&(s[3+a]/=l),r(s)}},cy={borderRadius:{...OQ,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:OQ,borderTopRightRadius:OQ,borderBottomLeftRadius:OQ,borderBottomRightRadius:OQ,boxShadow:w$};function U2(e,{layout:A,layoutId:t}){return wh.has(e)||e.startsWith("origin")||(A||t!==void 0)&&(!!cy[e]||e==="opacity")}function ly(e,A,t){const n=e.style,s=A?.style,r={};if(!n)return r;for(const a in n)(Dr(n[a])||s&&Dr(s[a])||U2(a,e)||t?.getValue(a)?.liveStyle!==void 0)&&(r[a]=n[a]);return r}function Q$(e){return window.getComputedStyle(e)}class b$ extends Q2{constructor(){super(...arguments),this.type="html",this.renderInstance=Z2}readValueFromInstance(A,t){if(wh.has(t))return this.projection?.isProjecting?F3(t):z6(A,t);{const n=Q$(A),s=(Bx(t)?n.getPropertyValue(t):n[t])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(A,{transformPagePoint:t}){return Y2(A,t)}build(A,t,n){By(A,t,n.transformTemplate)}scrapeMotionValuesFromProps(A,t,n){return ly(A,t,n)}}const C$={offset:"stroke-dashoffset",array:"stroke-dasharray"},v$={offset:"strokeDashoffset",array:"strokeDasharray"};function I$(e,A,t=1,n=0,s=!0){e.pathLength=1;const r=s?C$:v$;e[r.offset]=`${-n}`,e[r.array]=`${A} ${t}`}const p$=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function D2(e,{attrX:A,attrY:t,attrScale:n,pathLength:s,pathSpacing:r=1,pathOffset:a=0,...o},c,l,g){if(By(e,o,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:u,style:f}=e;u.transform&&(f.transform=u.transform,delete u.transform),(f.transform||u.transformOrigin)&&(f.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),f.transform&&(f.transformBox=g?.transformBox??"fill-box",delete u.transformBox);for(const w of p$)u[w]!==void 0&&(f[w]=u[w],delete u[w]);A!==void 0&&(u.x=A),t!==void 0&&(u.y=t),n!==void 0&&(u.scale=n),s!==void 0&&I$(u,s,r,a,!1)}const F2=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"]),M2=e=>typeof e=="string"&&e.toLowerCase()==="svg";function H$(e,A,t,n){Z2(e,A,void 0,n);for(const s in A.attrs)e.setAttribute(F2.has(s)?s:J3(s),A.attrs[s])}function x2(e,A,t){const n=ly(e,A,t);for(const s in e)if(Dr(e[s])||Dr(A[s])){const r=hh.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[r]=e[s]}return n}class m$ extends Q2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ks}getBaseTargetFromProps(A,t){return A[t]}readValueFromInstance(A,t){if(wh.has(t)){const n=e2(t);return n&&n.default||0}return t=F2.has(t)?t:J3(t),A.getAttribute(t)}scrapeMotionValuesFromProps(A,t,n){return x2(A,t,n)}build(A,t,n){D2(A,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(A,t,n,s){H$(A,t,n,s)}mount(A){this.isSVGTag=M2(A.tagName),super.mount(A)}}const E$=sy.length;function P2(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent?P2(e.parent)||{}:{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}const A={};for(let t=0;t<E$;t++){const n=sy[t],s=e.props[n];(XQ(s)||s===!1)&&(A[n]=s)}return A}function T2(e,A){if(!Array.isArray(A))return!1;const t=A.length;if(t!==e.length)return!1;for(let n=0;n<t;n++)if(A[n]!==e[n])return!1;return!0}const y$=[...ny].reverse(),Y$=ny.length;function Z$(e){return A=>Promise.all(A.map(({animation:t,options:n})=>jx(e,t,n)))}function k$(e){let A=Z$(e),t=R2(),n=!0,s=!1;const r=l=>(g,u)=>{const f=dG(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:w,transitionEnd:v,...H}=f;g={...g,...H,...v}}return g};function a(l){A=l(e)}function o(l){const{props:g}=e,u=P2(e.parent)||{},f=[],w=new Set;let v={},H=1/0;for(let Z=0;Z<Y$;Z++){const M=y$[Z],S=t[M],x=g[M]!==void 0?g[M]:u[M],D=XQ(x),V=M===l?S.isActive:null;V===!1&&(H=Z);let W=x===u[M]&&x!==g[M]&&D;if(W&&(n||s)&&e.manuallyAnimateOnMount&&(W=!1),S.protectedKeys={...v},!S.isActive&&V===null||!x&&!S.prevProp||RI(x)||typeof x=="boolean")continue;if(M==="exit"&&S.isActive&&V!==!0){S.prevResolvedValues&&(v={...v,...S.prevResolvedValues});continue}const z=U$(S.prevProp,x);let eA=z||M===l&&S.isActive&&!W&&D||Z>H&&D,$=!1;const rA=Array.isArray(x)?x:[x];let iA=rA.reduce(r(M),{});V===!1&&(iA={});const{prevResolvedValues:hA={}}=S,fA={...hA,...iA},yA=AA=>{eA=!0,w.has(AA)&&($=!0,w.delete(AA)),S.needsAnimating[AA]=!0;const MA=e.getValue(AA);MA&&(MA.liveStyle=!1)};for(const AA in fA){const MA=iA[AA],q=hA[AA];if(v.hasOwnProperty(AA))continue;let N=!1;L3(MA)&&L3(q)?N=!T2(MA,q):N=MA!==q,N?MA!=null?yA(AA):w.add(AA):MA!==void 0&&w.has(AA)?yA(AA):S.protectedKeys[AA]=!0}S.prevProp=x,S.prevResolvedValues=iA,S.isActive&&(v={...v,...iA}),(n||s)&&e.blockInitialAnimation&&(eA=!1);const X=W&&z;eA&&(!X||$)&&f.push(...rA.map(AA=>{const MA={type:M};if(typeof AA=="string"&&(n||s)&&!X&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,N=dG(q,AA);if(q.enteringChildren&&N){const{delayChildren:dA}=N.transition||{};MA.delay=Vx(q.enteringChildren,e,dA)}}return{animation:AA,options:MA}}))}if(w.size){const Z={};if(typeof g.initial!="boolean"){const M=dG(e,Array.isArray(g.initial)?g.initial[0]:g.initial);M&&M.transition&&(Z.transition=M.transition)}w.forEach(M=>{const S=e.getBaseTarget(M),x=e.getValue(M);x&&(x.liveStyle=!0),Z[M]=S??null}),f.push({animation:Z})}let E=!!f.length;return n&&(g.initial===!1||g.initial===g.animate)&&!e.manuallyAnimateOnMount&&(E=!1),n=!1,s=!1,E?A(f):Promise.resolve()}function c(l,g){if(t[l].isActive===g)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,g)),t[l].isActive=g;const u=o(l);for(const f in t)t[f].protectedKeys={};return u}return{animateChanges:o,setActive:c,setAnimateFunction:a,getState:()=>t,reset:()=>{t=R2(),s=!0}}}function U$(e,A){return typeof A=="string"?A!==e:Array.isArray(A)?!T2(A,e):!1}function GG(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function R2(){return{animate:GG(!0),whileInView:GG(),whileHover:GG(),whileTap:GG(),whileDrag:GG(),whileFocus:GG(),exit:GG()}}function gy(e,A){e.min=A.min,e.max=A.max}function aB(e,A){gy(e.x,A.x),gy(e.y,A.y)}function S2(e,A){e.translate=A.translate,e.scale=A.scale,e.originPoint=A.originPoint,e.origin=A.origin}const V2=1e-4,D$=1-V2,F$=1+V2,W2=.01,M$=0-W2,x$=0+W2;function la(e){return e.max-e.min}function P$(e,A,t){return Math.abs(e-A)<=t}function N2(e,A,t,n=.5){e.origin=n,e.originPoint=Hn(A.min,A.max,e.origin),e.scale=la(t)/la(A),e.translate=Hn(t.min,t.max,e.origin)-e.originPoint,(e.scale>=D$&&e.scale<=F$||isNaN(e.scale))&&(e.scale=1),(e.translate>=M$&&e.translate<=x$||isNaN(e.translate))&&(e.translate=0)}function JQ(e,A,t,n){N2(e.x,A.x,t.x,n?n.originX:void 0),N2(e.y,A.y,t.y,n?n.originY:void 0)}function z2(e,A,t,n=0){const s=n?Hn(t.min,t.max,n):t.min;e.min=s+A.min,e.max=e.min+la(A)}function T$(e,A,t,n){z2(e.x,A.x,t.x,n?.x),z2(e.y,A.y,t.y,n?.y)}function L2(e,A,t,n=0){const s=n?Hn(t.min,t.max,n):t.min;e.min=A.min-s,e.max=e.min+la(A)}function zI(e,A,t,n){L2(e.x,A.x,t.x,n?.x),L2(e.y,A.y,t.y,n?.y)}function X2(e,A,t,n,s){return e-=A,e=WI(e,1/t,n),s!==void 0&&(e=WI(e,1/s,n)),e}function R$(e,A=0,t=1,n=.5,s,r=e,a=e){if(hc.test(A)&&(A=parseFloat(A),A=Hn(a.min,a.max,A/100)-a.min),typeof A!="number")return;let o=Hn(r.min,r.max,n);e===r&&(o-=A),e.min=X2(e.min,A,t,o,s),e.max=X2(e.max,A,t,o,s)}function O2(e,A,[t,n,s],r,a){R$(e,A[t],A[n],A[s],A.scale,r,a)}const S$=["x","scaleX","originX"],V$=["y","scaleY","originY"];function J2(e,A,t,n){O2(e.x,A,S$,t?t.x:void 0,n?n.x:void 0),O2(e.y,A,V$,t?t.y:void 0,n?n.y:void 0)}function K2(e){return e.translate===0&&e.scale===1}function j2(e){return K2(e.x)&&K2(e.y)}function _2(e,A){return e.min===A.min&&e.max===A.max}function W$(e,A){return _2(e.x,A.x)&&_2(e.y,A.y)}function q2(e,A){return Math.round(e.min)===Math.round(A.min)&&Math.round(e.max)===Math.round(A.max)}function $2(e,A){return q2(e.x,A.x)&&q2(e.y,A.y)}function AP(e){return la(e.x)/la(e.y)}function eP(e,A){return e.translate===A.translate&&e.scale===A.scale&&e.originPoint===A.originPoint}function Qc(e){return[e("x"),e("y")]}function N$(e,A,t){let n="";const s=e.x.translate/A.x,r=e.y.translate/A.y,a=t?.z||0;if((s||r||a)&&(n=`translate3d(${s}px, ${r}px, ${a}px) `),(A.x!==1||A.y!==1)&&(n+=`scale(${1/A.x}, ${1/A.y}) `),t){const{transformPerspective:l,rotate:g,rotateX:u,rotateY:f,skewX:w,skewY:v}=t;l&&(n=`perspective(${l}px) ${n}`),g&&(n+=`rotate(${g}deg) `),u&&(n+=`rotateX(${u}deg) `),f&&(n+=`rotateY(${f}deg) `),w&&(n+=`skewX(${w}deg) `),v&&(n+=`skewY(${v}deg) `)}const o=e.x.scale*A.x,c=e.y.scale*A.y;return(o!==1||c!==1)&&(n+=`scale(${o}, ${c})`),n||"none"}const tP=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],z$=tP.length,nP=e=>typeof e=="string"?parseFloat(e):e,sP=e=>typeof e=="number"||oe.test(e);function L$(e,A,t,n,s,r){s?(e.opacity=Hn(0,t.opacity??1,X$(n)),e.opacityExit=Hn(A.opacity??1,0,O$(n))):r&&(e.opacity=Hn(A.opacity??1,t.opacity??1,n));for(let a=0;a<z$;a++){const o=tP[a];let c=rP(A,o),l=rP(t,o);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||sP(c)===sP(l)?(e[o]=Math.max(Hn(nP(c),nP(l),n),0),(hc.test(l)||hc.test(c))&&(e[o]+="%")):e[o]=l}(A.rotate||t.rotate)&&(e.rotate=Hn(A.rotate||0,t.rotate||0,n))}function rP(e,A){return e[A]!==void 0?e[A]:e.borderRadius}const X$=aP(0,.5,tx),O$=aP(.5,.95,lo);function aP(e,A,t){return n=>n<e?0:n>A?1:t(RQ(e,A,n))}function J$(e,A,t){const n=Dr(e)?e:Qh(e);return n.start(N3("",n,A,t)),n.animation}function KQ(e,A,t,n={passive:!0}){return e.addEventListener(A,t,n),()=>e.removeEventListener(A,t)}const K$=(e,A)=>e.depth-A.depth;class j${constructor(){this.children=[],this.isDirty=!1}add(A){g3(this.children,A),this.isDirty=!0}remove(A){HI(this.children,A),this.isDirty=!0}forEach(A){this.isDirty&&this.children.sort(K$),this.isDirty=!1,this.children.forEach(A)}}function _$(e,A){const t=ca.now(),n=({timestamp:s})=>{const r=s-t;r>=A&&(td(n),e(r-A))};return Bn.setup(n,!0),()=>td(n)}function LI(e){return Dr(e)?e.get():e}class q${constructor(){this.members=[]}add(A){g3(this.members,A);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===A||n===this.lead||n===this.prevLead)continue;const s=n.instance;(!s||s.isConnected===!1)&&!n.snapshot&&(HI(this.members,n),n.unmount())}A.scheduleRender()}remove(A){if(HI(this.members,A),A===this.prevLead&&(this.prevLead=void 0),A===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(A){for(let t=this.members.indexOf(A)-1;t>=0;t--){const n=this.members[t];if(n.isPresent!==!1&&n.instance?.isConnected!==!1)return this.promote(n),!0}return!1}promote(A,t){const n=this.lead;if(A!==n&&(this.prevLead=n,this.lead=A,A.show(),n)){n.updateSnapshot(),A.scheduleRender();const{layoutDependency:s}=n.options,{layoutDependency:r}=A.options;(s===void 0||s!==r)&&(A.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(A.snapshot=n.snapshot,A.snapshot.latestValues=n.animationValues||n.latestValues),A.root?.isUpdating&&(A.isLayoutDirty=!0)),A.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(A=>{A.options.onExitComplete?.(),A.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(A=>A.instance&&A.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const XI={hasAnimatedSinceResize:!0,hasEverUpdated:!1},dy=["","X","Y","Z"],$$=1e3;let AAA=0;function uy(e,A,t,n){const{latestValues:s}=A;s[e]&&(t[e]=s[e],A.setStaticValue(e,0),n&&(n[e]=0))}function iP(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:A}=e.options;if(!A)return;const t=Jx(A);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:s,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(t,"transform",Bn,!(s||r))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&iP(n)}function oP({attachResizeListener:e,defaultParent:A,measureScroll:t,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(a={},o=A?.()){this.id=AAA++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(nAA),this.nodes.forEach(BAA),this.nodes.forEach(cAA),this.nodes.forEach(sAA)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new j$)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new u3),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const c=this.eventHandlers.get(a);c&&c.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=ty(a)&&!t$(a),this.instance=a;const{layoutId:o,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||o)&&(this.isLayoutDirty=!0),e){let g,u=0;const f=()=>this.root.updateBlockedByResize=!1;Bn.read(()=>{u=window.innerWidth}),e(a,()=>{const w=window.innerWidth;w!==u&&(u=w,this.root.updateBlockedByResize=!0,g&&g(),g=_$(f,250),XI.hasAnimatedSinceResize&&(XI.hasAnimatedSinceResize=!1,this.nodes.forEach(lP)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&l&&(o||c)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:u,hasRelativeLayoutChanged:f,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||l.getDefaultTransition()||GAA,{onLayoutAnimationStart:H,onLayoutAnimationComplete:E}=l.getProps(),Z=!this.targetLayout||!$2(this.targetLayout,w),M=!u&&f;if(this.options.layoutRoot||this.resumeFrom||M||u&&(Z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...W3(v,"layout"),onPlay:H,onComplete:E};(l.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(g,M)}else u||lP(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),td(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(lAA),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&iP(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const u=this.path[g];u.shouldResetTransform=!0,(typeof u.latestValues.x=="string"||typeof u.latestValues.y=="string")&&(u.isLayoutDirty=!0),u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:o,layout:c}=this.options;if(o===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(aAA),this.nodes.forEach(BP);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(cP);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(iAA),this.nodes.forEach(oAA),this.nodes.forEach(eAA),this.nodes.forEach(tAA)):this.nodes.forEach(cP),this.clearAllSnapshots();const o=ca.now();Ur.delta=fc(0,1e3/60,o-Ur.timestamp),Ur.timestamp=o,Ur.isProcessing=!0,h3.update.process(Ur),h3.preRender.process(Ur),h3.render.process(Ur),Ur.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$3.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rAA),this.sharedNodes.forEach(gAA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Bn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Bn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!la(this.snapshot.measuredBox.x)&&!la(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ks()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!j2(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,g=l!==this.prevTransformTemplateValue;a&&this.instance&&(o||uG(this.latestValues)||g)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let c=this.removeElementScroll(o);return a&&(c=this.removeTransform(c)),fAA(c),{animationId:this.root.animationId,measuredBox:o,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Ks();const o=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(hAA))){const{scroll:l}=this.root;l&&(wc(o.x,l.offset.x),wc(o.y,l.offset.y))}return o}removeElementScroll(a){const o=Ks();if(aB(o,a),this.scroll?.wasRoot)return o;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:g,options:u}=l;l!==this.root&&g&&u.layoutScroll&&(g.wasRoot&&aB(o,a),wc(o.x,g.offset.x),wc(o.y,g.offset.y))}return o}applyTransform(a,o=!1,c){const l=c||Ks();aB(l,a);for(let g=0;g<this.path.length;g++){const u=this.path[g];!o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&(wc(l.x,-u.scroll.offset.x),wc(l.y,-u.scroll.offset.y)),uG(u.latestValues)&&NI(l,u.latestValues,u.layout?.layoutBox)}return uG(this.latestValues)&&NI(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(a){const o=Ks();aB(o,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!uG(l.latestValues))continue;let g;l.instance&&(iy(l.latestValues)&&l.updateSnapshot(),g=Ks(),aB(g,l.measurePageBox())),J2(o,l.latestValues,l.snapshot?.layoutBox,g)}return uG(this.latestValues)&&J2(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Ur.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==o;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:u}=this.options;if(!this.layout||!(g||u))return;this.resolvedRelativeTargetAt=Ur.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ks(),this.targetWithTransforms=Ks()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),T$(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):aB(this.target,this.layout.layoutBox),p2(this.target,this.targetDelta)):aB(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||iy(this.parent.latestValues)||C2(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,o,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ks(),this.relativeTargetOrigin=Ks(),zI(this.relativeTargetOrigin,o,c,this.options.layoutAnchor||void 0),aB(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),o=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ur.timestamp&&(c=!1),c)return;const{layout:l,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||g))return;aB(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,f=this.treeScale.y;d$(this.layoutCorrected,this.treeScale,this.path,o),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ks());const{target:w}=a;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(S2(this.prevProjectionDelta.x,this.projectionDelta.x),S2(this.prevProjectionDelta.y,this.projectionDelta.y)),JQ(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==f||!eP(this.projectionDelta.x,this.prevProjectionDelta.x)||!eP(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ch(),this.projectionDelta=Ch(),this.projectionDeltaWithTransform=Ch()}setAnimationOrigin(a,o=!1){const c=this.snapshot,l=c?c.latestValues:{},g={...this.latestValues},u=Ch();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=Ks(),w=c?c.source:void 0,v=this.layout?this.layout.source:void 0,H=w!==v,E=this.getStack(),Z=!E||E.members.length<=1,M=!!(H&&!Z&&this.options.crossfade===!0&&!this.path.some(uAA));this.animationProgress=0;let S;this.mixTargetDelta=x=>{const D=x/1e3;gP(u.x,a.x,D),gP(u.y,a.y,D),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zI(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),dAA(this.relativeTarget,this.relativeTargetOrigin,f,D),S&&W$(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Ks()),aB(S,this.relativeTarget)),H&&(this.animationValues=g,L$(g,l,this.latestValues,D,M,Z)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=D},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(td(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Bn.update(()=>{XI.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qh(0)),this.motionValue.jump(0,!1),this.currentAnimation=J$(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:o=>{this.mixTargetDelta(o),a.onUpdate&&a.onUpdate(o)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta($$),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:c,layout:l,latestValues:g}=a;if(!(!o||!c||!l)){if(this!==a&&this.layout&&l&&hP(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ks();const u=la(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+u;const f=la(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}aB(o,c),NI(o,g),JQ(this.projectionDeltaWithTransform,this.layoutCorrected,o,g)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new q$),this.sharedNodes.get(a).add(o);const l=o.options.initialPromotionConfig;o.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(o=!0),!o)return;const l={};c.z&&uy("z",a,l,this.animationValues);for(let g=0;g<dy.length;g++)uy(`rotate${dy[g]}`,a,l,this.animationValues),uy(`skew${dy[g]}`,a,l,this.animationValues);a.render();for(const g in l)a.setStaticValue(g,l[g]),this.animationValues&&(this.animationValues[g]=l[g]);a.scheduleRender()}applyProjectionStyles(a,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=LI(o?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=LI(o?.pointerEvents)||""),this.hasProjected&&!uG(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const g=l.animationValues||l.latestValues;this.applyTransformsToTarget();let u=N$(this.projectionDeltaWithTransform,this.treeScale,g);c&&(u=c(g,u)),a.transform=u;const{x:f,y:w}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${w.origin*100}% 0`,l.animationValues?a.opacity=l===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:a.opacity=l===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const v in cy){if(g[v]===void 0)continue;const{correct:H,applyTo:E,isCSSVariable:Z}=cy[v],M=u==="none"?g[v]:H(g[v],l);if(E){const S=E.length;for(let x=0;x<S;x++)a[E[x]]=M}else Z?this.options.visualElement.renderState.vars[v]=M:a[v]=M}this.options.layoutId&&(a.pointerEvents=l===this?LI(o?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(BP),this.root.sharedNodes.clear()}}}function eAA(e){e.updateLayout()}function tAA(e){const A=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&A&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:s}=e.options,r=A.source!==e.layout.source;if(s==="size")Qc(g=>{const u=r?A.measuredBox[g]:A.layoutBox[g],f=la(u);u.min=t[g].min,u.max=u.min+f});else if(s==="x"||s==="y"){const g=s==="x"?"y":"x";gy(r?A.measuredBox[g]:A.layoutBox[g],t[g])}else hP(s,A.layoutBox,t)&&Qc(g=>{const u=r?A.measuredBox[g]:A.layoutBox[g],f=la(t[g]);u.max=u.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+f)});const a=Ch();JQ(a,t,A.layoutBox);const o=Ch();r?JQ(o,e.applyTransform(n,!0),A.measuredBox):JQ(o,t,A.layoutBox);const c=!j2(a);let l=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:u,layout:f}=g;if(u&&f){const w=e.options.layoutAnchor||void 0,v=Ks();zI(v,A.layoutBox,u.layoutBox,w);const H=Ks();zI(H,t,f.layoutBox,w),$2(v,H)||(l=!0),g.options.layoutRoot&&(e.relativeTarget=H,e.relativeTargetOrigin=v,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:A,delta:o,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function nAA(e){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 sAA(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function rAA(e){e.clearSnapshot()}function BP(e){e.clearMeasurements()}function aAA(e){e.isLayoutDirty=!0,e.updateLayout()}function cP(e){e.isLayoutDirty=!1}function iAA(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function oAA(e){const{visualElement:A}=e.options;A&&A.getProps().onBeforeLayoutMeasure&&A.notify("BeforeLayoutMeasure"),e.resetTransform()}function lP(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function BAA(e){e.resolveTargetDelta()}function cAA(e){e.calcProjection()}function lAA(e){e.resetSkewAndRotation()}function gAA(e){e.removeLeadSnapshot()}function gP(e,A,t){e.translate=Hn(A.translate,0,t),e.scale=Hn(A.scale,1,t),e.origin=A.origin,e.originPoint=A.originPoint}function dP(e,A,t,n){e.min=Hn(A.min,t.min,n),e.max=Hn(A.max,t.max,n)}function dAA(e,A,t,n){dP(e.x,A.x,t.x,n),dP(e.y,A.y,t.y,n)}function uAA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const GAA={duration:.45,ease:[.4,0,.1,1]},uP=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),GP=uP("applewebkit/")&&!uP("chrome/")?Math.round:lo;function fP(e){e.min=GP(e.min),e.max=GP(e.max)}function fAA(e){fP(e.x),fP(e.y)}function hP(e,A,t){return e==="position"||e==="preserve-aspect"&&!P$(AP(A),AP(t),.2)}function hAA(e){return e!==e.root&&e.scroll?.wasRoot}const wAA=oP({attachResizeListener:(e,A)=>KQ(e,"resize",A),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Gy={current:void 0},wP=oP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Gy.current){const e=new wAA({});e.mount(window),e.setOptions({layoutScroll:!0}),Gy.current=e}return Gy.current},resetTransform:(e,A)=>{e.style.transform=A!==void 0?A:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fy=R.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function QP(e,A){if(typeof e=="function")return e(A);e!=null&&(e.current=A)}function QAA(...e){return A=>{let t=!1;const n=e.map(s=>{const r=QP(s,A);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let s=0;s<n.length;s++){const r=n[s];typeof r=="function"?r():QP(e[s],null)}}}}function bAA(...e){return R.useCallback(QAA(...e),e)}class CAA extends R.Component{getSnapshotBeforeUpdate(A){const t=this.props.childRef.current;if(FI(t)&&A.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const n=t.offsetParent,s=FI(n)&&n.offsetWidth||0,r=FI(n)&&n.offsetHeight||0,a=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(a.height),o.width=parseFloat(a.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=s-o.width-o.left,o.bottom=r-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function vAA({children:e,isPresent:A,anchorX:t,anchorY:n,root:s,pop:r}){const a=R.useId(),o=R.useRef(null),c=R.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=R.useContext(fy),g=e.props?.ref??e?.ref,u=bAA(o,g);return R.useInsertionEffect(()=>{const{width:f,height:w,top:v,left:H,right:E,bottom:Z}=c.current;if(A||r===!1||!o.current||!f||!w)return;const M=t==="left"?`left: ${H}`:`right: ${E}`,S=n==="bottom"?`bottom: ${Z}`:`top: ${v}`;o.current.dataset.motionPopId=a;const x=document.createElement("style");l&&(x.nonce=l);const D=s??document.head;return D.appendChild(x),x.sheet&&x.sheet.insertRule(`
|
|
57
57
|
[data-motion-pop-id="${a}"] {
|
|
58
58
|
position: absolute !important;
|
|
59
59
|
width: ${f}px !important;
|
|
@@ -94,7 +94,7 @@ or you can use record.mirror to access the mirror instance during recording.`;le
|
|
|
94
94
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(A){return A instanceof this?A:new this(A)}static concat(A,...t){const n=new this(A);return t.forEach(s=>n.set(s)),n}static accessor(A){const n=(this[F1]=this[F1]={accessors:{}}).accessors,s=this.prototype;function r(a){const o=qb(a);n[o]||(cwA(s,a),n[o]=!0)}return HA.isArray(A)?A.forEach(r):r(A),this}};ja.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),HA.reduceDescriptors(ja.prototype,({value:e},A)=>{let t=A[0].toUpperCase()+A.slice(1);return{get:()=>e,set(n){this[t]=n}}}),HA.freezeMethods(ja);function oZ(e,A){const t=this||_b,n=A||t,s=ja.from(n.headers);let r=n.data;return HA.forEach(e,function(o){r=o.call(t,r,s.normalize(),A?A.status:void 0)}),s.normalize(),r}function M1(e){return!!(e&&e.__CANCEL__)}let $b=class extends ye{constructor(A,t,n){super(A??"canceled",ye.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function x1(e,A,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?e(t):A(new ye("Request failed with status code "+t.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function lwA(e){const A=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return A&&A[1]||""}function gwA(e,A){e=e||10;const t=new Array(e),n=new Array(e);let s=0,r=0,a;return A=A!==void 0?A:1e3,function(c){const l=Date.now(),g=n[r];a||(a=l),t[s]=c,n[s]=l;let u=r,f=0;for(;u!==s;)f+=t[u++],u=u%e;if(s=(s+1)%e,s===r&&(r=(r+1)%e),l-a<A)return;const w=g&&l-g;return w?Math.round(f*1e3/w):void 0}}function dwA(e,A){let t=0,n=1e3/A,s,r;const a=(l,g=Date.now())=>{t=g,s=null,r&&(clearTimeout(r),r=null),e(...l)};return[(...l)=>{const g=Date.now(),u=g-t;u>=n?a(l,g):(s=l,r||(r=setTimeout(()=>{r=null,a(s)},n-u)))},()=>s&&a(s)]}const TH=(e,A,t=3)=>{let n=0;const s=gwA(50,250);return dwA(r=>{const a=r.loaded,o=r.lengthComputable?r.total:void 0,c=a-n,l=s(c),g=a<=o;n=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o&&g?(o-a)/l:void 0,event:r,lengthComputable:o!=null,[A?"download":"upload"]:!0};e(u)},t)},P1=(e,A)=>{const t=e!=null;return[n=>A[0]({lengthComputable:t,total:e,loaded:n}),A[1]]},T1=e=>(...A)=>HA.asap(()=>e(...A)),uwA=Jr.hasStandardBrowserEnv?((e,A)=>t=>(t=new URL(t,Jr.origin),e.protocol===t.protocol&&e.host===t.host&&(A||e.port===t.port)))(new URL(Jr.origin),Jr.navigator&&/(msie|trident)/i.test(Jr.navigator.userAgent)):()=>!0,GwA=Jr.hasStandardBrowserEnv?{write(e,A,t,n,s,r,a){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(A)}`];HA.isNumber(t)&&o.push(`expires=${new Date(t).toUTCString()}`),HA.isString(n)&&o.push(`path=${n}`),HA.isString(s)&&o.push(`domain=${s}`),r===!0&&o.push("secure"),HA.isString(a)&&o.push(`SameSite=${a}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const A=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return A?decodeURIComponent(A[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function fwA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function hwA(e,A){return A?e.replace(/\/?\/$/,"")+"/"+A.replace(/^\/+/,""):e}function R1(e,A,t){let n=!fwA(A);return e&&(n||t==!1)?hwA(e,A):A}const S1=e=>e instanceof ja?{...e}:e;function PG(e,A){A=A||{};const t={};function n(l,g,u,f){return HA.isPlainObject(l)&&HA.isPlainObject(g)?HA.merge.call({caseless:f},l,g):HA.isPlainObject(g)?HA.merge({},g):HA.isArray(g)?g.slice():g}function s(l,g,u,f){if(HA.isUndefined(g)){if(!HA.isUndefined(l))return n(void 0,l,u,f)}else return n(l,g,u,f)}function r(l,g){if(!HA.isUndefined(g))return n(void 0,g)}function a(l,g){if(HA.isUndefined(g)){if(!HA.isUndefined(l))return n(void 0,l)}else return n(void 0,g)}function o(l,g,u){if(u in A)return n(l,g);if(u in e)return n(void 0,l)}const c={url:r,method:r,data:r,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(l,g,u)=>s(S1(l),S1(g),u,!0)};return HA.forEach(Object.keys({...e,...A}),function(g){if(g==="__proto__"||g==="constructor"||g==="prototype")return;const u=HA.hasOwnProp(c,g)?c[g]:s,f=u(e[g],A[g],g);HA.isUndefined(f)&&u!==o||(t[g]=f)}),t}const V1=e=>{const A=PG({},e);let{data:t,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:r,headers:a,auth:o}=A;if(A.headers=a=ja.from(a),A.url=k1(R1(A.baseURL,A.url,A.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),HA.isFormData(t)){if(Jr.hasStandardBrowserEnv||Jr.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(HA.isFunction(t.getHeaders)){const c=t.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([g,u])=>{l.includes(g.toLowerCase())&&a.set(g,u)})}}if(Jr.hasStandardBrowserEnv&&(n&&HA.isFunction(n)&&(n=n(A)),n||n!==!1&&uwA(A.url))){const c=s&&r&&GwA.read(r);c&&a.set(s,c)}return A},wwA=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(t,n){const s=V1(e);let r=s.data;const a=ja.from(s.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:l}=s,g,u,f,w,v;function H(){w&&w(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(g),s.signal&&s.signal.removeEventListener("abort",g)}let E=new XMLHttpRequest;E.open(s.method.toUpperCase(),s.url,!0),E.timeout=s.timeout;function Z(){if(!E)return;const S=ja.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),D={data:!o||o==="text"||o==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:S,config:e,request:E};x1(function(W){t(W),H()},function(W){n(W),H()},D),E=null}"onloadend"in E?E.onloadend=Z:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(Z)},E.onabort=function(){E&&(n(new ye("Request aborted",ye.ECONNABORTED,e,E)),E=null)},E.onerror=function(x){const D=x&&x.message?x.message:"Network Error",V=new ye(D,ye.ERR_NETWORK,e,E);V.event=x||null,n(V),E=null},E.ontimeout=function(){let x=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const D=s.transitional||sZ;s.timeoutErrorMessage&&(x=s.timeoutErrorMessage),n(new ye(x,D.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,e,E)),E=null},r===void 0&&a.setContentType(null),"setRequestHeader"in E&&HA.forEach(a.toJSON(),function(x,D){E.setRequestHeader(D,x)}),HA.isUndefined(s.withCredentials)||(E.withCredentials=!!s.withCredentials),o&&o!=="json"&&(E.responseType=s.responseType),l&&([f,v]=TH(l,!0),E.addEventListener("progress",f)),c&&E.upload&&([u,w]=TH(c),E.upload.addEventListener("progress",u),E.upload.addEventListener("loadend",w)),(s.cancelToken||s.signal)&&(g=S=>{E&&(n(!S||S.type?new $b(null,e,E):S),E.abort(),E=null)},s.cancelToken&&s.cancelToken.subscribe(g),s.signal&&(s.signal.aborted?g():s.signal.addEventListener("abort",g)));const M=lwA(s.url);if(M&&Jr.protocols.indexOf(M)===-1){n(new ye("Unsupported protocol "+M+":",ye.ERR_BAD_REQUEST,e));return}E.send(r||null)})},QwA=(e,A)=>{const{length:t}=e=e?e.filter(Boolean):[];if(A||t){let n=new AbortController,s;const r=function(l){if(!s){s=!0,o();const g=l instanceof Error?l:this.reason;n.abort(g instanceof ye?g:new $b(g instanceof Error?g.message:g))}};let a=A&&setTimeout(()=>{a=null,r(new ye(`timeout of ${A}ms exceeded`,ye.ETIMEDOUT))},A);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(r):l.removeEventListener("abort",r)}),e=null)};e.forEach(l=>l.addEventListener("abort",r));const{signal:c}=n;return c.unsubscribe=()=>HA.asap(o),c}},bwA=function*(e,A){let t=e.byteLength;if(t<A){yield e;return}let n=0,s;for(;n<t;)s=n+A,yield e.slice(n,s),n=s},CwA=async function*(e,A){for await(const t of vwA(e))yield*bwA(t,A)},vwA=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const A=e.getReader();try{for(;;){const{done:t,value:n}=await A.read();if(t)break;yield n}}finally{await A.cancel()}},W1=(e,A,t,n)=>{const s=CwA(e,A);let r=0,a,o=c=>{a||(a=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:l,value:g}=await s.next();if(l){o(),c.close();return}let u=g.byteLength;if(t){let f=r+=u;t(f)}c.enqueue(new Uint8Array(g))}catch(l){throw o(l),l}},cancel(c){return o(c),s.return()}},{highWaterMark:2})},N1=64*1024,{isFunction:RH}=HA,IwA=(({Request:e,Response:A})=>({Request:e,Response:A}))(HA.global),{ReadableStream:z1,TextEncoder:L1}=HA.global,X1=(e,...A)=>{try{return!!e(...A)}catch{return!1}},pwA=e=>{e=HA.merge.call({skipUndefined:!0},IwA,e);const{fetch:A,Request:t,Response:n}=e,s=A?RH(A):typeof fetch=="function",r=RH(t),a=RH(n);if(!s)return!1;const o=s&&RH(z1),c=s&&(typeof L1=="function"?(v=>H=>v.encode(H))(new L1):async v=>new Uint8Array(await new t(v).arrayBuffer())),l=r&&o&&X1(()=>{let v=!1;const H=new z1,E=new t(Jr.origin,{body:H,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return H.cancel(),v&&!E}),g=a&&o&&X1(()=>HA.isReadableStream(new n("").body)),u={stream:g&&(v=>v.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!u[v]&&(u[v]=(H,E)=>{let Z=H&&H[v];if(Z)return Z.call(H);throw new ye(`Response type '${v}' is not supported`,ye.ERR_NOT_SUPPORT,E)})});const f=async v=>{if(v==null)return 0;if(HA.isBlob(v))return v.size;if(HA.isSpecCompliantForm(v))return(await new t(Jr.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(HA.isArrayBufferView(v)||HA.isArrayBuffer(v))return v.byteLength;if(HA.isURLSearchParams(v)&&(v=v+""),HA.isString(v))return(await c(v)).byteLength},w=async(v,H)=>{const E=HA.toFiniteNumber(v.getContentLength());return E??f(H)};return async v=>{let{url:H,method:E,data:Z,signal:M,cancelToken:S,timeout:x,onDownloadProgress:D,onUploadProgress:V,responseType:W,headers:z,withCredentials:eA="same-origin",fetchOptions:$}=V1(v),rA=A||fetch;W=W?(W+"").toLowerCase():"text";let iA=QwA([M,S&&S.toAbortSignal()],x),hA=null;const fA=iA&&iA.unsubscribe&&(()=>{iA.unsubscribe()});let yA;try{if(V&&l&&E!=="get"&&E!=="head"&&(yA=await w(z,Z))!==0){let N=new t(H,{method:"POST",body:Z,duplex:"half"}),dA;if(HA.isFormData(Z)&&(dA=N.headers.get("content-type"))&&z.setContentType(dA),N.body){const[kA,YA]=P1(yA,TH(T1(V)));Z=W1(N.body,N1,kA,YA)}}HA.isString(eA)||(eA=eA?"include":"omit");const X=r&&"credentials"in t.prototype,_={...$,signal:iA,method:E.toUpperCase(),headers:z.normalize().toJSON(),body:Z,duplex:"half",credentials:X?eA:void 0};hA=r&&new t(H,_);let AA=await(r?rA(hA,$):rA(H,_));const MA=g&&(W==="stream"||W==="response");if(g&&(D||MA&&fA)){const N={};["status","statusText","headers"].forEach(DA=>{N[DA]=AA[DA]});const dA=HA.toFiniteNumber(AA.headers.get("content-length")),[kA,YA]=D&&P1(dA,TH(T1(D),!0))||[];AA=new n(W1(AA.body,N1,kA,()=>{YA&&YA(),fA&&fA()}),N)}W=W||"text";let q=await u[HA.findKey(u,W)||"text"](AA,v);return!MA&&fA&&fA(),await new Promise((N,dA)=>{x1(N,dA,{data:q,headers:ja.from(AA.headers),status:AA.status,statusText:AA.statusText,config:v,request:hA})})}catch(X){throw fA&&fA(),X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)?Object.assign(new ye("Network Error",ye.ERR_NETWORK,v,hA,X&&X.response),{cause:X.cause||X}):ye.from(X,X&&X.code,v,hA,X&&X.response)}}},HwA=new Map,O1=e=>{let A=e&&e.env||{};const{fetch:t,Request:n,Response:s}=A,r=[n,s,t];let a=r.length,o=a,c,l,g=HwA;for(;o--;)c=r[o],l=g.get(c),l===void 0&&g.set(c,l=o?new Map:pwA(A)),g=l;return l};O1();const BZ={http:OhA,xhr:wwA,fetch:{get:O1}};HA.forEach(BZ,(e,A)=>{if(e){try{Object.defineProperty(e,"name",{value:A})}catch{}Object.defineProperty(e,"adapterName",{value:A})}});const J1=e=>`- ${e}`,mwA=e=>HA.isFunction(e)||e===null||e===!1;function EwA(e,A){e=HA.isArray(e)?e:[e];const{length:t}=e;let n,s;const r={};for(let a=0;a<t;a++){n=e[a];let o;if(s=n,!mwA(n)&&(s=BZ[(o=String(n)).toLowerCase()],s===void 0))throw new ye(`Unknown adapter '${o}'`);if(s&&(HA.isFunction(s)||(s=s.get(A))))break;r[o||"#"+a]=s}if(!s){const a=Object.entries(r).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?a.length>1?`since :
|
|
95
95
|
`+a.map(J1).join(`
|
|
96
96
|
`):" "+J1(a[0]):"as no adapter specified";throw new ye("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s}const K1={getAdapter:EwA,adapters:BZ};function cZ(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $b(null,e)}function j1(e){return cZ(e),e.headers=ja.from(e.headers),e.data=oZ.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),K1.getAdapter(e.adapter||_b.adapter,e)(e).then(function(n){return cZ(e),n.data=oZ.call(e,e.transformResponse,n),n.headers=ja.from(n.headers),n},function(n){return M1(n)||(cZ(e),n&&n.response&&(n.response.data=oZ.call(e,e.transformResponse,n.response),n.response.headers=ja.from(n.response.headers))),Promise.reject(n)})}const _1="1.14.0",SH={};["object","boolean","number","function","string","symbol"].forEach((e,A)=>{SH[e]=function(n){return typeof n===e||"a"+(A<1?"n ":" ")+e}});const q1={};SH.transitional=function(A,t,n){function s(r,a){return"[Axios v"+_1+"] Transitional option '"+r+"'"+a+(n?". "+n:"")}return(r,a,o)=>{if(A===!1)throw new ye(s(a," has been removed"+(t?" in "+t:"")),ye.ERR_DEPRECATED);return t&&!q1[a]&&(q1[a]=!0,console.warn(s(a," has been deprecated since v"+t+" and will be removed in the near future"))),A?A(r,a,o):!0}},SH.spelling=function(A){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${A}`),!0)};function ywA(e,A,t){if(typeof e!="object")throw new ye("options must be an object",ye.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const r=n[s],a=A[r];if(a){const o=e[r],c=o===void 0||a(o,r,e);if(c!==!0)throw new ye("option "+r+" must be "+c,ye.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ye("Unknown option "+r,ye.ERR_BAD_OPTION)}}const VH={assertOptions:ywA,validators:SH},Qo=VH.validators;let TG=class{constructor(A){this.defaults=A||{},this.interceptors={request:new U1,response:new U1}}async request(A,t){try{return await this._request(A,t)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const r=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?r&&!String(n.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
97
|
-
`+r):n.stack=r}catch{}}throw n}}_request(A,t){typeof A=="string"?(t=t||{},t.url=A):t=A||{},t=PG(this.defaults,t);const{transitional:n,paramsSerializer:s,headers:r}=t;n!==void 0&&VH.assertOptions(n,{silentJSONParsing:Qo.transitional(Qo.boolean),forcedJSONParsing:Qo.transitional(Qo.boolean),clarifyTimeoutError:Qo.transitional(Qo.boolean),legacyInterceptorReqResOrdering:Qo.transitional(Qo.boolean)},!1),s!=null&&(HA.isFunction(s)?t.paramsSerializer={serialize:s}:VH.assertOptions(s,{encode:Qo.function,serialize:Qo.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),VH.assertOptions(t,{baseUrl:Qo.spelling("baseURL"),withXsrfToken:Qo.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=r&&HA.merge(r.common,r[t.method]);r&&HA.forEach(["delete","get","head","post","put","patch","common"],v=>{delete r[v]}),t.headers=ja.concat(a,r);const o=[];let c=!0;this.interceptors.request.forEach(function(H){if(typeof H.runWhen=="function"&&H.runWhen(t)===!1)return;c=c&&H.synchronous;const E=t.transitional||sZ;E&&E.legacyInterceptorReqResOrdering?o.unshift(H.fulfilled,H.rejected):o.push(H.fulfilled,H.rejected)});const l=[];this.interceptors.response.forEach(function(H){l.push(H.fulfilled,H.rejected)});let g,u=0,f;if(!c){const v=[j1.bind(this),void 0];for(v.unshift(...o),v.push(...l),f=v.length,g=Promise.resolve(t);u<f;)g=g.then(v[u++],v[u++]);return g}f=o.length;let w=t;for(;u<f;){const v=o[u++],H=o[u++];try{w=v(w)}catch(E){H.call(this,E);break}}try{g=j1.call(this,w)}catch(v){return Promise.reject(v)}for(u=0,f=l.length;u<f;)g=g.then(l[u++],l[u++]);return g}getUri(A){A=PG(this.defaults,A);const t=R1(A.baseURL,A.url,A.allowAbsoluteUrls);return k1(t,A.params,A.paramsSerializer)}};HA.forEach(["delete","get","head","options"],function(A){TG.prototype[A]=function(t,n){return this.request(PG(n||{},{method:A,url:t,data:(n||{}).data}))}}),HA.forEach(["post","put","patch"],function(A){function t(n){return function(r,a,o){return this.request(PG(o||{},{method:A,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:a}))}}TG.prototype[A]=t(),TG.prototype[A+"Form"]=t(!0)});let YwA=class UK{constructor(A){if(typeof A!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(r){t=r});const n=this;this.promise.then(s=>{if(!n._listeners)return;let r=n._listeners.length;for(;r-- >0;)n._listeners[r](s);n._listeners=null}),this.promise.then=s=>{let r;const a=new Promise(o=>{n.subscribe(o),r=o}).then(s);return a.cancel=function(){n.unsubscribe(r)},a},A(function(r,a,o){n.reason||(n.reason=new $b(r,a,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(A){if(this.reason){A(this.reason);return}this._listeners?this._listeners.push(A):this._listeners=[A]}unsubscribe(A){if(!this._listeners)return;const t=this._listeners.indexOf(A);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const A=new AbortController,t=n=>{A.abort(n)};return this.subscribe(t),A.signal.unsubscribe=()=>this.unsubscribe(t),A.signal}static source(){let A;return{token:new UK(function(s){A=s}),cancel:A}}};function ZwA(e){return function(t){return e.apply(null,t)}}function kwA(e){return HA.isObject(e)&&e.isAxiosError===!0}const lZ={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(lZ).forEach(([e,A])=>{lZ[A]=e});function $1(e){const A=new TG(e),t=h1(TG.prototype.request,A);return HA.extend(t,TG.prototype,A,{allOwnKeys:!0}),HA.extend(t,A,null,{allOwnKeys:!0}),t.create=function(s){return $1(PG(e,s))},t}const fs=$1(_b);fs.Axios=TG,fs.CanceledError=$b,fs.CancelToken=YwA,fs.isCancel=M1,fs.VERSION=_1,fs.toFormData=xH,fs.AxiosError=ye,fs.Cancel=fs.CanceledError,fs.all=function(A){return Promise.all(A)},fs.spread=ZwA,fs.isAxiosError=kwA,fs.mergeConfig=PG,fs.AxiosHeaders=ja,fs.formToJSON=e=>D1(HA.isHTMLForm(e)?new FormData(e):e),fs.getAdapter=K1.getAdapter,fs.HttpStatusCode=lZ,fs.default=fs;const{Axios:YPA,AxiosError:ZPA,CanceledError:kPA,isCancel:UPA,CancelToken:DPA,VERSION:FPA,all:MPA,Cancel:xPA,isAxiosError:AV,spread:PPA,toFormData:TPA,AxiosHeaders:RPA,HttpStatusCode:SPA,formToJSON:VPA,getAdapter:WPA,mergeConfig:NPA}=fs,UwA="https://46735cdcba6c9e360dc10987b2be144d@o4507919735324672.ingest.us.sentry.io/4511274341367808",DwA=["localhost",/^\//],FwA=["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications."],MwA=new Set([400,403]);function RG(e){return!e||typeof e!="object"?e:Array.isArray(e)?e.map(RG):Object.fromEntries(Object.entries(e).map(([A,t])=>/(authorization|cookie|token|api[-_]?key|x-org-id|x-api-key)/i.test(A)?[A,"[redacted]"]:[A,RG(t)]))}function xwA(){rhA({dsn:UwA,environment:"production",release:"2.2.7-ela",sendDefaultPii:!1,initialScope:{tags:{"app.name":"@careshiphealth/widget","app.surface":"widget"}},integrations:[AhA({traceFetch:!1,traceXHR:!1}),UfA({maskAllText:!0,blockAllMedia:!0,networkDetailAllowUrls:[CI]})],tracesSampleRate:.2,tracePropagationTargets:DwA,replaysSessionSampleRate:.05,replaysOnErrorSampleRate:1,ignoreErrors:FwA,beforeSend(e,A){const t=A?.originalException,n=t?.response?.status??t?.status;return n&&n<500&&!MwA.has(n)?null:(e.request&&(e.request=RG(e.request)),e.extra&&(e.extra=RG(e.extra)),e)}})}function PwA(e){e.orgId&&UG("org.id",e.orgId),e.containerId&&UG("widget.container_id",e.containerId),e.host&&UG("widget.host",e.host),W9("widget_init",RG(e))}function TwA(e){UG("org.id",e.id),e.name&&UG("org.name",e.name),e.color&&UG("org.color",e.color)}function RwA(e){UG("widget.route",e),Ll({category:"navigation",type:"navigation",level:"info",message:e})}function eV(e,A){hb(t=>{A&&t.setExtras(RG(A)),V9(e)})}function tV(e,A,t="error"){hb(n=>{n.setLevel(t),A&&n.setExtras(RG(A)),NoA(e)})}const _a=fs.create({baseURL:`${CI}/ela-external`,headers:{"Content-Type":"application/json"}});_a.interceptors.request.use(e=>{const A=Bd("psid");A&&(e.headers.Authorization=`Bearer ${A}`);const t=Bd("wak");t&&(e.headers["x-api-key"]=t);const n=Bd("woid");return n&&(e.headers["x-org-id"]=n),e.headers["x-user-context"]="lead",e}),_a.interceptors.response.use(e=>e,e=>{const A=e.response?.status;return A==401&&g9("psid"),(!e.response||A===400||A===403||A>=500)&&eV(e,{area:"api",baseURL:e.config?.baseURL,url:e.config?.url,method:e.config?.method,status:A}),Promise.reject(e)});const SwA=async()=>_a.get("/info"),VwA=async e=>_a.post("/meet-and-greet/schedule",e),WwA=async e=>_a.post("/appointment/book",e),NwA=async e=>_a.post("/subscribe",{...e,mode:"widget"}),zwA=async()=>_a.get("/xi-signed-url"),LwA=async e=>_a.post("/request-call-back",e),XwA=async e=>_a.post("/verify-call-back-otp",e),OwA=async e=>_a.post("/resend-call-back-otp",e);var iw=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},JwA=class extends iw{#A;#e;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const A=()=>e();return window.addEventListener("visibilitychange",A,!1),()=>{window.removeEventListener("visibilitychange",A)}}}}onSubscribe(){this.#e||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#t=e,this.#e?.(),this.#e=e(A=>{typeof A=="boolean"?this.setFocused(A):this.onFocus()})}setFocused(e){this.#A!==e&&(this.#A=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(A=>{A(e)})}isFocused(){return typeof this.#A=="boolean"?this.#A:globalThis.document?.visibilityState!=="hidden"}},gZ=new JwA,KwA={setTimeout:(e,A)=>setTimeout(e,A),clearTimeout:e=>clearTimeout(e),setInterval:(e,A)=>setInterval(e,A),clearInterval:e=>clearInterval(e)},jwA=class{#A=KwA;#e=!1;setTimeoutProvider(e){this.#A=e}setTimeout(e,A){return this.#A.setTimeout(e,A)}clearTimeout(e){this.#A.clearTimeout(e)}setInterval(e,A){return this.#A.setInterval(e,A)}clearInterval(e){this.#A.clearInterval(e)}},SG=new jwA;function _wA(e){setTimeout(e,0)}var qwA=typeof window>"u"||"Deno"in globalThis;function fa(){}function $wA(e,A){return typeof e=="function"?e(A):e}function dZ(e){return typeof e=="number"&&e>=0&&e!==1/0}function nV(e,A){return Math.max(e+(A||0)-Date.now(),0)}function pd(e,A){return typeof e=="function"?e(A):e}function bo(e,A){return typeof e=="function"?e(A):e}function sV(e,A){const{type:t="all",exact:n,fetchStatus:s,predicate:r,queryKey:a,stale:o}=e;if(a){if(n){if(A.queryHash!==uZ(a,A.options))return!1}else if(!AC(A.queryKey,a))return!1}if(t!=="all"){const c=A.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof o=="boolean"&&A.isStale()!==o||s&&s!==A.state.fetchStatus||r&&!r(A))}function rV(e,A){const{exact:t,status:n,predicate:s,mutationKey:r}=e;if(r){if(!A.options.mutationKey)return!1;if(t){if(VG(A.options.mutationKey)!==VG(r))return!1}else if(!AC(A.options.mutationKey,r))return!1}return!(n&&A.state.status!==n||s&&!s(A))}function uZ(e,A){return(A?.queryKeyHashFn||VG)(e)}function VG(e){return JSON.stringify(e,(A,t)=>GZ(t)?Object.keys(t).sort().reduce((n,s)=>(n[s]=t[s],n),{}):t)}function AC(e,A){return e===A?!0:typeof e!=typeof A?!1:e&&A&&typeof e=="object"&&typeof A=="object"?Object.keys(A).every(t=>AC(e[t],A[t])):!1}var AQA=Object.prototype.hasOwnProperty;function aV(e,A,t=0){if(e===A)return e;if(t>500)return A;const n=iV(e)&&iV(A);if(!n&&!(GZ(e)&&GZ(A)))return A;const r=(n?e:Object.keys(e)).length,a=n?A:Object.keys(A),o=a.length,c=n?new Array(o):{};let l=0;for(let g=0;g<o;g++){const u=n?g:a[g],f=e[u],w=A[u];if(f===w){c[u]=f,(n?g<r:AQA.call(e,u))&&l++;continue}if(f===null||w===null||typeof f!="object"||typeof w!="object"){c[u]=w;continue}const v=aV(f,w,t+1);c[u]=v,v===f&&l++}return r===o&&l===r?e:c}function WH(e,A){if(!A||Object.keys(e).length!==Object.keys(A).length)return!1;for(const t in e)if(e[t]!==A[t])return!1;return!0}function iV(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function GZ(e){if(!oV(e))return!1;const A=e.constructor;if(A===void 0)return!0;const t=A.prototype;return!(!oV(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function oV(e){return Object.prototype.toString.call(e)==="[object Object]"}function eQA(e){return new Promise(A=>{SG.setTimeout(A,e)})}function fZ(e,A,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,A):t.structuralSharing!==!1?aV(e,A):A}function tQA(e,A,t=0){const n=[...e,A];return t&&n.length>t?n.slice(1):n}function nQA(e,A,t=0){const n=[A,...e];return t&&n.length>t?n.slice(0,-1):n}var hZ=Symbol();function BV(e,A){return!e.queryFn&&A?.initialPromise?()=>A.initialPromise:!e.queryFn||e.queryFn===hZ?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function wZ(e,A){return typeof e=="function"?e(...A):!!e}function sQA(e,A,t){let n=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=A(),n||(n=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}var eC=(()=>{let e=()=>qwA;return{isServer(){return e()},setIsServer(A){e=A}}})();function QZ(){let e,A;const t=new Promise((s,r)=>{e=s,A=r});t.status="pending",t.catch(()=>{});function n(s){Object.assign(t,s),delete t.resolve,delete t.reject}return t.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},t.reject=s=>{n({status:"rejected",reason:s}),A(s)},t}var rQA=_wA;function aQA(){let e=[],A=0,t=o=>{o()},n=o=>{o()},s=rQA;const r=o=>{A?e.push(o):s(()=>{t(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{n(()=>{o.forEach(c=>{t(c)})})})};return{batch:o=>{let c;A++;try{c=o()}finally{A--,A||a()}return c},batchCalls:o=>(...c)=>{r(()=>{o(...c)})},schedule:r,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{s=o}}}var er=aQA(),iQA=class extends iw{#A=!0;#e;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const A=()=>e(!0),t=()=>e(!1);return window.addEventListener("online",A,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",A),window.removeEventListener("offline",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#t=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#A!==e&&(this.#A=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#A}},NH=new iQA;function oQA(e){return Math.min(1e3*2**e,3e4)}function cV(e){return(e??"online")==="online"?NH.isOnline():!0}var bZ=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function lV(e){let A=!1,t=0,n;const s=QZ(),r=()=>s.status!=="pending",a=H=>{if(!r()){const E=new bZ(H);f(E),e.onCancel?.(E)}},o=()=>{A=!0},c=()=>{A=!1},l=()=>gZ.isFocused()&&(e.networkMode==="always"||NH.isOnline())&&e.canRun(),g=()=>cV(e.networkMode)&&e.canRun(),u=H=>{r()||(n?.(),s.resolve(H))},f=H=>{r()||(n?.(),s.reject(H))},w=()=>new Promise(H=>{n=E=>{(r()||l())&&H(E)},e.onPause?.()}).then(()=>{n=void 0,r()||e.onContinue?.()}),v=()=>{if(r())return;let H;const E=t===0?e.initialPromise:void 0;try{H=E??e.fn()}catch(Z){H=Promise.reject(Z)}Promise.resolve(H).then(u).catch(Z=>{if(r())return;const M=e.retry??(eC.isServer()?0:3),S=e.retryDelay??oQA,x=typeof S=="function"?S(t,Z):S,D=M===!0||typeof M=="number"&&t<M||typeof M=="function"&&M(t,Z);if(A||!D){f(Z);return}t++,e.onFail?.(t,Z),eQA(x).then(()=>l()?void 0:w()).then(()=>{A?f(Z):v()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(n?.(),s),cancelRetry:o,continueRetry:c,canStart:g,start:()=>(g()?v():w().then(v),s)}}var gV=class{#A;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dZ(this.gcTime)&&(this.#A=SG.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(eC.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#A&&(SG.clearTimeout(this.#A),this.#A=void 0)}},BQA=class extends gV{#A;#e;#t;#s;#n;#r;#a;constructor(e){super(),this.#a=!1,this.#r=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#t=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#A=GV(this.options),this.state=e.state??this.#A,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){if(this.options={...this.#r,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const A=GV(this.options);A.data!==void 0&&(this.setState(uV(A.data,A.dataUpdatedAt)),this.#A=A)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,A){const t=fZ(this.state.data,e,this.options);return this.#o({data:t,type:"success",dataUpdatedAt:A?.updatedAt,manual:A?.manual}),t}setState(e,A){this.#o({type:"setState",state:e,setStateOptions:A})}cancel(e){const A=this.#n?.promise;return this.#n?.cancel(e),A?A.then(fa).catch(fa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#A}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>bo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===hZ||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>pd(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!nV(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(A=>A.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(A=>A.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(A=>A!==e),this.observers.length||(this.#n&&(this.#a||this.#i()?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#i(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,A){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&A?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const o=this.observers.find(c=>c.options.queryFn);o&&this.setOptions(o.options)}const t=new AbortController,n=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#a=!0,t.signal)})},s=()=>{const o=BV(this.options,A),l=(()=>{const g={client:this.#s,queryKey:this.queryKey,meta:this.meta};return n(g),g})();return this.#a=!1,this.options.persister?this.options.persister(o,l,this):o(l)},a=(()=>{const o={fetchOptions:A,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:s};return n(o),o})();this.options.behavior?.onFetch(a,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#o({type:"fetch",meta:a.fetchOptions?.meta}),this.#n=lV({initialPromise:A?.initialPromise,fn:a.fetchFn,onCancel:o=>{o instanceof bZ&&o.revert&&this.setState({...this.#e,fetchStatus:"idle"}),t.abort()},onFail:(o,c)=>{this.#o({type:"failed",failureCount:o,error:c})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const o=await this.#n.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#t.config.onSuccess?.(o,this),this.#t.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof bZ){if(o.silent)return this.#n.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#o({type:"error",error:o}),this.#t.config.onError?.(o,this),this.#t.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#o(e){const A=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...dV(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...uV(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?n:void 0,n;case"error":const s=e.error;return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=A(this.state),er.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function dV(e,A){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:cV(A.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function uV(e,A){return{data:e,dataUpdatedAt:A??Date.now(),error:null,isInvalidated:!1,status:"success"}}function GV(e){const A=typeof e.initialData=="function"?e.initialData():e.initialData,t=A!==void 0,n=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:A,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var fV=class extends iw{constructor(e,A){super(),this.options=A,this.#A=e,this.#i=null,this.#a=QZ(),this.bindMethods(),this.setOptions(A)}#A;#e=void 0;#t=void 0;#s=void 0;#n;#r;#a;#i;#o;#d;#u;#c;#l;#B;#G=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),hV(this.#e,this.options)?this.#g():this.updateResult(),this.#Q())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return CZ(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return CZ(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#C(),this.#e.removeObserver(this)}setOptions(e){const A=this.options,t=this.#e;if(this.options=this.#A.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bo(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#e.setOptions(this.options),A._defaulted&&!WH(this.options,A)&&this.#A.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&wV(this.#e,t,this.options,A)&&this.#g(),this.updateResult(),n&&(this.#e!==t||bo(this.options.enabled,this.#e)!==bo(A.enabled,this.#e)||pd(this.options.staleTime,this.#e)!==pd(A.staleTime,this.#e))&&this.#f();const s=this.#h();n&&(this.#e!==t||bo(this.options.enabled,this.#e)!==bo(A.enabled,this.#e)||s!==this.#B)&&this.#w(s)}getOptimisticResult(e){const A=this.#A.getQueryCache().build(this.#A,e),t=this.createResult(A,e);return lQA(this,t)&&(this.#s=t,this.#r=this.options,this.#n=this.#e.state),t}getCurrentResult(){return this.#s}trackResult(e,A){return new Proxy(e,{get:(t,n)=>(this.trackProp(n),A?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(t,n))})}trackProp(e){this.#G.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const A=this.#A.defaultQueryOptions(e),t=this.#A.getQueryCache().build(this.#A,A);return t.fetch().then(()=>this.createResult(t,A))}fetch(e){return this.#g({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#g(e){this.#v();let A=this.#e.fetch(this.options,e);return e?.throwOnError||(A=A.catch(fa)),A}#f(){this.#b();const e=pd(this.options.staleTime,this.#e);if(eC.isServer()||this.#s.isStale||!dZ(e))return;const t=nV(this.#s.dataUpdatedAt,e)+1;this.#c=SG.setTimeout(()=>{this.#s.isStale||this.updateResult()},t)}#h(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#w(e){this.#C(),this.#B=e,!(eC.isServer()||bo(this.options.enabled,this.#e)===!1||!dZ(this.#B)||this.#B===0)&&(this.#l=SG.setInterval(()=>{(this.options.refetchIntervalInBackground||gZ.isFocused())&&this.#g()},this.#B))}#Q(){this.#f(),this.#w(this.#h())}#b(){this.#c&&(SG.clearTimeout(this.#c),this.#c=void 0)}#C(){this.#l&&(SG.clearInterval(this.#l),this.#l=void 0)}createResult(e,A){const t=this.#e,n=this.options,s=this.#s,r=this.#n,a=this.#r,c=e!==t?e.state:this.#t,{state:l}=e;let g={...l},u=!1,f;if(A._optimisticResults){const z=this.hasListeners(),eA=!z&&hV(e,A),$=z&&wV(e,t,A,n);(eA||$)&&(g={...g,...dV(l.data,e.options)}),A._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:w,errorUpdatedAt:v,status:H}=g;f=g.data;let E=!1;if(A.placeholderData!==void 0&&f===void 0&&H==="pending"){let z;s?.isPlaceholderData&&A.placeholderData===a?.placeholderData?(z=s.data,E=!0):z=typeof A.placeholderData=="function"?A.placeholderData(this.#u?.state.data,this.#u):A.placeholderData,z!==void 0&&(H="success",f=fZ(s?.data,z,A),u=!0)}if(A.select&&f!==void 0&&!E)if(s&&f===r?.data&&A.select===this.#o)f=this.#d;else try{this.#o=A.select,f=A.select(f),f=fZ(s?.data,f,A),this.#d=f,this.#i=null}catch(z){this.#i=z}this.#i&&(w=this.#i,f=this.#d,v=Date.now(),H="error");const Z=g.fetchStatus==="fetching",M=H==="pending",S=H==="error",x=M&&Z,D=f!==void 0,W={status:H,fetchStatus:g.fetchStatus,isPending:M,isSuccess:H==="success",isError:S,isInitialLoading:x,isLoading:x,data:f,dataUpdatedAt:g.dataUpdatedAt,error:w,errorUpdatedAt:v,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>c.dataUpdateCount||g.errorUpdateCount>c.errorUpdateCount,isFetching:Z,isRefetching:Z&&!M,isLoadingError:S&&!D,isPaused:g.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:S&&D,isStale:vZ(e,A),refetch:this.refetch,promise:this.#a,isEnabled:bo(A.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const z=W.data!==void 0,eA=W.status==="error"&&!z,$=hA=>{eA?hA.reject(W.error):z&&hA.resolve(W.data)},rA=()=>{const hA=this.#a=W.promise=QZ();$(hA)},iA=this.#a;switch(iA.status){case"pending":e.queryHash===t.queryHash&&$(iA);break;case"fulfilled":(eA||W.data!==iA.value)&&rA();break;case"rejected":(!eA||W.error!==iA.reason)&&rA();break}}return W}updateResult(){const e=this.#s,A=this.createResult(this.#e,this.options);if(this.#n=this.#e.state,this.#r=this.options,this.#n.data!==void 0&&(this.#u=this.#e),WH(A,e))return;this.#s=A;const t=()=>{if(!e)return!0;const{notifyOnChangeProps:n}=this.options,s=typeof n=="function"?n():n;if(s==="all"||!s&&!this.#G.size)return!0;const r=new Set(s??this.#G);return this.options.throwOnError&&r.add("error"),Object.keys(this.#s).some(a=>{const o=a;return this.#s[o]!==e[o]&&r.has(o)})};this.#I({listeners:t()})}#v(){const e=this.#A.getQueryCache().build(this.#A,this.options);if(e===this.#e)return;const A=this.#e;this.#e=e,this.#t=e.state,this.hasListeners()&&(A?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#Q()}#I(e){er.batch(()=>{e.listeners&&this.listeners.forEach(A=>{A(this.#s)}),this.#A.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function cQA(e,A){return bo(A.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&A.retryOnMount===!1)}function hV(e,A){return cQA(e,A)||e.state.data!==void 0&&CZ(e,A,A.refetchOnMount)}function CZ(e,A,t){if(bo(A.enabled,e)!==!1&&pd(A.staleTime,e)!=="static"){const n=typeof t=="function"?t(e):t;return n==="always"||n!==!1&&vZ(e,A)}return!1}function wV(e,A,t,n){return(e!==A||bo(n.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&vZ(e,t)}function vZ(e,A){return bo(A.enabled,e)!==!1&&e.isStaleByTime(pd(A.staleTime,e))}function lQA(e,A){return!WH(e.getCurrentResult(),A)}function zH(e){return{onFetch:(A,t)=>{const n=A.options,s=A.fetchOptions?.meta?.fetchMore?.direction,r=A.state.data?.pages||[],a=A.state.data?.pageParams||[];let o={pages:[],pageParams:[]},c=0;const l=async()=>{let g=!1;const u=v=>{sQA(v,()=>A.signal,()=>g=!0)},f=BV(A.options,A.fetchOptions),w=async(v,H,E)=>{if(g)return Promise.reject();if(H==null&&v.pages.length)return Promise.resolve(v);const M=(()=>{const V={client:A.client,queryKey:A.queryKey,pageParam:H,direction:E?"backward":"forward",meta:A.options.meta};return u(V),V})(),S=await f(M),{maxPages:x}=A.options,D=E?nQA:tQA;return{pages:D(v.pages,S,x),pageParams:D(v.pageParams,H,x)}};if(s&&r.length){const v=s==="backward",H=v?QV:IZ,E={pages:r,pageParams:a},Z=H(n,E);o=await w(E,Z,v)}else{const v=e??r.length;do{const H=c===0?a[0]??n.initialPageParam:IZ(n,o);if(c>0&&H==null)break;o=await w(o,H),c++}while(c<v)}return o};A.options.persister?A.fetchFn=()=>A.options.persister?.(l,{client:A.client,queryKey:A.queryKey,meta:A.options.meta,signal:A.signal},t):A.fetchFn=l}}}function IZ(e,{pages:A,pageParams:t}){const n=A.length-1;return A.length>0?e.getNextPageParam(A[n],A,t[n],t):void 0}function QV(e,{pages:A,pageParams:t}){return A.length>0?e.getPreviousPageParam?.(A[0],A,t[0],t):void 0}function gQA(e,A){return A?IZ(e,A)!=null:!1}function dQA(e,A){return!A||!e.getPreviousPageParam?!1:QV(e,A)!=null}var uQA=class extends fV{constructor(e,A){super(e,A)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:zH()})}getOptimisticResult(e){return e.behavior=zH(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,A){const{state:t}=e,n=super.createResult(e,A),{isFetching:s,isRefetching:r,isError:a,isRefetchError:o}=n,c=t.fetchMeta?.fetchMore?.direction,l=a&&c==="forward",g=s&&c==="forward",u=a&&c==="backward",f=s&&c==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:gQA(A,t.data),hasPreviousPage:dQA(A,t.data),isFetchNextPageError:l,isFetchingNextPage:g,isFetchPreviousPageError:u,isFetchingPreviousPage:f,isRefetchError:o&&!l&&!u,isRefetching:r&&!g&&!f}}},GQA=class extends gV{#A;#e;#t;#s;constructor(e){super(),this.#A=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||bV(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(A=>A!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const A=()=>{this.#n({type:"continue"})},t={client:this.#A,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=lV({fn:()=>this.options.mutationFn?this.options.mutationFn(e,t):Promise.reject(new Error("No mutationFn found")),onFail:(r,a)=>{this.#n({type:"failed",failureCount:r,error:a})},onPause:()=>{this.#n({type:"pause"})},onContinue:A,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const n=this.state.status==="pending",s=!this.#s.canStart();try{if(n)A();else{this.#n({type:"pending",variables:e,isPaused:s}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,t);const a=await this.options.onMutate?.(e,t);a!==this.state.context&&this.#n({type:"pending",context:a,variables:e,isPaused:s})}const r=await this.#s.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this,t),await this.options.onSuccess?.(r,e,this.state.context,t),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this,t),await this.options.onSettled?.(r,null,e,this.state.context,t),this.#n({type:"success",data:r}),r}catch(r){try{await this.#t.config.onError?.(r,e,this.state.context,this,t)}catch(a){Promise.reject(a)}try{await this.options.onError?.(r,e,this.state.context,t)}catch(a){Promise.reject(a)}try{await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,t)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,r,e,this.state.context,t)}catch(a){Promise.reject(a)}throw this.#n({type:"error",error:r}),r}finally{this.#t.runNext(this)}}#n(e){const A=t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=A(this.state),er.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function bV(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var fQA=class extends iw{constructor(e={}){super(),this.config=e,this.#A=new Set,this.#e=new Map,this.#t=0}#A;#e;#t;build(e,A,t){const n=new GQA({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(A),state:t});return this.add(n),n}add(e){this.#A.add(e);const A=LH(e);if(typeof A=="string"){const t=this.#e.get(A);t?t.push(e):this.#e.set(A,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#A.delete(e)){const A=LH(e);if(typeof A=="string"){const t=this.#e.get(A);if(t)if(t.length>1){const n=t.indexOf(e);n!==-1&&t.splice(n,1)}else t[0]===e&&this.#e.delete(A)}}this.notify({type:"removed",mutation:e})}canRun(e){const A=LH(e);if(typeof A=="string"){const n=this.#e.get(A)?.find(s=>s.state.status==="pending");return!n||n===e}else return!0}runNext(e){const A=LH(e);return typeof A=="string"?this.#e.get(A)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){er.batch(()=>{this.#A.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#A.clear(),this.#e.clear()})}getAll(){return Array.from(this.#A)}find(e){const A={exact:!0,...e};return this.getAll().find(t=>rV(A,t))}findAll(e={}){return this.getAll().filter(A=>rV(e,A))}notify(e){er.batch(()=>{this.listeners.forEach(A=>{A(e)})})}resumePausedMutations(){const e=this.getAll().filter(A=>A.state.isPaused);return er.batch(()=>Promise.all(e.map(A=>A.continue().catch(fa))))}};function LH(e){return e.options.scope?.id}var hQA=class extends iw{#A;#e=void 0;#t;#s;constructor(A,t){super(),this.#A=A,this.setOptions(t),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(A){const t=this.options;this.options=this.#A.defaultMutationOptions(A),WH(this.options,t)||this.#A.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),t?.mutationKey&&this.options.mutationKey&&VG(t.mutationKey)!==VG(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(A){this.#n(),this.#r(A)}getCurrentResult(){return this.#e}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#n(),this.#r()}mutate(A,t){return this.#s=t,this.#t?.removeObserver(this),this.#t=this.#A.getMutationCache().build(this.#A,this.options),this.#t.addObserver(this),this.#t.execute(A)}#n(){const A=this.#t?.state??bV();this.#e={...A,isPending:A.status==="pending",isSuccess:A.status==="success",isError:A.status==="error",isIdle:A.status==="idle",mutate:this.mutate,reset:this.reset}}#r(A){er.batch(()=>{if(this.#s&&this.hasListeners()){const t=this.#e.variables,n=this.#e.context,s={client:this.#A,meta:this.options.meta,mutationKey:this.options.mutationKey};if(A?.type==="success"){try{this.#s.onSuccess?.(A.data,t,n,s)}catch(r){Promise.reject(r)}try{this.#s.onSettled?.(A.data,null,t,n,s)}catch(r){Promise.reject(r)}}else if(A?.type==="error"){try{this.#s.onError?.(A.error,t,n,s)}catch(r){Promise.reject(r)}try{this.#s.onSettled?.(void 0,A.error,t,n,s)}catch(r){Promise.reject(r)}}}this.listeners.forEach(t=>{t(this.#e)})})}},wQA=class extends iw{constructor(e={}){super(),this.config=e,this.#A=new Map}#A;build(e,A,t){const n=A.queryKey,s=A.queryHash??uZ(n,A);let r=this.get(s);return r||(r=new BQA({client:e,queryKey:n,queryHash:s,options:e.defaultQueryOptions(A),state:t,defaultOptions:e.getQueryDefaults(n)}),this.add(r)),r}add(e){this.#A.has(e.queryHash)||(this.#A.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const A=this.#A.get(e.queryHash);A&&(e.destroy(),A===e&&this.#A.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){er.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#A.get(e)}getAll(){return[...this.#A.values()]}find(e){const A={exact:!0,...e};return this.getAll().find(t=>sV(A,t))}findAll(e={}){const A=this.getAll();return Object.keys(e).length>0?A.filter(t=>sV(e,t)):A}notify(e){er.batch(()=>{this.listeners.forEach(A=>{A(e)})})}onFocus(){er.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){er.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},QQA=class{#A;#e;#t;#s;#n;#r;#a;#i;constructor(e={}){this.#A=e.queryCache||new wQA,this.#e=e.mutationCache||new fQA,this.#t=e.defaultOptions||{},this.#s=new Map,this.#n=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#a=gZ.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#A.onFocus())}),this.#i=NH.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#A.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#A.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const A=this.defaultQueryOptions({queryKey:e});return this.#A.get(A.queryHash)?.state.data}ensureQueryData(e){const A=this.defaultQueryOptions(e),t=this.#A.build(this,A),n=t.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(pd(A.staleTime,t))&&this.prefetchQuery(A),Promise.resolve(n))}getQueriesData(e){return this.#A.findAll(e).map(({queryKey:A,state:t})=>{const n=t.data;return[A,n]})}setQueryData(e,A,t){const n=this.defaultQueryOptions({queryKey:e}),r=this.#A.get(n.queryHash)?.state.data,a=$wA(A,r);if(a!==void 0)return this.#A.build(this,n).setData(a,{...t,manual:!0})}setQueriesData(e,A,t){return er.batch(()=>this.#A.findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,A,t)]))}getQueryState(e){const A=this.defaultQueryOptions({queryKey:e});return this.#A.get(A.queryHash)?.state}removeQueries(e){const A=this.#A;er.batch(()=>{A.findAll(e).forEach(t=>{A.remove(t)})})}resetQueries(e,A){const t=this.#A;return er.batch(()=>(t.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},A)))}cancelQueries(e,A={}){const t={revert:!0,...A},n=er.batch(()=>this.#A.findAll(e).map(s=>s.cancel(t)));return Promise.all(n).then(fa).catch(fa)}invalidateQueries(e,A={}){return er.batch(()=>(this.#A.findAll(e).forEach(t=>{t.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},A)))}refetchQueries(e,A={}){const t={...A,cancelRefetch:A.cancelRefetch??!0},n=er.batch(()=>this.#A.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let r=s.fetch(void 0,t);return t.throwOnError||(r=r.catch(fa)),s.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(n).then(fa)}fetchQuery(e){const A=this.defaultQueryOptions(e);A.retry===void 0&&(A.retry=!1);const t=this.#A.build(this,A);return t.isStaleByTime(pd(A.staleTime,t))?t.fetch(A):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(fa).catch(fa)}fetchInfiniteQuery(e){return e.behavior=zH(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(fa).catch(fa)}ensureInfiniteQueryData(e){return e.behavior=zH(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return NH.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#A}getMutationCache(){return this.#e}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,A){this.#s.set(VG(e),{queryKey:e,defaultOptions:A})}getQueryDefaults(e){const A=[...this.#s.values()],t={};return A.forEach(n=>{AC(e,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(e,A){this.#n.set(VG(e),{mutationKey:e,defaultOptions:A})}getMutationDefaults(e){const A=[...this.#n.values()],t={};return A.forEach(n=>{AC(e,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const A={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return A.queryHash||(A.queryHash=uZ(A.queryKey,A)),A.refetchOnReconnect===void 0&&(A.refetchOnReconnect=A.networkMode!=="always"),A.throwOnError===void 0&&(A.throwOnError=!!A.suspense),!A.networkMode&&A.persister&&(A.networkMode="offlineFirst"),A.queryFn===hZ&&(A.enabled=!1),A}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#A.clear(),this.#e.clear()}},CV=R.createContext(void 0),pZ=e=>{const A=R.useContext(CV);if(!A)throw new Error("No QueryClient set, use QueryClientProvider to set one");return A},bQA=({client:e,children:A})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(CV.Provider,{value:e,children:A})),vV=R.createContext(!1),CQA=()=>R.useContext(vV);vV.Provider;function vQA(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var IQA=R.createContext(vQA()),pQA=()=>R.useContext(IQA),HQA=(e,A,t)=>{const n=t?.state.error&&typeof e.throwOnError=="function"?wZ(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(A.isReset()||(e.retryOnMount=!1))},mQA=e=>{R.useEffect(()=>{e.clearReset()},[e])},EQA=({result:e,errorResetBoundary:A,throwOnError:t,query:n,suspense:s})=>e.isError&&!A.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||wZ(t,[e.error,n])),yQA=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>t(n(...s)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},YQA=(e,A)=>e.isLoading&&e.isFetching&&!A,ZQA=(e,A)=>e?.suspense&&A.isPending,IV=(e,A,t)=>A.fetchOptimistic(e).catch(()=>{t.clearReset()});function pV(e,A,t){const n=CQA(),s=pQA(),r=pZ(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const o=r.getQueryCache().get(a.queryHash);a._optimisticResults=n?"isRestoring":"optimistic",yQA(a),HQA(a,s,o),mQA(s);const c=!r.getQueryCache().get(a.queryHash),[l]=R.useState(()=>new A(r,a)),g=l.getOptimisticResult(a),u=!n&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(f=>{const w=u?l.subscribe(er.batchCalls(f)):fa;return l.updateResult(),w},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),R.useEffect(()=>{l.setOptions(a)},[a,l]),ZQA(a,g))throw IV(a,l,s);if(EQA({result:g,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw g.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,g),a.experimental_prefetchInRender&&!eC.isServer()&&YQA(g,n)&&(c?IV(a,l,s):o?.promise)?.catch(fa).finally(()=>{l.updateResult()}),a.notifyOnChangeProps?g:l.trackResult(g)}function HZ(e,A){return pV(e,fV)}function WG(e,A){const t=pZ(),[n]=R.useState(()=>new hQA(t,e));R.useEffect(()=>{n.setOptions(e)},[n,e]);const s=R.useSyncExternalStore(R.useCallback(a=>n.subscribe(er.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),r=R.useCallback((a,o)=>{n.mutate(a,o).catch(fa)},[n]);if(s.error&&wZ(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:r,mutateAsync:s.mutate}}function kQA(e,A){return pV(e,uQA)}function UQA(e,A){return A.forEach(function(t){t&&typeof t!="string"&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!=="default"&&!(n in e)){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var DQA=Object.defineProperty,FQA=(e,A,t)=>A in e?DQA(e,A,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[A]=t,HV=(e,A,t)=>FQA(e,typeof A!="symbol"?A+"":A,t);let ha=class{constructor(){HV(this,"_locking"),HV(this,"_locks"),this._locking=Promise.resolve(),this._locks=0}isLocked(){return this._locks>0}lock(){this._locks+=1;let A;const t=new Promise(s=>A=()=>{this._locks-=1,s()}),n=this._locking.then(()=>A);return this._locking=this._locking.then(()=>t),n}};function ns(e,A){if(!e)throw new Error(A)}const MQA=34028234663852886e22,xQA=-34028234663852886e22,PQA=4294967295,TQA=2147483647,RQA=-2147483648;function XH(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>TQA||e<RQA)throw new Error("invalid int 32: "+e)}function mZ(e){if(typeof e!="number")throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>PQA||e<0)throw new Error("invalid uint 32: "+e)}function mV(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>MQA||e<xQA))throw new Error("invalid float 32: "+e)}const EV=Symbol("@bufbuild/protobuf/enum-type");function SQA(e){const A=e[EV];return ns(A,"missing enum type on enum object"),A}function yV(e,A,t,n){e[EV]=YV(A,t.map(s=>({no:s.no,name:s.name,localName:e[s.no]})))}function YV(e,A,t){const n=Object.create(null),s=Object.create(null),r=[];for(const a of A){const o=ZV(a);r.push(o),n[a.name]=o,s[a.no]=o}return{typeName:e,values:r,findName(a){return n[a]},findNumber(a){return s[a]}}}function VQA(e,A,t){const n={};for(const s of A){const r=ZV(s);n[r.localName]=r.no,n[r.no]=r.localName}return yV(n,e,A),n}function ZV(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}class EZ{equals(A){return this.getType().runtime.util.equals(this.getType(),this,A)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(A,t){const n=this.getType(),s=n.runtime.bin,r=s.makeReadOptions(t);return s.readMessage(this,r.readerFactory(A),A.byteLength,r),this}fromJson(A,t){const n=this.getType(),s=n.runtime.json,r=s.makeReadOptions(t);return s.readMessage(n,A,r,this),this}fromJsonString(A,t){let n;try{n=JSON.parse(A)}catch(s){throw new Error("cannot decode ".concat(this.getType().typeName," from JSON: ").concat(s instanceof Error?s.message:String(s)))}return this.fromJson(n,t)}toBinary(A){const t=this.getType(),n=t.runtime.bin,s=n.makeWriteOptions(A),r=s.writerFactory();return n.writeMessage(this,r,s),r.finish()}toJson(A){const t=this.getType(),n=t.runtime.json,s=n.makeWriteOptions(A);return n.writeMessage(this,s)}toJsonString(A){var t;const n=this.toJson(A);return JSON.stringify(n,null,(t=A?.prettySpaces)!==null&&t!==void 0?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function WQA(e,A,t,n){var s;const r=(s=n?.localName)!==null&&s!==void 0?s:A.substring(A.lastIndexOf(".")+1),a={[r]:function(o){e.util.initFields(this),e.util.initPartial(o,this)}}[r];return Object.setPrototypeOf(a.prototype,new EZ),Object.assign(a,{runtime:e,typeName:A,fields:e.util.newFieldList(t),fromBinary(o,c){return new a().fromBinary(o,c)},fromJson(o,c){return new a().fromJson(o,c)},fromJsonString(o,c){return new a().fromJsonString(o,c)},equals(o,c){return e.util.equals(a,o,c)}}),a}function NQA(){let e=0,A=0;for(let n=0;n<28;n+=7){let s=this.buf[this.pos++];if(e|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[e,A]}let t=this.buf[this.pos++];if(e|=(t&15)<<28,A=(t&112)>>4,(t&128)==0)return this.assertBounds(),[e,A];for(let n=3;n<=31;n+=7){let s=this.buf[this.pos++];if(A|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[e,A]}throw new Error("invalid varint")}function yZ(e,A,t){for(let r=0;r<28;r=r+7){const a=e>>>r,o=!(!(a>>>7)&&A==0),c=(o?a|128:a)&255;if(t.push(c),!o)return}const n=e>>>28&15|(A&7)<<4,s=A>>3!=0;if(t.push((s?n|128:n)&255),!!s){for(let r=3;r<31;r=r+7){const a=A>>>r,o=!!(a>>>7),c=(o?a|128:a)&255;if(t.push(c),!o)return}t.push(A>>>31&1)}}const OH=4294967296;function kV(e){const A=e[0]==="-";A&&(e=e.slice(1));const t=1e6;let n=0,s=0;function r(a,o){const c=Number(e.slice(a,o));s*=t,n=n*t+c,n>=OH&&(s=s+(n/OH|0),n=n%OH)}return r(-24,-18),r(-18,-12),r(-12,-6),r(-6),A?DV(n,s):YZ(n,s)}function zQA(e,A){let t=YZ(e,A);const n=t.hi&2147483648;n&&(t=DV(t.lo,t.hi));const s=UV(t.lo,t.hi);return n?"-"+s:s}function UV(e,A){if({lo:e,hi:A}=LQA(e,A),A<=2097151)return String(OH*A+e);const t=e&16777215,n=(e>>>24|A<<8)&16777215,s=A>>16&65535;let r=t+n*6777216+s*6710656,a=n+s*8147497,o=s*2;const c=1e7;return r>=c&&(a+=Math.floor(r/c),r%=c),a>=c&&(o+=Math.floor(a/c),a%=c),o.toString()+FV(a)+FV(r)}function LQA(e,A){return{lo:e>>>0,hi:A>>>0}}function YZ(e,A){return{lo:e|0,hi:A|0}}function DV(e,A){return A=~A,e?e=~e+1:A+=1,YZ(e,A)}const FV=e=>{const A=String(e);return"0000000".slice(A.length)+A};function MV(e,A){if(e>=0){for(;e>127;)A.push(e&127|128),e=e>>>7;A.push(e)}else{for(let t=0;t<9;t++)A.push(e&127|128),e=e>>7;A.push(1)}}function XQA(){let e=this.buf[this.pos++],A=e&127;if((e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<7,(e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<14,(e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<21,(e&128)==0)return this.assertBounds(),A;e=this.buf[this.pos++],A|=(e&15)<<28;for(let t=5;(e&128)!==0&&t<10;t++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),A>>>0}function OQA(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const s=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),a=BigInt("0"),o=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(c){const l=typeof c=="bigint"?c:BigInt(c);if(l>r||l<s)throw new Error("int64 invalid: ".concat(c));return l},uParse(c){const l=typeof c=="bigint"?c:BigInt(c);if(l>o||l<a)throw new Error("uint64 invalid: ".concat(c));return l},enc(c){return e.setBigInt64(0,this.parse(c),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(c){return e.setBigInt64(0,this.uParse(c),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(c,l){return e.setInt32(0,c,!0),e.setInt32(4,l,!0),e.getBigInt64(0,!0)},uDec(c,l){return e.setInt32(0,c,!0),e.setInt32(4,l,!0),e.getBigUint64(0,!0)}}}const t=s=>ns(/^-?[0-9]+$/.test(s),"int64 invalid: ".concat(s)),n=s=>ns(/^[0-9]+$/.test(s),"uint64 invalid: ".concat(s));return{zero:"0",supported:!1,parse(s){return typeof s!="string"&&(s=s.toString()),t(s),s},uParse(s){return typeof s!="string"&&(s=s.toString()),n(s),s},enc(s){return typeof s!="string"&&(s=s.toString()),t(s),kV(s)},uEnc(s){return typeof s!="string"&&(s=s.toString()),n(s),kV(s)},dec(s,r){return zQA(s,r)},uDec(s,r){return UV(s,r)}}}const Tn=OQA();var RA;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(RA||(RA={}));var Hd;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(Hd||(Hd={}));function md(e,A,t){if(A===t)return!0;if(e==RA.BYTES){if(!(A instanceof Uint8Array)||!(t instanceof Uint8Array)||A.length!==t.length)return!1;for(let n=0;n<A.length;n++)if(A[n]!==t[n])return!1;return!0}switch(e){case RA.UINT64:case RA.FIXED64:case RA.INT64:case RA.SFIXED64:case RA.SINT64:return A==t}return!1}function ow(e,A){switch(e){case RA.BOOL:return!1;case RA.UINT64:case RA.FIXED64:case RA.INT64:case RA.SFIXED64:case RA.SINT64:return A==0?Tn.zero:"0";case RA.DOUBLE:case RA.FLOAT:return 0;case RA.BYTES:return new Uint8Array(0);case RA.STRING:return"";default:return 0}}function xV(e,A){switch(e){case RA.BOOL:return A===!1;case RA.STRING:return A==="";case RA.BYTES:return A instanceof Uint8Array&&!A.byteLength;default:return A==0}}var hs;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(hs||(hs={}));class JQA{constructor(A){this.stack=[],this.textEncoder=A??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let A=0;for(let s=0;s<this.chunks.length;s++)A+=this.chunks[s].length;let t=new Uint8Array(A),n=0;for(let s=0;s<this.chunks.length;s++)t.set(this.chunks[s],n),n+=this.chunks[s].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let A=this.finish(),t=this.stack.pop();if(!t)throw new Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(A.byteLength),this.raw(A)}tag(A,t){return this.uint32((A<<3|t)>>>0)}raw(A){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(A),this}uint32(A){for(mZ(A);A>127;)this.buf.push(A&127|128),A=A>>>7;return this.buf.push(A),this}int32(A){return XH(A),MV(A,this.buf),this}bool(A){return this.buf.push(A?1:0),this}bytes(A){return this.uint32(A.byteLength),this.raw(A)}string(A){let t=this.textEncoder.encode(A);return this.uint32(t.byteLength),this.raw(t)}float(A){mV(A);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,A,!0),this.raw(t)}double(A){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,A,!0),this.raw(t)}fixed32(A){mZ(A);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,A,!0),this.raw(t)}sfixed32(A){XH(A);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,A,!0),this.raw(t)}sint32(A){return XH(A),A=(A<<1^A>>31)>>>0,MV(A,this.buf),this}sfixed64(A){let t=new Uint8Array(8),n=new DataView(t.buffer),s=Tn.enc(A);return n.setInt32(0,s.lo,!0),n.setInt32(4,s.hi,!0),this.raw(t)}fixed64(A){let t=new Uint8Array(8),n=new DataView(t.buffer),s=Tn.uEnc(A);return n.setInt32(0,s.lo,!0),n.setInt32(4,s.hi,!0),this.raw(t)}int64(A){let t=Tn.enc(A);return yZ(t.lo,t.hi,this.buf),this}sint64(A){let t=Tn.enc(A),n=t.hi>>31,s=t.lo<<1^n,r=(t.hi<<1|t.lo>>>31)^n;return yZ(s,r,this.buf),this}uint64(A){let t=Tn.uEnc(A);return yZ(t.lo,t.hi,this.buf),this}}class KQA{constructor(A,t){this.varint64=NQA,this.uint32=XQA,this.buf=A,this.len=A.length,this.pos=0,this.view=new DataView(A.buffer,A.byteOffset,A.byteLength),this.textDecoder=t??new TextDecoder}tag(){let A=this.uint32(),t=A>>>3,n=A&7;if(t<=0||n<0||n>5)throw new Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(A,t){let n=this.pos;switch(A){case hs.Varint:for(;this.buf[this.pos++]&128;);break;case hs.Bit64:this.pos+=4;case hs.Bit32:this.pos+=4;break;case hs.LengthDelimited:let s=this.uint32();this.pos+=s;break;case hs.StartGroup:for(;;){const[r,a]=this.tag();if(a===hs.EndGroup){if(t!==void 0&&r!==t)throw new Error("invalid end group tag");break}this.skip(a,r)}break;default:throw new Error("cant skip wire type "+A)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let A=this.uint32();return A>>>1^-(A&1)}int64(){return Tn.dec(...this.varint64())}uint64(){return Tn.uDec(...this.varint64())}sint64(){let[A,t]=this.varint64(),n=-(A&1);return A=(A>>>1|(t&1)<<31)^n,t=t>>>1^n,Tn.dec(A,t)}bool(){let[A,t]=this.varint64();return A!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Tn.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Tn.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let A=this.uint32(),t=this.pos;return this.pos+=A,this.assertBounds(),this.buf.subarray(t,t+A)}string(){return this.textDecoder.decode(this.bytes())}}function jQA(e,A,t,n){let s;return{typeName:A,extendee:t,get field(){if(!s){const r=typeof n=="function"?n():n;r.name=A.split(".").pop(),r.jsonName="[".concat(A,"]"),s=e.util.newFieldList([r]).list()[0]}return s},runtime:e}}function PV(e){const A=e.field.localName,t=Object.create(null);return t[A]=_QA(e),[t,()=>t[A]]}function _QA(e){const A=e.field;if(A.repeated)return[];if(A.default!==void 0)return A.default;switch(A.kind){case"enum":return A.T.values[0].no;case"scalar":return ow(A.T,A.L);case"message":const t=A.T,n=new t;return t.fieldWrapper?t.fieldWrapper.unwrapField(n):n;case"map":throw"map fields are not allowed to be extensions"}}function qQA(e,A){if(!A.repeated&&(A.kind=="enum"||A.kind=="scalar")){for(let t=e.length-1;t>=0;--t)if(e[t].no==A.no)return[e[t]];return[]}return e.filter(t=>t.no===A.no)}let Ol="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),JH=[];for(let e=0;e<Ol.length;e++)JH[Ol[e].charCodeAt(0)]=e;JH[45]=Ol.indexOf("+"),JH[95]=Ol.indexOf("/");const TV={dec(e){let A=e.length*3/4;e[e.length-2]=="="?A-=2:e[e.length-1]=="="&&(A-=1);let t=new Uint8Array(A),n=0,s=0,r,a=0;for(let o=0;o<e.length;o++){if(r=JH[e.charCodeAt(o)],r===void 0)switch(e[o]){case"=":s=0;case`
|
|
97
|
+
`+r):n.stack=r}catch{}}throw n}}_request(A,t){typeof A=="string"?(t=t||{},t.url=A):t=A||{},t=PG(this.defaults,t);const{transitional:n,paramsSerializer:s,headers:r}=t;n!==void 0&&VH.assertOptions(n,{silentJSONParsing:Qo.transitional(Qo.boolean),forcedJSONParsing:Qo.transitional(Qo.boolean),clarifyTimeoutError:Qo.transitional(Qo.boolean),legacyInterceptorReqResOrdering:Qo.transitional(Qo.boolean)},!1),s!=null&&(HA.isFunction(s)?t.paramsSerializer={serialize:s}:VH.assertOptions(s,{encode:Qo.function,serialize:Qo.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),VH.assertOptions(t,{baseUrl:Qo.spelling("baseURL"),withXsrfToken:Qo.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=r&&HA.merge(r.common,r[t.method]);r&&HA.forEach(["delete","get","head","post","put","patch","common"],v=>{delete r[v]}),t.headers=ja.concat(a,r);const o=[];let c=!0;this.interceptors.request.forEach(function(H){if(typeof H.runWhen=="function"&&H.runWhen(t)===!1)return;c=c&&H.synchronous;const E=t.transitional||sZ;E&&E.legacyInterceptorReqResOrdering?o.unshift(H.fulfilled,H.rejected):o.push(H.fulfilled,H.rejected)});const l=[];this.interceptors.response.forEach(function(H){l.push(H.fulfilled,H.rejected)});let g,u=0,f;if(!c){const v=[j1.bind(this),void 0];for(v.unshift(...o),v.push(...l),f=v.length,g=Promise.resolve(t);u<f;)g=g.then(v[u++],v[u++]);return g}f=o.length;let w=t;for(;u<f;){const v=o[u++],H=o[u++];try{w=v(w)}catch(E){H.call(this,E);break}}try{g=j1.call(this,w)}catch(v){return Promise.reject(v)}for(u=0,f=l.length;u<f;)g=g.then(l[u++],l[u++]);return g}getUri(A){A=PG(this.defaults,A);const t=R1(A.baseURL,A.url,A.allowAbsoluteUrls);return k1(t,A.params,A.paramsSerializer)}};HA.forEach(["delete","get","head","options"],function(A){TG.prototype[A]=function(t,n){return this.request(PG(n||{},{method:A,url:t,data:(n||{}).data}))}}),HA.forEach(["post","put","patch"],function(A){function t(n){return function(r,a,o){return this.request(PG(o||{},{method:A,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:a}))}}TG.prototype[A]=t(),TG.prototype[A+"Form"]=t(!0)});let YwA=class UK{constructor(A){if(typeof A!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(r){t=r});const n=this;this.promise.then(s=>{if(!n._listeners)return;let r=n._listeners.length;for(;r-- >0;)n._listeners[r](s);n._listeners=null}),this.promise.then=s=>{let r;const a=new Promise(o=>{n.subscribe(o),r=o}).then(s);return a.cancel=function(){n.unsubscribe(r)},a},A(function(r,a,o){n.reason||(n.reason=new $b(r,a,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(A){if(this.reason){A(this.reason);return}this._listeners?this._listeners.push(A):this._listeners=[A]}unsubscribe(A){if(!this._listeners)return;const t=this._listeners.indexOf(A);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const A=new AbortController,t=n=>{A.abort(n)};return this.subscribe(t),A.signal.unsubscribe=()=>this.unsubscribe(t),A.signal}static source(){let A;return{token:new UK(function(s){A=s}),cancel:A}}};function ZwA(e){return function(t){return e.apply(null,t)}}function kwA(e){return HA.isObject(e)&&e.isAxiosError===!0}const lZ={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(lZ).forEach(([e,A])=>{lZ[A]=e});function $1(e){const A=new TG(e),t=h1(TG.prototype.request,A);return HA.extend(t,TG.prototype,A,{allOwnKeys:!0}),HA.extend(t,A,null,{allOwnKeys:!0}),t.create=function(s){return $1(PG(e,s))},t}const fs=$1(_b);fs.Axios=TG,fs.CanceledError=$b,fs.CancelToken=YwA,fs.isCancel=M1,fs.VERSION=_1,fs.toFormData=xH,fs.AxiosError=ye,fs.Cancel=fs.CanceledError,fs.all=function(A){return Promise.all(A)},fs.spread=ZwA,fs.isAxiosError=kwA,fs.mergeConfig=PG,fs.AxiosHeaders=ja,fs.formToJSON=e=>D1(HA.isHTMLForm(e)?new FormData(e):e),fs.getAdapter=K1.getAdapter,fs.HttpStatusCode=lZ,fs.default=fs;const{Axios:YPA,AxiosError:ZPA,CanceledError:kPA,isCancel:UPA,CancelToken:DPA,VERSION:FPA,all:MPA,Cancel:xPA,isAxiosError:AV,spread:PPA,toFormData:TPA,AxiosHeaders:RPA,HttpStatusCode:SPA,formToJSON:VPA,getAdapter:WPA,mergeConfig:NPA}=fs,UwA="https://46735cdcba6c9e360dc10987b2be144d@o4507919735324672.ingest.us.sentry.io/4511274341367808",DwA=["localhost",/^\//],FwA=["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications."],MwA=new Set([400,403]);function RG(e){return!e||typeof e!="object"?e:Array.isArray(e)?e.map(RG):Object.fromEntries(Object.entries(e).map(([A,t])=>/(authorization|cookie|token|api[-_]?key|x-org-id|x-api-key)/i.test(A)?[A,"[redacted]"]:[A,RG(t)]))}function xwA(){rhA({dsn:UwA,environment:"production",release:"2.2.7",sendDefaultPii:!1,initialScope:{tags:{"app.name":"@careshiphealth/widget","app.surface":"widget"}},integrations:[AhA({traceFetch:!1,traceXHR:!1}),UfA({maskAllText:!0,blockAllMedia:!0,networkDetailAllowUrls:[CI]})],tracesSampleRate:.2,tracePropagationTargets:DwA,replaysSessionSampleRate:.05,replaysOnErrorSampleRate:1,ignoreErrors:FwA,beforeSend(e,A){const t=A?.originalException,n=t?.response?.status??t?.status;return n&&n<500&&!MwA.has(n)?null:(e.request&&(e.request=RG(e.request)),e.extra&&(e.extra=RG(e.extra)),e)}})}function PwA(e){e.orgId&&UG("org.id",e.orgId),e.containerId&&UG("widget.container_id",e.containerId),e.host&&UG("widget.host",e.host),W9("widget_init",RG(e))}function TwA(e){UG("org.id",e.id),e.name&&UG("org.name",e.name),e.color&&UG("org.color",e.color)}function RwA(e){UG("widget.route",e),Ll({category:"navigation",type:"navigation",level:"info",message:e})}function eV(e,A){hb(t=>{A&&t.setExtras(RG(A)),V9(e)})}function tV(e,A,t="error"){hb(n=>{n.setLevel(t),A&&n.setExtras(RG(A)),NoA(e)})}const _a=fs.create({baseURL:`${CI}/ela-external`,headers:{"Content-Type":"application/json"}});_a.interceptors.request.use(e=>{const A=Bd("psid");A&&(e.headers.Authorization=`Bearer ${A}`);const t=Bd("wak");t&&(e.headers["x-api-key"]=t);const n=Bd("woid");return n&&(e.headers["x-org-id"]=n),e.headers["x-user-context"]="lead",e}),_a.interceptors.response.use(e=>e,e=>{const A=e.response?.status;return A==401&&g9("psid"),(!e.response||A===400||A===403||A>=500)&&eV(e,{area:"api",baseURL:e.config?.baseURL,url:e.config?.url,method:e.config?.method,status:A}),Promise.reject(e)});const SwA=async()=>_a.get("/info"),VwA=async e=>_a.post("/meet-and-greet/schedule",e),WwA=async e=>_a.post("/appointment/book",e),NwA=async e=>_a.post("/subscribe",{...e,mode:"widget"}),zwA=async()=>_a.get("/xi-signed-url"),LwA=async e=>_a.post("/request-call-back",e),XwA=async e=>_a.post("/verify-call-back-otp",e),OwA=async e=>_a.post("/resend-call-back-otp",e);var iw=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},JwA=class extends iw{#A;#e;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const A=()=>e();return window.addEventListener("visibilitychange",A,!1),()=>{window.removeEventListener("visibilitychange",A)}}}}onSubscribe(){this.#e||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#t=e,this.#e?.(),this.#e=e(A=>{typeof A=="boolean"?this.setFocused(A):this.onFocus()})}setFocused(e){this.#A!==e&&(this.#A=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(A=>{A(e)})}isFocused(){return typeof this.#A=="boolean"?this.#A:globalThis.document?.visibilityState!=="hidden"}},gZ=new JwA,KwA={setTimeout:(e,A)=>setTimeout(e,A),clearTimeout:e=>clearTimeout(e),setInterval:(e,A)=>setInterval(e,A),clearInterval:e=>clearInterval(e)},jwA=class{#A=KwA;#e=!1;setTimeoutProvider(e){this.#A=e}setTimeout(e,A){return this.#A.setTimeout(e,A)}clearTimeout(e){this.#A.clearTimeout(e)}setInterval(e,A){return this.#A.setInterval(e,A)}clearInterval(e){this.#A.clearInterval(e)}},SG=new jwA;function _wA(e){setTimeout(e,0)}var qwA=typeof window>"u"||"Deno"in globalThis;function fa(){}function $wA(e,A){return typeof e=="function"?e(A):e}function dZ(e){return typeof e=="number"&&e>=0&&e!==1/0}function nV(e,A){return Math.max(e+(A||0)-Date.now(),0)}function pd(e,A){return typeof e=="function"?e(A):e}function bo(e,A){return typeof e=="function"?e(A):e}function sV(e,A){const{type:t="all",exact:n,fetchStatus:s,predicate:r,queryKey:a,stale:o}=e;if(a){if(n){if(A.queryHash!==uZ(a,A.options))return!1}else if(!AC(A.queryKey,a))return!1}if(t!=="all"){const c=A.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof o=="boolean"&&A.isStale()!==o||s&&s!==A.state.fetchStatus||r&&!r(A))}function rV(e,A){const{exact:t,status:n,predicate:s,mutationKey:r}=e;if(r){if(!A.options.mutationKey)return!1;if(t){if(VG(A.options.mutationKey)!==VG(r))return!1}else if(!AC(A.options.mutationKey,r))return!1}return!(n&&A.state.status!==n||s&&!s(A))}function uZ(e,A){return(A?.queryKeyHashFn||VG)(e)}function VG(e){return JSON.stringify(e,(A,t)=>GZ(t)?Object.keys(t).sort().reduce((n,s)=>(n[s]=t[s],n),{}):t)}function AC(e,A){return e===A?!0:typeof e!=typeof A?!1:e&&A&&typeof e=="object"&&typeof A=="object"?Object.keys(A).every(t=>AC(e[t],A[t])):!1}var AQA=Object.prototype.hasOwnProperty;function aV(e,A,t=0){if(e===A)return e;if(t>500)return A;const n=iV(e)&&iV(A);if(!n&&!(GZ(e)&&GZ(A)))return A;const r=(n?e:Object.keys(e)).length,a=n?A:Object.keys(A),o=a.length,c=n?new Array(o):{};let l=0;for(let g=0;g<o;g++){const u=n?g:a[g],f=e[u],w=A[u];if(f===w){c[u]=f,(n?g<r:AQA.call(e,u))&&l++;continue}if(f===null||w===null||typeof f!="object"||typeof w!="object"){c[u]=w;continue}const v=aV(f,w,t+1);c[u]=v,v===f&&l++}return r===o&&l===r?e:c}function WH(e,A){if(!A||Object.keys(e).length!==Object.keys(A).length)return!1;for(const t in e)if(e[t]!==A[t])return!1;return!0}function iV(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function GZ(e){if(!oV(e))return!1;const A=e.constructor;if(A===void 0)return!0;const t=A.prototype;return!(!oV(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function oV(e){return Object.prototype.toString.call(e)==="[object Object]"}function eQA(e){return new Promise(A=>{SG.setTimeout(A,e)})}function fZ(e,A,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,A):t.structuralSharing!==!1?aV(e,A):A}function tQA(e,A,t=0){const n=[...e,A];return t&&n.length>t?n.slice(1):n}function nQA(e,A,t=0){const n=[A,...e];return t&&n.length>t?n.slice(0,-1):n}var hZ=Symbol();function BV(e,A){return!e.queryFn&&A?.initialPromise?()=>A.initialPromise:!e.queryFn||e.queryFn===hZ?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function wZ(e,A){return typeof e=="function"?e(...A):!!e}function sQA(e,A,t){let n=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=A(),n||(n=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}var eC=(()=>{let e=()=>qwA;return{isServer(){return e()},setIsServer(A){e=A}}})();function QZ(){let e,A;const t=new Promise((s,r)=>{e=s,A=r});t.status="pending",t.catch(()=>{});function n(s){Object.assign(t,s),delete t.resolve,delete t.reject}return t.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},t.reject=s=>{n({status:"rejected",reason:s}),A(s)},t}var rQA=_wA;function aQA(){let e=[],A=0,t=o=>{o()},n=o=>{o()},s=rQA;const r=o=>{A?e.push(o):s(()=>{t(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{n(()=>{o.forEach(c=>{t(c)})})})};return{batch:o=>{let c;A++;try{c=o()}finally{A--,A||a()}return c},batchCalls:o=>(...c)=>{r(()=>{o(...c)})},schedule:r,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{s=o}}}var er=aQA(),iQA=class extends iw{#A=!0;#e;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const A=()=>e(!0),t=()=>e(!1);return window.addEventListener("online",A,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",A),window.removeEventListener("offline",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#t=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#A!==e&&(this.#A=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#A}},NH=new iQA;function oQA(e){return Math.min(1e3*2**e,3e4)}function cV(e){return(e??"online")==="online"?NH.isOnline():!0}var bZ=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function lV(e){let A=!1,t=0,n;const s=QZ(),r=()=>s.status!=="pending",a=H=>{if(!r()){const E=new bZ(H);f(E),e.onCancel?.(E)}},o=()=>{A=!0},c=()=>{A=!1},l=()=>gZ.isFocused()&&(e.networkMode==="always"||NH.isOnline())&&e.canRun(),g=()=>cV(e.networkMode)&&e.canRun(),u=H=>{r()||(n?.(),s.resolve(H))},f=H=>{r()||(n?.(),s.reject(H))},w=()=>new Promise(H=>{n=E=>{(r()||l())&&H(E)},e.onPause?.()}).then(()=>{n=void 0,r()||e.onContinue?.()}),v=()=>{if(r())return;let H;const E=t===0?e.initialPromise:void 0;try{H=E??e.fn()}catch(Z){H=Promise.reject(Z)}Promise.resolve(H).then(u).catch(Z=>{if(r())return;const M=e.retry??(eC.isServer()?0:3),S=e.retryDelay??oQA,x=typeof S=="function"?S(t,Z):S,D=M===!0||typeof M=="number"&&t<M||typeof M=="function"&&M(t,Z);if(A||!D){f(Z);return}t++,e.onFail?.(t,Z),eQA(x).then(()=>l()?void 0:w()).then(()=>{A?f(Z):v()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(n?.(),s),cancelRetry:o,continueRetry:c,canStart:g,start:()=>(g()?v():w().then(v),s)}}var gV=class{#A;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dZ(this.gcTime)&&(this.#A=SG.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(eC.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#A&&(SG.clearTimeout(this.#A),this.#A=void 0)}},BQA=class extends gV{#A;#e;#t;#s;#n;#r;#a;constructor(e){super(),this.#a=!1,this.#r=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#t=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#A=GV(this.options),this.state=e.state??this.#A,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){if(this.options={...this.#r,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const A=GV(this.options);A.data!==void 0&&(this.setState(uV(A.data,A.dataUpdatedAt)),this.#A=A)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,A){const t=fZ(this.state.data,e,this.options);return this.#o({data:t,type:"success",dataUpdatedAt:A?.updatedAt,manual:A?.manual}),t}setState(e,A){this.#o({type:"setState",state:e,setStateOptions:A})}cancel(e){const A=this.#n?.promise;return this.#n?.cancel(e),A?A.then(fa).catch(fa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#A}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>bo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===hZ||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>pd(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!nV(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(A=>A.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(A=>A.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(A=>A!==e),this.observers.length||(this.#n&&(this.#a||this.#i()?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#i(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,A){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&A?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const o=this.observers.find(c=>c.options.queryFn);o&&this.setOptions(o.options)}const t=new AbortController,n=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#a=!0,t.signal)})},s=()=>{const o=BV(this.options,A),l=(()=>{const g={client:this.#s,queryKey:this.queryKey,meta:this.meta};return n(g),g})();return this.#a=!1,this.options.persister?this.options.persister(o,l,this):o(l)},a=(()=>{const o={fetchOptions:A,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:s};return n(o),o})();this.options.behavior?.onFetch(a,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#o({type:"fetch",meta:a.fetchOptions?.meta}),this.#n=lV({initialPromise:A?.initialPromise,fn:a.fetchFn,onCancel:o=>{o instanceof bZ&&o.revert&&this.setState({...this.#e,fetchStatus:"idle"}),t.abort()},onFail:(o,c)=>{this.#o({type:"failed",failureCount:o,error:c})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const o=await this.#n.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#t.config.onSuccess?.(o,this),this.#t.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof bZ){if(o.silent)return this.#n.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#o({type:"error",error:o}),this.#t.config.onError?.(o,this),this.#t.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#o(e){const A=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...dV(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...uV(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?n:void 0,n;case"error":const s=e.error;return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=A(this.state),er.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function dV(e,A){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:cV(A.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function uV(e,A){return{data:e,dataUpdatedAt:A??Date.now(),error:null,isInvalidated:!1,status:"success"}}function GV(e){const A=typeof e.initialData=="function"?e.initialData():e.initialData,t=A!==void 0,n=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:A,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var fV=class extends iw{constructor(e,A){super(),this.options=A,this.#A=e,this.#i=null,this.#a=QZ(),this.bindMethods(),this.setOptions(A)}#A;#e=void 0;#t=void 0;#s=void 0;#n;#r;#a;#i;#o;#d;#u;#c;#l;#B;#G=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),hV(this.#e,this.options)?this.#g():this.updateResult(),this.#Q())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return CZ(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return CZ(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#C(),this.#e.removeObserver(this)}setOptions(e){const A=this.options,t=this.#e;if(this.options=this.#A.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bo(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#e.setOptions(this.options),A._defaulted&&!WH(this.options,A)&&this.#A.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&wV(this.#e,t,this.options,A)&&this.#g(),this.updateResult(),n&&(this.#e!==t||bo(this.options.enabled,this.#e)!==bo(A.enabled,this.#e)||pd(this.options.staleTime,this.#e)!==pd(A.staleTime,this.#e))&&this.#f();const s=this.#h();n&&(this.#e!==t||bo(this.options.enabled,this.#e)!==bo(A.enabled,this.#e)||s!==this.#B)&&this.#w(s)}getOptimisticResult(e){const A=this.#A.getQueryCache().build(this.#A,e),t=this.createResult(A,e);return lQA(this,t)&&(this.#s=t,this.#r=this.options,this.#n=this.#e.state),t}getCurrentResult(){return this.#s}trackResult(e,A){return new Proxy(e,{get:(t,n)=>(this.trackProp(n),A?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(t,n))})}trackProp(e){this.#G.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const A=this.#A.defaultQueryOptions(e),t=this.#A.getQueryCache().build(this.#A,A);return t.fetch().then(()=>this.createResult(t,A))}fetch(e){return this.#g({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#g(e){this.#v();let A=this.#e.fetch(this.options,e);return e?.throwOnError||(A=A.catch(fa)),A}#f(){this.#b();const e=pd(this.options.staleTime,this.#e);if(eC.isServer()||this.#s.isStale||!dZ(e))return;const t=nV(this.#s.dataUpdatedAt,e)+1;this.#c=SG.setTimeout(()=>{this.#s.isStale||this.updateResult()},t)}#h(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#w(e){this.#C(),this.#B=e,!(eC.isServer()||bo(this.options.enabled,this.#e)===!1||!dZ(this.#B)||this.#B===0)&&(this.#l=SG.setInterval(()=>{(this.options.refetchIntervalInBackground||gZ.isFocused())&&this.#g()},this.#B))}#Q(){this.#f(),this.#w(this.#h())}#b(){this.#c&&(SG.clearTimeout(this.#c),this.#c=void 0)}#C(){this.#l&&(SG.clearInterval(this.#l),this.#l=void 0)}createResult(e,A){const t=this.#e,n=this.options,s=this.#s,r=this.#n,a=this.#r,c=e!==t?e.state:this.#t,{state:l}=e;let g={...l},u=!1,f;if(A._optimisticResults){const z=this.hasListeners(),eA=!z&&hV(e,A),$=z&&wV(e,t,A,n);(eA||$)&&(g={...g,...dV(l.data,e.options)}),A._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:w,errorUpdatedAt:v,status:H}=g;f=g.data;let E=!1;if(A.placeholderData!==void 0&&f===void 0&&H==="pending"){let z;s?.isPlaceholderData&&A.placeholderData===a?.placeholderData?(z=s.data,E=!0):z=typeof A.placeholderData=="function"?A.placeholderData(this.#u?.state.data,this.#u):A.placeholderData,z!==void 0&&(H="success",f=fZ(s?.data,z,A),u=!0)}if(A.select&&f!==void 0&&!E)if(s&&f===r?.data&&A.select===this.#o)f=this.#d;else try{this.#o=A.select,f=A.select(f),f=fZ(s?.data,f,A),this.#d=f,this.#i=null}catch(z){this.#i=z}this.#i&&(w=this.#i,f=this.#d,v=Date.now(),H="error");const Z=g.fetchStatus==="fetching",M=H==="pending",S=H==="error",x=M&&Z,D=f!==void 0,W={status:H,fetchStatus:g.fetchStatus,isPending:M,isSuccess:H==="success",isError:S,isInitialLoading:x,isLoading:x,data:f,dataUpdatedAt:g.dataUpdatedAt,error:w,errorUpdatedAt:v,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>c.dataUpdateCount||g.errorUpdateCount>c.errorUpdateCount,isFetching:Z,isRefetching:Z&&!M,isLoadingError:S&&!D,isPaused:g.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:S&&D,isStale:vZ(e,A),refetch:this.refetch,promise:this.#a,isEnabled:bo(A.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const z=W.data!==void 0,eA=W.status==="error"&&!z,$=hA=>{eA?hA.reject(W.error):z&&hA.resolve(W.data)},rA=()=>{const hA=this.#a=W.promise=QZ();$(hA)},iA=this.#a;switch(iA.status){case"pending":e.queryHash===t.queryHash&&$(iA);break;case"fulfilled":(eA||W.data!==iA.value)&&rA();break;case"rejected":(!eA||W.error!==iA.reason)&&rA();break}}return W}updateResult(){const e=this.#s,A=this.createResult(this.#e,this.options);if(this.#n=this.#e.state,this.#r=this.options,this.#n.data!==void 0&&(this.#u=this.#e),WH(A,e))return;this.#s=A;const t=()=>{if(!e)return!0;const{notifyOnChangeProps:n}=this.options,s=typeof n=="function"?n():n;if(s==="all"||!s&&!this.#G.size)return!0;const r=new Set(s??this.#G);return this.options.throwOnError&&r.add("error"),Object.keys(this.#s).some(a=>{const o=a;return this.#s[o]!==e[o]&&r.has(o)})};this.#I({listeners:t()})}#v(){const e=this.#A.getQueryCache().build(this.#A,this.options);if(e===this.#e)return;const A=this.#e;this.#e=e,this.#t=e.state,this.hasListeners()&&(A?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#Q()}#I(e){er.batch(()=>{e.listeners&&this.listeners.forEach(A=>{A(this.#s)}),this.#A.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function cQA(e,A){return bo(A.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&A.retryOnMount===!1)}function hV(e,A){return cQA(e,A)||e.state.data!==void 0&&CZ(e,A,A.refetchOnMount)}function CZ(e,A,t){if(bo(A.enabled,e)!==!1&&pd(A.staleTime,e)!=="static"){const n=typeof t=="function"?t(e):t;return n==="always"||n!==!1&&vZ(e,A)}return!1}function wV(e,A,t,n){return(e!==A||bo(n.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&vZ(e,t)}function vZ(e,A){return bo(A.enabled,e)!==!1&&e.isStaleByTime(pd(A.staleTime,e))}function lQA(e,A){return!WH(e.getCurrentResult(),A)}function zH(e){return{onFetch:(A,t)=>{const n=A.options,s=A.fetchOptions?.meta?.fetchMore?.direction,r=A.state.data?.pages||[],a=A.state.data?.pageParams||[];let o={pages:[],pageParams:[]},c=0;const l=async()=>{let g=!1;const u=v=>{sQA(v,()=>A.signal,()=>g=!0)},f=BV(A.options,A.fetchOptions),w=async(v,H,E)=>{if(g)return Promise.reject();if(H==null&&v.pages.length)return Promise.resolve(v);const M=(()=>{const V={client:A.client,queryKey:A.queryKey,pageParam:H,direction:E?"backward":"forward",meta:A.options.meta};return u(V),V})(),S=await f(M),{maxPages:x}=A.options,D=E?nQA:tQA;return{pages:D(v.pages,S,x),pageParams:D(v.pageParams,H,x)}};if(s&&r.length){const v=s==="backward",H=v?QV:IZ,E={pages:r,pageParams:a},Z=H(n,E);o=await w(E,Z,v)}else{const v=e??r.length;do{const H=c===0?a[0]??n.initialPageParam:IZ(n,o);if(c>0&&H==null)break;o=await w(o,H),c++}while(c<v)}return o};A.options.persister?A.fetchFn=()=>A.options.persister?.(l,{client:A.client,queryKey:A.queryKey,meta:A.options.meta,signal:A.signal},t):A.fetchFn=l}}}function IZ(e,{pages:A,pageParams:t}){const n=A.length-1;return A.length>0?e.getNextPageParam(A[n],A,t[n],t):void 0}function QV(e,{pages:A,pageParams:t}){return A.length>0?e.getPreviousPageParam?.(A[0],A,t[0],t):void 0}function gQA(e,A){return A?IZ(e,A)!=null:!1}function dQA(e,A){return!A||!e.getPreviousPageParam?!1:QV(e,A)!=null}var uQA=class extends fV{constructor(e,A){super(e,A)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:zH()})}getOptimisticResult(e){return e.behavior=zH(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,A){const{state:t}=e,n=super.createResult(e,A),{isFetching:s,isRefetching:r,isError:a,isRefetchError:o}=n,c=t.fetchMeta?.fetchMore?.direction,l=a&&c==="forward",g=s&&c==="forward",u=a&&c==="backward",f=s&&c==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:gQA(A,t.data),hasPreviousPage:dQA(A,t.data),isFetchNextPageError:l,isFetchingNextPage:g,isFetchPreviousPageError:u,isFetchingPreviousPage:f,isRefetchError:o&&!l&&!u,isRefetching:r&&!g&&!f}}},GQA=class extends gV{#A;#e;#t;#s;constructor(e){super(),this.#A=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||bV(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(A=>A!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const A=()=>{this.#n({type:"continue"})},t={client:this.#A,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=lV({fn:()=>this.options.mutationFn?this.options.mutationFn(e,t):Promise.reject(new Error("No mutationFn found")),onFail:(r,a)=>{this.#n({type:"failed",failureCount:r,error:a})},onPause:()=>{this.#n({type:"pause"})},onContinue:A,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const n=this.state.status==="pending",s=!this.#s.canStart();try{if(n)A();else{this.#n({type:"pending",variables:e,isPaused:s}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,t);const a=await this.options.onMutate?.(e,t);a!==this.state.context&&this.#n({type:"pending",context:a,variables:e,isPaused:s})}const r=await this.#s.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this,t),await this.options.onSuccess?.(r,e,this.state.context,t),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this,t),await this.options.onSettled?.(r,null,e,this.state.context,t),this.#n({type:"success",data:r}),r}catch(r){try{await this.#t.config.onError?.(r,e,this.state.context,this,t)}catch(a){Promise.reject(a)}try{await this.options.onError?.(r,e,this.state.context,t)}catch(a){Promise.reject(a)}try{await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,t)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,r,e,this.state.context,t)}catch(a){Promise.reject(a)}throw this.#n({type:"error",error:r}),r}finally{this.#t.runNext(this)}}#n(e){const A=t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=A(this.state),er.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function bV(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var fQA=class extends iw{constructor(e={}){super(),this.config=e,this.#A=new Set,this.#e=new Map,this.#t=0}#A;#e;#t;build(e,A,t){const n=new GQA({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(A),state:t});return this.add(n),n}add(e){this.#A.add(e);const A=LH(e);if(typeof A=="string"){const t=this.#e.get(A);t?t.push(e):this.#e.set(A,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#A.delete(e)){const A=LH(e);if(typeof A=="string"){const t=this.#e.get(A);if(t)if(t.length>1){const n=t.indexOf(e);n!==-1&&t.splice(n,1)}else t[0]===e&&this.#e.delete(A)}}this.notify({type:"removed",mutation:e})}canRun(e){const A=LH(e);if(typeof A=="string"){const n=this.#e.get(A)?.find(s=>s.state.status==="pending");return!n||n===e}else return!0}runNext(e){const A=LH(e);return typeof A=="string"?this.#e.get(A)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){er.batch(()=>{this.#A.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#A.clear(),this.#e.clear()})}getAll(){return Array.from(this.#A)}find(e){const A={exact:!0,...e};return this.getAll().find(t=>rV(A,t))}findAll(e={}){return this.getAll().filter(A=>rV(e,A))}notify(e){er.batch(()=>{this.listeners.forEach(A=>{A(e)})})}resumePausedMutations(){const e=this.getAll().filter(A=>A.state.isPaused);return er.batch(()=>Promise.all(e.map(A=>A.continue().catch(fa))))}};function LH(e){return e.options.scope?.id}var hQA=class extends iw{#A;#e=void 0;#t;#s;constructor(A,t){super(),this.#A=A,this.setOptions(t),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(A){const t=this.options;this.options=this.#A.defaultMutationOptions(A),WH(this.options,t)||this.#A.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),t?.mutationKey&&this.options.mutationKey&&VG(t.mutationKey)!==VG(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(A){this.#n(),this.#r(A)}getCurrentResult(){return this.#e}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#n(),this.#r()}mutate(A,t){return this.#s=t,this.#t?.removeObserver(this),this.#t=this.#A.getMutationCache().build(this.#A,this.options),this.#t.addObserver(this),this.#t.execute(A)}#n(){const A=this.#t?.state??bV();this.#e={...A,isPending:A.status==="pending",isSuccess:A.status==="success",isError:A.status==="error",isIdle:A.status==="idle",mutate:this.mutate,reset:this.reset}}#r(A){er.batch(()=>{if(this.#s&&this.hasListeners()){const t=this.#e.variables,n=this.#e.context,s={client:this.#A,meta:this.options.meta,mutationKey:this.options.mutationKey};if(A?.type==="success"){try{this.#s.onSuccess?.(A.data,t,n,s)}catch(r){Promise.reject(r)}try{this.#s.onSettled?.(A.data,null,t,n,s)}catch(r){Promise.reject(r)}}else if(A?.type==="error"){try{this.#s.onError?.(A.error,t,n,s)}catch(r){Promise.reject(r)}try{this.#s.onSettled?.(void 0,A.error,t,n,s)}catch(r){Promise.reject(r)}}}this.listeners.forEach(t=>{t(this.#e)})})}},wQA=class extends iw{constructor(e={}){super(),this.config=e,this.#A=new Map}#A;build(e,A,t){const n=A.queryKey,s=A.queryHash??uZ(n,A);let r=this.get(s);return r||(r=new BQA({client:e,queryKey:n,queryHash:s,options:e.defaultQueryOptions(A),state:t,defaultOptions:e.getQueryDefaults(n)}),this.add(r)),r}add(e){this.#A.has(e.queryHash)||(this.#A.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const A=this.#A.get(e.queryHash);A&&(e.destroy(),A===e&&this.#A.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){er.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#A.get(e)}getAll(){return[...this.#A.values()]}find(e){const A={exact:!0,...e};return this.getAll().find(t=>sV(A,t))}findAll(e={}){const A=this.getAll();return Object.keys(e).length>0?A.filter(t=>sV(e,t)):A}notify(e){er.batch(()=>{this.listeners.forEach(A=>{A(e)})})}onFocus(){er.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){er.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},QQA=class{#A;#e;#t;#s;#n;#r;#a;#i;constructor(e={}){this.#A=e.queryCache||new wQA,this.#e=e.mutationCache||new fQA,this.#t=e.defaultOptions||{},this.#s=new Map,this.#n=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#a=gZ.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#A.onFocus())}),this.#i=NH.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#A.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#A.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const A=this.defaultQueryOptions({queryKey:e});return this.#A.get(A.queryHash)?.state.data}ensureQueryData(e){const A=this.defaultQueryOptions(e),t=this.#A.build(this,A),n=t.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(pd(A.staleTime,t))&&this.prefetchQuery(A),Promise.resolve(n))}getQueriesData(e){return this.#A.findAll(e).map(({queryKey:A,state:t})=>{const n=t.data;return[A,n]})}setQueryData(e,A,t){const n=this.defaultQueryOptions({queryKey:e}),r=this.#A.get(n.queryHash)?.state.data,a=$wA(A,r);if(a!==void 0)return this.#A.build(this,n).setData(a,{...t,manual:!0})}setQueriesData(e,A,t){return er.batch(()=>this.#A.findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,A,t)]))}getQueryState(e){const A=this.defaultQueryOptions({queryKey:e});return this.#A.get(A.queryHash)?.state}removeQueries(e){const A=this.#A;er.batch(()=>{A.findAll(e).forEach(t=>{A.remove(t)})})}resetQueries(e,A){const t=this.#A;return er.batch(()=>(t.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},A)))}cancelQueries(e,A={}){const t={revert:!0,...A},n=er.batch(()=>this.#A.findAll(e).map(s=>s.cancel(t)));return Promise.all(n).then(fa).catch(fa)}invalidateQueries(e,A={}){return er.batch(()=>(this.#A.findAll(e).forEach(t=>{t.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},A)))}refetchQueries(e,A={}){const t={...A,cancelRefetch:A.cancelRefetch??!0},n=er.batch(()=>this.#A.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let r=s.fetch(void 0,t);return t.throwOnError||(r=r.catch(fa)),s.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(n).then(fa)}fetchQuery(e){const A=this.defaultQueryOptions(e);A.retry===void 0&&(A.retry=!1);const t=this.#A.build(this,A);return t.isStaleByTime(pd(A.staleTime,t))?t.fetch(A):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(fa).catch(fa)}fetchInfiniteQuery(e){return e.behavior=zH(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(fa).catch(fa)}ensureInfiniteQueryData(e){return e.behavior=zH(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return NH.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#A}getMutationCache(){return this.#e}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,A){this.#s.set(VG(e),{queryKey:e,defaultOptions:A})}getQueryDefaults(e){const A=[...this.#s.values()],t={};return A.forEach(n=>{AC(e,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(e,A){this.#n.set(VG(e),{mutationKey:e,defaultOptions:A})}getMutationDefaults(e){const A=[...this.#n.values()],t={};return A.forEach(n=>{AC(e,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const A={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return A.queryHash||(A.queryHash=uZ(A.queryKey,A)),A.refetchOnReconnect===void 0&&(A.refetchOnReconnect=A.networkMode!=="always"),A.throwOnError===void 0&&(A.throwOnError=!!A.suspense),!A.networkMode&&A.persister&&(A.networkMode="offlineFirst"),A.queryFn===hZ&&(A.enabled=!1),A}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#A.clear(),this.#e.clear()}},CV=R.createContext(void 0),pZ=e=>{const A=R.useContext(CV);if(!A)throw new Error("No QueryClient set, use QueryClientProvider to set one");return A},bQA=({client:e,children:A})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(CV.Provider,{value:e,children:A})),vV=R.createContext(!1),CQA=()=>R.useContext(vV);vV.Provider;function vQA(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var IQA=R.createContext(vQA()),pQA=()=>R.useContext(IQA),HQA=(e,A,t)=>{const n=t?.state.error&&typeof e.throwOnError=="function"?wZ(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(A.isReset()||(e.retryOnMount=!1))},mQA=e=>{R.useEffect(()=>{e.clearReset()},[e])},EQA=({result:e,errorResetBoundary:A,throwOnError:t,query:n,suspense:s})=>e.isError&&!A.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||wZ(t,[e.error,n])),yQA=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>t(n(...s)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},YQA=(e,A)=>e.isLoading&&e.isFetching&&!A,ZQA=(e,A)=>e?.suspense&&A.isPending,IV=(e,A,t)=>A.fetchOptimistic(e).catch(()=>{t.clearReset()});function pV(e,A,t){const n=CQA(),s=pQA(),r=pZ(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const o=r.getQueryCache().get(a.queryHash);a._optimisticResults=n?"isRestoring":"optimistic",yQA(a),HQA(a,s,o),mQA(s);const c=!r.getQueryCache().get(a.queryHash),[l]=R.useState(()=>new A(r,a)),g=l.getOptimisticResult(a),u=!n&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(f=>{const w=u?l.subscribe(er.batchCalls(f)):fa;return l.updateResult(),w},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),R.useEffect(()=>{l.setOptions(a)},[a,l]),ZQA(a,g))throw IV(a,l,s);if(EQA({result:g,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw g.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,g),a.experimental_prefetchInRender&&!eC.isServer()&&YQA(g,n)&&(c?IV(a,l,s):o?.promise)?.catch(fa).finally(()=>{l.updateResult()}),a.notifyOnChangeProps?g:l.trackResult(g)}function HZ(e,A){return pV(e,fV)}function WG(e,A){const t=pZ(),[n]=R.useState(()=>new hQA(t,e));R.useEffect(()=>{n.setOptions(e)},[n,e]);const s=R.useSyncExternalStore(R.useCallback(a=>n.subscribe(er.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),r=R.useCallback((a,o)=>{n.mutate(a,o).catch(fa)},[n]);if(s.error&&wZ(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:r,mutateAsync:s.mutate}}function kQA(e,A){return pV(e,uQA)}function UQA(e,A){return A.forEach(function(t){t&&typeof t!="string"&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!=="default"&&!(n in e)){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var DQA=Object.defineProperty,FQA=(e,A,t)=>A in e?DQA(e,A,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[A]=t,HV=(e,A,t)=>FQA(e,typeof A!="symbol"?A+"":A,t);let ha=class{constructor(){HV(this,"_locking"),HV(this,"_locks"),this._locking=Promise.resolve(),this._locks=0}isLocked(){return this._locks>0}lock(){this._locks+=1;let A;const t=new Promise(s=>A=()=>{this._locks-=1,s()}),n=this._locking.then(()=>A);return this._locking=this._locking.then(()=>t),n}};function ns(e,A){if(!e)throw new Error(A)}const MQA=34028234663852886e22,xQA=-34028234663852886e22,PQA=4294967295,TQA=2147483647,RQA=-2147483648;function XH(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>TQA||e<RQA)throw new Error("invalid int 32: "+e)}function mZ(e){if(typeof e!="number")throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>PQA||e<0)throw new Error("invalid uint 32: "+e)}function mV(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>MQA||e<xQA))throw new Error("invalid float 32: "+e)}const EV=Symbol("@bufbuild/protobuf/enum-type");function SQA(e){const A=e[EV];return ns(A,"missing enum type on enum object"),A}function yV(e,A,t,n){e[EV]=YV(A,t.map(s=>({no:s.no,name:s.name,localName:e[s.no]})))}function YV(e,A,t){const n=Object.create(null),s=Object.create(null),r=[];for(const a of A){const o=ZV(a);r.push(o),n[a.name]=o,s[a.no]=o}return{typeName:e,values:r,findName(a){return n[a]},findNumber(a){return s[a]}}}function VQA(e,A,t){const n={};for(const s of A){const r=ZV(s);n[r.localName]=r.no,n[r.no]=r.localName}return yV(n,e,A),n}function ZV(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}class EZ{equals(A){return this.getType().runtime.util.equals(this.getType(),this,A)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(A,t){const n=this.getType(),s=n.runtime.bin,r=s.makeReadOptions(t);return s.readMessage(this,r.readerFactory(A),A.byteLength,r),this}fromJson(A,t){const n=this.getType(),s=n.runtime.json,r=s.makeReadOptions(t);return s.readMessage(n,A,r,this),this}fromJsonString(A,t){let n;try{n=JSON.parse(A)}catch(s){throw new Error("cannot decode ".concat(this.getType().typeName," from JSON: ").concat(s instanceof Error?s.message:String(s)))}return this.fromJson(n,t)}toBinary(A){const t=this.getType(),n=t.runtime.bin,s=n.makeWriteOptions(A),r=s.writerFactory();return n.writeMessage(this,r,s),r.finish()}toJson(A){const t=this.getType(),n=t.runtime.json,s=n.makeWriteOptions(A);return n.writeMessage(this,s)}toJsonString(A){var t;const n=this.toJson(A);return JSON.stringify(n,null,(t=A?.prettySpaces)!==null&&t!==void 0?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function WQA(e,A,t,n){var s;const r=(s=n?.localName)!==null&&s!==void 0?s:A.substring(A.lastIndexOf(".")+1),a={[r]:function(o){e.util.initFields(this),e.util.initPartial(o,this)}}[r];return Object.setPrototypeOf(a.prototype,new EZ),Object.assign(a,{runtime:e,typeName:A,fields:e.util.newFieldList(t),fromBinary(o,c){return new a().fromBinary(o,c)},fromJson(o,c){return new a().fromJson(o,c)},fromJsonString(o,c){return new a().fromJsonString(o,c)},equals(o,c){return e.util.equals(a,o,c)}}),a}function NQA(){let e=0,A=0;for(let n=0;n<28;n+=7){let s=this.buf[this.pos++];if(e|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[e,A]}let t=this.buf[this.pos++];if(e|=(t&15)<<28,A=(t&112)>>4,(t&128)==0)return this.assertBounds(),[e,A];for(let n=3;n<=31;n+=7){let s=this.buf[this.pos++];if(A|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[e,A]}throw new Error("invalid varint")}function yZ(e,A,t){for(let r=0;r<28;r=r+7){const a=e>>>r,o=!(!(a>>>7)&&A==0),c=(o?a|128:a)&255;if(t.push(c),!o)return}const n=e>>>28&15|(A&7)<<4,s=A>>3!=0;if(t.push((s?n|128:n)&255),!!s){for(let r=3;r<31;r=r+7){const a=A>>>r,o=!!(a>>>7),c=(o?a|128:a)&255;if(t.push(c),!o)return}t.push(A>>>31&1)}}const OH=4294967296;function kV(e){const A=e[0]==="-";A&&(e=e.slice(1));const t=1e6;let n=0,s=0;function r(a,o){const c=Number(e.slice(a,o));s*=t,n=n*t+c,n>=OH&&(s=s+(n/OH|0),n=n%OH)}return r(-24,-18),r(-18,-12),r(-12,-6),r(-6),A?DV(n,s):YZ(n,s)}function zQA(e,A){let t=YZ(e,A);const n=t.hi&2147483648;n&&(t=DV(t.lo,t.hi));const s=UV(t.lo,t.hi);return n?"-"+s:s}function UV(e,A){if({lo:e,hi:A}=LQA(e,A),A<=2097151)return String(OH*A+e);const t=e&16777215,n=(e>>>24|A<<8)&16777215,s=A>>16&65535;let r=t+n*6777216+s*6710656,a=n+s*8147497,o=s*2;const c=1e7;return r>=c&&(a+=Math.floor(r/c),r%=c),a>=c&&(o+=Math.floor(a/c),a%=c),o.toString()+FV(a)+FV(r)}function LQA(e,A){return{lo:e>>>0,hi:A>>>0}}function YZ(e,A){return{lo:e|0,hi:A|0}}function DV(e,A){return A=~A,e?e=~e+1:A+=1,YZ(e,A)}const FV=e=>{const A=String(e);return"0000000".slice(A.length)+A};function MV(e,A){if(e>=0){for(;e>127;)A.push(e&127|128),e=e>>>7;A.push(e)}else{for(let t=0;t<9;t++)A.push(e&127|128),e=e>>7;A.push(1)}}function XQA(){let e=this.buf[this.pos++],A=e&127;if((e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<7,(e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<14,(e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<21,(e&128)==0)return this.assertBounds(),A;e=this.buf[this.pos++],A|=(e&15)<<28;for(let t=5;(e&128)!==0&&t<10;t++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),A>>>0}function OQA(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const s=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),a=BigInt("0"),o=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(c){const l=typeof c=="bigint"?c:BigInt(c);if(l>r||l<s)throw new Error("int64 invalid: ".concat(c));return l},uParse(c){const l=typeof c=="bigint"?c:BigInt(c);if(l>o||l<a)throw new Error("uint64 invalid: ".concat(c));return l},enc(c){return e.setBigInt64(0,this.parse(c),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(c){return e.setBigInt64(0,this.uParse(c),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(c,l){return e.setInt32(0,c,!0),e.setInt32(4,l,!0),e.getBigInt64(0,!0)},uDec(c,l){return e.setInt32(0,c,!0),e.setInt32(4,l,!0),e.getBigUint64(0,!0)}}}const t=s=>ns(/^-?[0-9]+$/.test(s),"int64 invalid: ".concat(s)),n=s=>ns(/^[0-9]+$/.test(s),"uint64 invalid: ".concat(s));return{zero:"0",supported:!1,parse(s){return typeof s!="string"&&(s=s.toString()),t(s),s},uParse(s){return typeof s!="string"&&(s=s.toString()),n(s),s},enc(s){return typeof s!="string"&&(s=s.toString()),t(s),kV(s)},uEnc(s){return typeof s!="string"&&(s=s.toString()),n(s),kV(s)},dec(s,r){return zQA(s,r)},uDec(s,r){return UV(s,r)}}}const Tn=OQA();var RA;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(RA||(RA={}));var Hd;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(Hd||(Hd={}));function md(e,A,t){if(A===t)return!0;if(e==RA.BYTES){if(!(A instanceof Uint8Array)||!(t instanceof Uint8Array)||A.length!==t.length)return!1;for(let n=0;n<A.length;n++)if(A[n]!==t[n])return!1;return!0}switch(e){case RA.UINT64:case RA.FIXED64:case RA.INT64:case RA.SFIXED64:case RA.SINT64:return A==t}return!1}function ow(e,A){switch(e){case RA.BOOL:return!1;case RA.UINT64:case RA.FIXED64:case RA.INT64:case RA.SFIXED64:case RA.SINT64:return A==0?Tn.zero:"0";case RA.DOUBLE:case RA.FLOAT:return 0;case RA.BYTES:return new Uint8Array(0);case RA.STRING:return"";default:return 0}}function xV(e,A){switch(e){case RA.BOOL:return A===!1;case RA.STRING:return A==="";case RA.BYTES:return A instanceof Uint8Array&&!A.byteLength;default:return A==0}}var hs;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(hs||(hs={}));class JQA{constructor(A){this.stack=[],this.textEncoder=A??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let A=0;for(let s=0;s<this.chunks.length;s++)A+=this.chunks[s].length;let t=new Uint8Array(A),n=0;for(let s=0;s<this.chunks.length;s++)t.set(this.chunks[s],n),n+=this.chunks[s].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let A=this.finish(),t=this.stack.pop();if(!t)throw new Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(A.byteLength),this.raw(A)}tag(A,t){return this.uint32((A<<3|t)>>>0)}raw(A){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(A),this}uint32(A){for(mZ(A);A>127;)this.buf.push(A&127|128),A=A>>>7;return this.buf.push(A),this}int32(A){return XH(A),MV(A,this.buf),this}bool(A){return this.buf.push(A?1:0),this}bytes(A){return this.uint32(A.byteLength),this.raw(A)}string(A){let t=this.textEncoder.encode(A);return this.uint32(t.byteLength),this.raw(t)}float(A){mV(A);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,A,!0),this.raw(t)}double(A){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,A,!0),this.raw(t)}fixed32(A){mZ(A);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,A,!0),this.raw(t)}sfixed32(A){XH(A);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,A,!0),this.raw(t)}sint32(A){return XH(A),A=(A<<1^A>>31)>>>0,MV(A,this.buf),this}sfixed64(A){let t=new Uint8Array(8),n=new DataView(t.buffer),s=Tn.enc(A);return n.setInt32(0,s.lo,!0),n.setInt32(4,s.hi,!0),this.raw(t)}fixed64(A){let t=new Uint8Array(8),n=new DataView(t.buffer),s=Tn.uEnc(A);return n.setInt32(0,s.lo,!0),n.setInt32(4,s.hi,!0),this.raw(t)}int64(A){let t=Tn.enc(A);return yZ(t.lo,t.hi,this.buf),this}sint64(A){let t=Tn.enc(A),n=t.hi>>31,s=t.lo<<1^n,r=(t.hi<<1|t.lo>>>31)^n;return yZ(s,r,this.buf),this}uint64(A){let t=Tn.uEnc(A);return yZ(t.lo,t.hi,this.buf),this}}class KQA{constructor(A,t){this.varint64=NQA,this.uint32=XQA,this.buf=A,this.len=A.length,this.pos=0,this.view=new DataView(A.buffer,A.byteOffset,A.byteLength),this.textDecoder=t??new TextDecoder}tag(){let A=this.uint32(),t=A>>>3,n=A&7;if(t<=0||n<0||n>5)throw new Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(A,t){let n=this.pos;switch(A){case hs.Varint:for(;this.buf[this.pos++]&128;);break;case hs.Bit64:this.pos+=4;case hs.Bit32:this.pos+=4;break;case hs.LengthDelimited:let s=this.uint32();this.pos+=s;break;case hs.StartGroup:for(;;){const[r,a]=this.tag();if(a===hs.EndGroup){if(t!==void 0&&r!==t)throw new Error("invalid end group tag");break}this.skip(a,r)}break;default:throw new Error("cant skip wire type "+A)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let A=this.uint32();return A>>>1^-(A&1)}int64(){return Tn.dec(...this.varint64())}uint64(){return Tn.uDec(...this.varint64())}sint64(){let[A,t]=this.varint64(),n=-(A&1);return A=(A>>>1|(t&1)<<31)^n,t=t>>>1^n,Tn.dec(A,t)}bool(){let[A,t]=this.varint64();return A!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Tn.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Tn.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let A=this.uint32(),t=this.pos;return this.pos+=A,this.assertBounds(),this.buf.subarray(t,t+A)}string(){return this.textDecoder.decode(this.bytes())}}function jQA(e,A,t,n){let s;return{typeName:A,extendee:t,get field(){if(!s){const r=typeof n=="function"?n():n;r.name=A.split(".").pop(),r.jsonName="[".concat(A,"]"),s=e.util.newFieldList([r]).list()[0]}return s},runtime:e}}function PV(e){const A=e.field.localName,t=Object.create(null);return t[A]=_QA(e),[t,()=>t[A]]}function _QA(e){const A=e.field;if(A.repeated)return[];if(A.default!==void 0)return A.default;switch(A.kind){case"enum":return A.T.values[0].no;case"scalar":return ow(A.T,A.L);case"message":const t=A.T,n=new t;return t.fieldWrapper?t.fieldWrapper.unwrapField(n):n;case"map":throw"map fields are not allowed to be extensions"}}function qQA(e,A){if(!A.repeated&&(A.kind=="enum"||A.kind=="scalar")){for(let t=e.length-1;t>=0;--t)if(e[t].no==A.no)return[e[t]];return[]}return e.filter(t=>t.no===A.no)}let Ol="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),JH=[];for(let e=0;e<Ol.length;e++)JH[Ol[e].charCodeAt(0)]=e;JH[45]=Ol.indexOf("+"),JH[95]=Ol.indexOf("/");const TV={dec(e){let A=e.length*3/4;e[e.length-2]=="="?A-=2:e[e.length-1]=="="&&(A-=1);let t=new Uint8Array(A),n=0,s=0,r,a=0;for(let o=0;o<e.length;o++){if(r=JH[e.charCodeAt(o)],r===void 0)switch(e[o]){case"=":s=0;case`
|
|
98
98
|
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(s){case 0:a=r,s=1;break;case 1:t[n++]=a<<2|(r&48)>>4,a=r,s=2;break;case 2:t[n++]=(a&15)<<4|(r&60)>>2,a=r,s=3;break;case 3:t[n++]=(a&3)<<6|r,s=0;break}}if(s==1)throw Error("invalid base64 string.");return t.subarray(0,n)},enc(e){let A="",t=0,n,s=0;for(let r=0;r<e.length;r++)switch(n=e[r],t){case 0:A+=Ol[n>>2],s=(n&3)<<4,t=1;break;case 1:A+=Ol[s|n>>4],s=(n&15)<<2,t=2;break;case 2:A+=Ol[s|n>>6],A+=Ol[n&63],t=0;break}return t&&(A+=Ol[s],A+="=",t==1&&(A+="=")),A}};function $QA(e,A,t){SV(A,e);const n=A.runtime.bin.makeReadOptions(t),s=qQA(e.getType().runtime.bin.listUnknownFields(e),A.field),[r,a]=PV(A);for(const o of s)A.runtime.bin.readField(r,n.readerFactory(o.data),A.field,o.wireType,n);return a()}function AbA(e,A,t,n){SV(A,e);const s=A.runtime.bin.makeReadOptions(n),r=A.runtime.bin.makeWriteOptions(n);if(RV(e,A)){const l=e.getType().runtime.bin.listUnknownFields(e).filter(g=>g.no!=A.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(const g of l)e.getType().runtime.bin.onUnknownField(e,g.no,g.wireType,g.data)}const a=r.writerFactory();let o=A.field;!o.opt&&!o.repeated&&(o.kind=="enum"||o.kind=="scalar")&&(o=Object.assign(Object.assign({},A.field),{opt:!0})),A.runtime.bin.writeField(o,t,a,r);const c=s.readerFactory(a.finish());for(;c.pos<c.len;){const[l,g]=c.tag(),u=c.skip(g,l);e.getType().runtime.bin.onUnknownField(e,l,g,u)}}function RV(e,A){const t=e.getType();return A.extendee.typeName===t.typeName&&!!t.runtime.bin.listUnknownFields(e).find(n=>n.no==A.field.no)}function SV(e,A){ns(e.extendee.typeName==A.getType().typeName,"extension ".concat(e.typeName," can only be applied to message ").concat(e.extendee.typeName))}function VV(e,A){const t=e.localName;if(e.repeated)return A[t].length>0;if(e.oneof)return A[e.oneof.localName].case===t;switch(e.kind){case"enum":case"scalar":return e.opt||e.req?A[t]!==void 0:e.kind=="enum"?A[t]!==e.T.values[0].no:!xV(e.T,A[t]);case"message":return A[t]!==void 0;case"map":return Object.keys(A[t]).length>0}}function WV(e,A){const t=e.localName,n=!e.opt&&!e.req;if(e.repeated)A[t]=[];else if(e.oneof)A[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":A[t]={};break;case"enum":A[t]=n?e.T.values[0].no:void 0;break;case"scalar":A[t]=n?ow(e.T,e.L):void 0;break;case"message":A[t]=void 0;break}}function Jl(e,A){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(EZ.prototype).every(n=>n in e&&typeof e[n]=="function"))return!1;const t=e.getType();return t===null||typeof t!="function"||!("typeName"in t)||typeof t.typeName!="string"?!1:A===void 0?!0:t.typeName==A.typeName}function NV(e,A){return Jl(A)||!e.fieldWrapper?A:e.fieldWrapper.wrapField(A)}RA.DOUBLE,RA.FLOAT,RA.INT64,RA.UINT64,RA.INT32,RA.UINT32,RA.BOOL,RA.STRING,RA.BYTES;const zV={ignoreUnknownFields:!1},LV={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function ebA(e){return e?Object.assign(Object.assign({},zV),e):zV}function tbA(e){return e?Object.assign(Object.assign({},LV),e):LV}const KH=Symbol(),jH=Symbol();function nbA(){return{makeReadOptions:ebA,makeWriteOptions:tbA,readMessage(e,A,t,n){if(A==null||Array.isArray(A)||typeof A!="object")throw new Error("cannot decode message ".concat(e.typeName," from JSON: ").concat(yc(A)));n=n??new e;const s=new Map,r=t.typeRegistry;for(const[a,o]of Object.entries(A)){const c=e.fields.findJsonName(a);if(c){if(c.oneof){if(o===null&&c.kind=="scalar")continue;const l=s.get(c.oneof);if(l!==void 0)throw new Error("cannot decode message ".concat(e.typeName,' from JSON: multiple keys for oneof "').concat(c.oneof.name,'" present: "').concat(l,'", "').concat(a,'"'));s.set(c.oneof,a)}XV(n,o,c,t,e)}else{let l=!1;if(r?.findExtension&&a.startsWith("[")&&a.endsWith("]")){const g=r.findExtension(a.substring(1,a.length-1));if(g&&g.extendee.typeName==e.typeName){l=!0;const[u,f]=PV(g);XV(u,o,g.field,t,g),AbA(n,g,f(),t)}}if(!l&&!t.ignoreUnknownFields)throw new Error("cannot decode message ".concat(e.typeName,' from JSON: key "').concat(a,'" is unknown'))}}return n},writeMessage(e,A){const t=e.getType(),n={};let s;try{for(s of t.fields.byNumber()){if(!VV(s,e)){if(s.req)throw"required field not set";if(!A.emitDefaultValues||!rbA(s))continue}const a=s.oneof?e[s.oneof.localName].value:e[s.localName],o=OV(s,a,A);o!==void 0&&(n[A.useProtoFieldName?s.name:s.jsonName]=o)}const r=A.typeRegistry;if(r?.findExtensionFor)for(const a of t.runtime.bin.listUnknownFields(e)){const o=r.findExtensionFor(t.typeName,a.no);if(o&&RV(e,o)){const c=$QA(e,o,A),l=OV(o.field,c,A);l!==void 0&&(n[o.field.jsonName]=l)}}}catch(r){const a=s?"cannot encode field ".concat(t.typeName,".").concat(s.name," to JSON"):"cannot encode message ".concat(t.typeName," to JSON"),o=r instanceof Error?r.message:String(r);throw new Error(a+(o.length>0?": ".concat(o):""))}return n},readScalar(e,A,t){return tC(e,A,t??Hd.BIGINT,!0)},writeScalar(e,A,t){if(A!==void 0&&(t||xV(e,A)))return _H(e,A)},debug:yc}}function yc(e){if(e===null)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":'"'.concat(e.split('"').join('\\"'),'"');default:return String(e)}}function XV(e,A,t,n,s){let r=t.localName;if(t.repeated){if(ns(t.kind!="map"),A===null)return;if(!Array.isArray(A))throw new Error("cannot decode field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(yc(A)));const a=e[r];for(const o of A){if(o===null)throw new Error("cannot decode field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(yc(o)));switch(t.kind){case"message":a.push(t.T.fromJson(o,n));break;case"enum":const c=ZZ(t.T,o,n.ignoreUnknownFields,!0);c!==jH&&a.push(c);break;case"scalar":try{a.push(tC(t.T,o,t.L,!0))}catch(l){let g="cannot decode field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(yc(o));throw l instanceof Error&&l.message.length>0&&(g+=": ".concat(l.message)),new Error(g)}break}}}else if(t.kind=="map"){if(A===null)return;if(typeof A!="object"||Array.isArray(A))throw new Error("cannot decode field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(yc(A)));const a=e[r];for(const[o,c]of Object.entries(A)){if(c===null)throw new Error("cannot decode field ".concat(s.typeName,".").concat(t.name," from JSON: map value null"));let l;try{l=sbA(t.K,o)}catch(g){let u="cannot decode map key for field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(yc(A));throw g instanceof Error&&g.message.length>0&&(u+=": ".concat(g.message)),new Error(u)}switch(t.V.kind){case"message":a[l]=t.V.T.fromJson(c,n);break;case"enum":const g=ZZ(t.V.T,c,n.ignoreUnknownFields,!0);g!==jH&&(a[l]=g);break;case"scalar":try{a[l]=tC(t.V.T,c,Hd.BIGINT,!0)}catch(u){let f="cannot decode map value for field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(yc(A));throw u instanceof Error&&u.message.length>0&&(f+=": ".concat(u.message)),new Error(f)}break}}}else switch(t.oneof&&(e=e[t.oneof.localName]={case:r},r="value"),t.kind){case"message":const a=t.T;if(A===null&&a.typeName!="google.protobuf.Value")return;let o=e[r];Jl(o)?o.fromJson(A,n):(e[r]=o=a.fromJson(A,n),a.fieldWrapper&&!t.oneof&&(e[r]=a.fieldWrapper.unwrapField(o)));break;case"enum":const c=ZZ(t.T,A,n.ignoreUnknownFields,!1);switch(c){case KH:WV(t,e);break;case jH:break;default:e[r]=c;break}break;case"scalar":try{const l=tC(t.T,A,t.L,!1);l===KH?WV(t,e):e[r]=l}catch(l){let g="cannot decode field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(yc(A));throw l instanceof Error&&l.message.length>0&&(g+=": ".concat(l.message)),new Error(g)}break}}function sbA(e,A){if(e===RA.BOOL)switch(A){case"true":A=!0;break;case"false":A=!1;break}return tC(e,A,Hd.BIGINT,!0).toString()}function tC(e,A,t,n){if(A===null)return n?ow(e,t):KH;switch(e){case RA.DOUBLE:case RA.FLOAT:if(A==="NaN")return Number.NaN;if(A==="Infinity")return Number.POSITIVE_INFINITY;if(A==="-Infinity")return Number.NEGATIVE_INFINITY;if(A===""||typeof A=="string"&&A.trim().length!==A.length||typeof A!="string"&&typeof A!="number")break;const s=Number(A);if(Number.isNaN(s)||!Number.isFinite(s))break;return e==RA.FLOAT&&mV(s),s;case RA.INT32:case RA.FIXED32:case RA.SFIXED32:case RA.SINT32:case RA.UINT32:let r;if(typeof A=="number"?r=A:typeof A=="string"&&A.length>0&&A.trim().length===A.length&&(r=Number(A)),r===void 0)break;return e==RA.UINT32||e==RA.FIXED32?mZ(r):XH(r),r;case RA.INT64:case RA.SFIXED64:case RA.SINT64:if(typeof A!="number"&&typeof A!="string")break;const a=Tn.parse(A);return t?a.toString():a;case RA.FIXED64:case RA.UINT64:if(typeof A!="number"&&typeof A!="string")break;const o=Tn.uParse(A);return t?o.toString():o;case RA.BOOL:if(typeof A!="boolean")break;return A;case RA.STRING:if(typeof A!="string")break;try{encodeURIComponent(A)}catch{throw new Error("invalid UTF8")}return A;case RA.BYTES:if(A==="")return new Uint8Array(0);if(typeof A!="string")break;return TV.dec(A)}throw new Error}function ZZ(e,A,t,n){if(A===null)return e.typeName=="google.protobuf.NullValue"?0:n?e.values[0].no:KH;switch(typeof A){case"number":if(Number.isInteger(A))return A;break;case"string":const s=e.findName(A);if(s!==void 0)return s.no;if(t)return jH;break}throw new Error("cannot decode enum ".concat(e.typeName," from JSON: ").concat(yc(A)))}function rbA(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function OV(e,A,t){if(e.kind=="map"){ns(typeof A=="object"&&A!=null);const n={},s=Object.entries(A);switch(e.V.kind){case"scalar":for(const[a,o]of s)n[a.toString()]=_H(e.V.T,o);break;case"message":for(const[a,o]of s)n[a.toString()]=o.toJson(t);break;case"enum":const r=e.V.T;for(const[a,o]of s)n[a.toString()]=kZ(r,o,t.enumAsInteger);break}return t.emitDefaultValues||s.length>0?n:void 0}if(e.repeated){ns(Array.isArray(A));const n=[];switch(e.kind){case"scalar":for(let s=0;s<A.length;s++)n.push(_H(e.T,A[s]));break;case"enum":for(let s=0;s<A.length;s++)n.push(kZ(e.T,A[s],t.enumAsInteger));break;case"message":for(let s=0;s<A.length;s++)n.push(A[s].toJson(t));break}return t.emitDefaultValues||n.length>0?n:void 0}switch(e.kind){case"scalar":return _H(e.T,A);case"enum":return kZ(e.T,A,t.enumAsInteger);case"message":return NV(e.T,A).toJson(t)}}function kZ(e,A,t){var n;if(ns(typeof A=="number"),e.typeName=="google.protobuf.NullValue")return null;if(t)return A;const s=e.findNumber(A);return(n=s?.name)!==null&&n!==void 0?n:A}function _H(e,A){switch(e){case RA.INT32:case RA.SFIXED32:case RA.SINT32:case RA.FIXED32:case RA.UINT32:return ns(typeof A=="number"),A;case RA.FLOAT:case RA.DOUBLE:return ns(typeof A=="number"),Number.isNaN(A)?"NaN":A===Number.POSITIVE_INFINITY?"Infinity":A===Number.NEGATIVE_INFINITY?"-Infinity":A;case RA.STRING:return ns(typeof A=="string"),A;case RA.BOOL:return ns(typeof A=="boolean"),A;case RA.UINT64:case RA.FIXED64:case RA.INT64:case RA.SFIXED64:case RA.SINT64:return ns(typeof A=="bigint"||typeof A=="string"||typeof A=="number"),A.toString();case RA.BYTES:return ns(A instanceof Uint8Array),TV.enc(A)}}const Bw=Symbol("@bufbuild/protobuf/unknown-fields"),JV={readUnknownFields:!0,readerFactory:e=>new KQA(e)},KV={writeUnknownFields:!0,writerFactory:()=>new JQA};function abA(e){return e?Object.assign(Object.assign({},JV),e):JV}function ibA(e){return e?Object.assign(Object.assign({},KV),e):KV}function obA(){return{makeReadOptions:abA,makeWriteOptions:ibA,listUnknownFields(e){var A;return(A=e[Bw])!==null&&A!==void 0?A:[]},discardUnknownFields(e){delete e[Bw]},writeUnknownFields(e,A){const n=e[Bw];if(n)for(const s of n)A.tag(s.no,s.wireType).raw(s.data)},onUnknownField(e,A,t,n){const s=e;Array.isArray(s[Bw])||(s[Bw]=[]),s[Bw].push({no:A,wireType:t,data:n})},readMessage(e,A,t,n,s){const r=e.getType(),a=s?A.len:A.pos+t;let o,c;for(;A.pos<a&&([o,c]=A.tag(),!(s===!0&&c==hs.EndGroup));){const l=r.fields.find(o);if(!l){const g=A.skip(c,o);n.readUnknownFields&&this.onUnknownField(e,o,c,g);continue}jV(e,A,l,c,n)}if(s&&(c!=hs.EndGroup||o!==t))throw new Error("invalid end group tag")},readField:jV,writeMessage(e,A,t){const n=e.getType();for(const s of n.fields.byNumber()){if(!VV(s,e)){if(s.req)throw new Error("cannot encode field ".concat(n.typeName,".").concat(s.name," to binary: required field not set"));continue}const r=s.oneof?e[s.oneof.localName].value:e[s.localName];_V(s,r,A,t)}return t.writeUnknownFields&&this.writeUnknownFields(e,A),A},writeField(e,A,t,n){A!==void 0&&_V(e,A,t,n)}}}function jV(e,A,t,n,s){let{repeated:r,localName:a}=t;switch(t.oneof&&(e=e[t.oneof.localName],e.case!=a&&delete e.value,e.case=a,a="value"),t.kind){case"scalar":case"enum":const o=t.kind=="enum"?RA.INT32:t.T;let c=$H;if(t.kind=="scalar"&&t.L>0&&(c=cbA),r){let f=e[a];if(n==hs.LengthDelimited&&o!=RA.STRING&&o!=RA.BYTES){let v=A.uint32()+A.pos;for(;A.pos<v;)f.push(c(A,o))}else f.push(c(A,o))}else e[a]=c(A,o);break;case"message":const l=t.T;r?e[a].push(qH(A,new l,s,t)):Jl(e[a])?qH(A,e[a],s,t):(e[a]=qH(A,new l,s,t),l.fieldWrapper&&!t.oneof&&!t.repeated&&(e[a]=l.fieldWrapper.unwrapField(e[a])));break;case"map":let[g,u]=BbA(t,A,s);e[a][g]=u;break}}function qH(e,A,t,n){const s=A.getType().runtime.bin,r=n?.delimited;return s.readMessage(A,e,r?n.no:e.uint32(),t,r),A}function BbA(e,A,t){const n=A.uint32(),s=A.pos+n;let r,a;for(;A.pos<s;){const[o]=A.tag();switch(o){case 1:r=$H(A,e.K);break;case 2:switch(e.V.kind){case"scalar":a=$H(A,e.V.T);break;case"enum":a=A.int32();break;case"message":a=qH(A,new e.V.T,t,void 0);break}break}}if(r===void 0&&(r=ow(e.K,Hd.BIGINT)),typeof r!="string"&&typeof r!="number"&&(r=r.toString()),a===void 0)switch(e.V.kind){case"scalar":a=ow(e.V.T,Hd.BIGINT);break;case"enum":a=e.V.T.values[0].no;break;case"message":a=new e.V.T;break}return[r,a]}function cbA(e,A){const t=$H(e,A);return typeof t=="bigint"?t.toString():t}function $H(e,A){switch(A){case RA.STRING:return e.string();case RA.BOOL:return e.bool();case RA.DOUBLE:return e.double();case RA.FLOAT:return e.float();case RA.INT32:return e.int32();case RA.INT64:return e.int64();case RA.UINT64:return e.uint64();case RA.FIXED64:return e.fixed64();case RA.BYTES:return e.bytes();case RA.FIXED32:return e.fixed32();case RA.SFIXED32:return e.sfixed32();case RA.SFIXED64:return e.sfixed64();case RA.SINT64:return e.sint64();case RA.UINT32:return e.uint32();case RA.SINT32:return e.sint32()}}function _V(e,A,t,n){ns(A!==void 0);const s=e.repeated;switch(e.kind){case"scalar":case"enum":let r=e.kind=="enum"?RA.INT32:e.T;if(s)if(ns(Array.isArray(A)),e.packed)gbA(t,r,e.no,A);else for(const a of A)nC(t,r,e.no,a);else nC(t,r,e.no,A);break;case"message":if(s){ns(Array.isArray(A));for(const a of A)qV(t,n,e,a)}else qV(t,n,e,A);break;case"map":ns(typeof A=="object"&&A!=null);for(const[a,o]of Object.entries(A))lbA(t,n,e,a,o);break}}function lbA(e,A,t,n,s){e.tag(t.no,hs.LengthDelimited),e.fork();let r=n;switch(t.K){case RA.INT32:case RA.FIXED32:case RA.UINT32:case RA.SFIXED32:case RA.SINT32:r=Number.parseInt(n);break;case RA.BOOL:ns(n=="true"||n=="false"),r=n=="true";break}switch(nC(e,t.K,1,r),t.V.kind){case"scalar":nC(e,t.V.T,2,s);break;case"enum":nC(e,RA.INT32,2,s);break;case"message":ns(s!==void 0),e.tag(2,hs.LengthDelimited).bytes(s.toBinary(A));break}e.join()}function qV(e,A,t,n){const s=NV(t.T,n);t.delimited?e.tag(t.no,hs.StartGroup).raw(s.toBinary(A)).tag(t.no,hs.EndGroup):e.tag(t.no,hs.LengthDelimited).bytes(s.toBinary(A))}function nC(e,A,t,n){ns(n!==void 0);let[s,r]=$V(A);e.tag(t,s)[r](n)}function gbA(e,A,t,n){if(!n.length)return;e.tag(t,hs.LengthDelimited).fork();let[,s]=$V(A);for(let r=0;r<n.length;r++)e[s](n[r]);e.join()}function $V(e){let A=hs.Varint;switch(e){case RA.BYTES:case RA.STRING:A=hs.LengthDelimited;break;case RA.DOUBLE:case RA.FIXED64:case RA.SFIXED64:A=hs.Bit64;break;case RA.FIXED32:case RA.SFIXED32:case RA.FLOAT:A=hs.Bit32;break}const t=RA[e].toLowerCase();return[A,t]}function dbA(){return{setEnumType:yV,initPartial(e,A){if(e===void 0)return;const t=A.getType();for(const n of t.fields.byMember()){const s=n.localName,r=A,a=e;if(a[s]!=null)switch(n.kind){case"oneof":const o=a[s].case;if(o===void 0)continue;const c=n.findField(o);let l=a[s].value;c&&c.kind=="message"&&!Jl(l,c.T)?l=new c.T(l):c&&c.kind==="scalar"&&c.T===RA.BYTES&&(l=sC(l)),r[s]={case:o,value:l};break;case"scalar":case"enum":let g=a[s];n.T===RA.BYTES&&(g=n.repeated?g.map(sC):sC(g)),r[s]=g;break;case"map":switch(n.V.kind){case"scalar":case"enum":if(n.V.T===RA.BYTES)for(const[w,v]of Object.entries(a[s]))r[s][w]=sC(v);else Object.assign(r[s],a[s]);break;case"message":const f=n.V.T;for(const w of Object.keys(a[s])){let v=a[s][w];f.fieldWrapper||(v=new f(v)),r[s][w]=v}break}break;case"message":const u=n.T;if(n.repeated)r[s]=a[s].map(f=>Jl(f,u)?f:new u(f));else{const f=a[s];u.fieldWrapper?u.typeName==="google.protobuf.BytesValue"?r[s]=sC(f):r[s]=f:r[s]=Jl(f,u)?f:new u(f)}break}}},equals(e,A,t){return A===t?!0:!A||!t?!1:e.fields.byMember().every(n=>{const s=A[n.localName],r=t[n.localName];if(n.repeated){if(s.length!==r.length)return!1;switch(n.kind){case"message":return s.every((a,o)=>n.T.equals(a,r[o]));case"scalar":return s.every((a,o)=>md(n.T,a,r[o]));case"enum":return s.every((a,o)=>md(RA.INT32,a,r[o]))}throw new Error("repeated cannot contain ".concat(n.kind))}switch(n.kind){case"message":let a=s,o=r;return n.T.fieldWrapper&&(a!==void 0&&!Jl(a)&&(a=n.T.fieldWrapper.wrapField(a)),o!==void 0&&!Jl(o)&&(o=n.T.fieldWrapper.wrapField(o))),n.T.equals(a,o);case"enum":return md(RA.INT32,s,r);case"scalar":return md(n.T,s,r);case"oneof":if(s.case!==r.case)return!1;const c=n.findField(s.case);if(c===void 0)return!0;switch(c.kind){case"message":return c.T.equals(s.value,r.value);case"enum":return md(RA.INT32,s.value,r.value);case"scalar":return md(c.T,s.value,r.value)}throw new Error("oneof cannot contain ".concat(c.kind));case"map":const l=Object.keys(s).concat(Object.keys(r));switch(n.V.kind){case"message":const g=n.V.T;return l.every(f=>g.equals(s[f],r[f]));case"enum":return l.every(f=>md(RA.INT32,s[f],r[f]));case"scalar":const u=n.V.T;return l.every(f=>md(u,s[f],r[f]))}break}})},clone(e){const A=e.getType(),t=new A,n=t;for(const s of A.fields.byMember()){const r=e[s.localName];let a;if(s.repeated)a=r.map(Am);else if(s.kind=="map"){a=n[s.localName];for(const[o,c]of Object.entries(r))a[o]=Am(c)}else s.kind=="oneof"?a=s.findField(r.case)?{case:r.case,value:Am(r.value)}:{case:void 0}:a=Am(r);n[s.localName]=a}for(const s of A.runtime.bin.listUnknownFields(e))A.runtime.bin.onUnknownField(n,s.no,s.wireType,s.data);return t}}}function Am(e){if(e===void 0)return e;if(Jl(e))return e.clone();if(e instanceof Uint8Array){const A=new Uint8Array(e.byteLength);return A.set(e),A}return e}function sC(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function ubA(e,A,t){return{syntax:e,json:nbA(),bin:obA(),util:Object.assign(Object.assign({},dbA()),{newFieldList:A,initFields:t}),makeMessageType(n,s,r){return WQA(this,n,s,r)},makeEnum:VQA,makeEnumType:YV,getEnumType:SQA,makeExtension(n,s,r){return jQA(this,n,s,r)}}}class GbA{constructor(A,t){this._fields=A,this._normalizer=t}findJsonName(A){if(!this.jsonNames){const t={};for(const n of this.list())t[n.jsonName]=t[n.name]=n;this.jsonNames=t}return this.jsonNames[A]}find(A){if(!this.numbers){const t={};for(const n of this.list())t[n.no]=n;this.numbers=t}return this.numbers[A]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((A,t)=>A.no-t.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const A=this.members;let t;for(const n of this.list())n.oneof?n.oneof!==t&&(t=n.oneof,A.push(t)):A.push(n)}return this.members}}function A8(e,A){const t=e8(e);return A?t:CbA(bbA(t))}function fbA(e){return A8(e,!1)}const hbA=e8;function e8(e){let A=!1;const t=[];for(let n=0;n<e.length;n++){let s=e.charAt(n);switch(s){case"_":A=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":t.push(s),A=!1;break;default:A&&(A=!1,s=s.toUpperCase()),t.push(s);break}}return t.join("")}const wbA=new Set(["constructor","toString","toJSON","valueOf"]),QbA=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),t8=e=>"".concat(e,"$"),bbA=e=>QbA.has(e)?t8(e):e,CbA=e=>wbA.has(e)?t8(e):e;class vbA{constructor(A){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=A,this.localName=fbA(A)}addField(A){ns(A.oneof===this,"field ".concat(A.name," not one of ").concat(this.name)),this.fields.push(A)}findField(A){if(!this._lookup){this._lookup=Object.create(null);for(let t=0;t<this.fields.length;t++)this._lookup[this.fields[t].localName]=this.fields[t]}return this._lookup[A]}}function IbA(e,A){var t,n,s,r,a,o;const c=[];let l;for(const g of typeof e=="function"?e():e){const u=g;if(u.localName=A8(g.name,g.oneof!==void 0),u.jsonName=(t=g.jsonName)!==null&&t!==void 0?t:hbA(g.name),u.repeated=(n=g.repeated)!==null&&n!==void 0?n:!1,g.kind=="scalar"&&(u.L=(s=g.L)!==null&&s!==void 0?s:Hd.BIGINT),u.delimited=(r=g.delimited)!==null&&r!==void 0?r:!1,u.req=(a=g.req)!==null&&a!==void 0?a:!1,u.opt=(o=g.opt)!==null&&o!==void 0?o:!1,g.packed===void 0&&(u.packed=g.kind=="enum"||g.kind=="scalar"&&g.T!=RA.BYTES&&g.T!=RA.STRING),g.oneof!==void 0){const f=typeof g.oneof=="string"?g.oneof:g.oneof.name;(!l||l.name!=f)&&(l=new vbA(f)),u.oneof=l,l.addField(u)}c.push(u)}return c}const GA=ubA("proto3",e=>new GbA(e,A=>IbA(A)),e=>{for(const A of e.getType().fields.byMember()){if(A.opt)continue;const t=A.localName,n=e;if(A.repeated){n[t]=[];continue}switch(A.kind){case"oneof":n[t]={case:void 0};break;case"enum":n[t]=0;break;case"map":n[t]={};break;case"scalar":n[t]=ow(A.T,A.L);break}}});class qa extends EZ{constructor(A){super(),this.seconds=Tn.zero,this.nanos=0,GA.util.initPartial(A,this)}fromJson(A,t){if(typeof A!="string")throw new Error("cannot decode google.protobuf.Timestamp from JSON: ".concat(GA.json.debug(A)));const n=A.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!n)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const s=Date.parse(n[1]+"-"+n[2]+"-"+n[3]+"T"+n[4]+":"+n[5]+":"+n[6]+(n[8]?n[8]:"Z"));if(Number.isNaN(s))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(s<Date.parse("0001-01-01T00:00:00Z")||s>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=Tn.parse(s/1e3),this.nanos=0,n[7]&&(this.nanos=parseInt("1"+n[7]+"0".repeat(9-n[7].length))-1e9),this}toJson(A){const t=Number(this.seconds)*1e3;if(t<Date.parse("0001-01-01T00:00:00Z")||t>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let n="Z";if(this.nanos>0){const s=(this.nanos+1e9).toString().substring(1);s.substring(3)==="000000"?n="."+s.substring(0,3)+"Z":s.substring(6)==="000"?n="."+s.substring(0,6)+"Z":n="."+s+"Z"}return new Date(t).toISOString().replace(".000Z",n)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return qa.fromDate(new Date)}static fromDate(A){const t=A.getTime();return new qa({seconds:Tn.parse(Math.floor(t/1e3)),nanos:t%1e3*1e6})}static fromBinary(A,t){return new qa().fromBinary(A,t)}static fromJson(A,t){return new qa().fromJson(A,t)}static fromJsonString(A,t){return new qa().fromJsonString(A,t)}static equals(A,t){return GA.util.equals(qa,A,t)}}qa.runtime=GA,qa.typeName="google.protobuf.Timestamp",qa.fields=GA.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);const pbA=GA.makeMessageType("livekit.MetricsBatch",()=>[{no:1,name:"timestamp_ms",kind:"scalar",T:3},{no:2,name:"normalized_timestamp",kind:"message",T:qa},{no:3,name:"str_data",kind:"scalar",T:9,repeated:!0},{no:4,name:"time_series",kind:"message",T:HbA,repeated:!0},{no:5,name:"events",kind:"message",T:EbA,repeated:!0}]),HbA=GA.makeMessageType("livekit.TimeSeriesMetric",()=>[{no:1,name:"label",kind:"scalar",T:13},{no:2,name:"participant_identity",kind:"scalar",T:13},{no:3,name:"track_sid",kind:"scalar",T:13},{no:4,name:"samples",kind:"message",T:mbA,repeated:!0},{no:5,name:"rid",kind:"scalar",T:13}]),mbA=GA.makeMessageType("livekit.MetricSample",()=>[{no:1,name:"timestamp_ms",kind:"scalar",T:3},{no:2,name:"normalized_timestamp",kind:"message",T:qa},{no:3,name:"value",kind:"scalar",T:2}]),EbA=GA.makeMessageType("livekit.EventMetric",()=>[{no:1,name:"label",kind:"scalar",T:13},{no:2,name:"participant_identity",kind:"scalar",T:13},{no:3,name:"track_sid",kind:"scalar",T:13},{no:4,name:"start_timestamp_ms",kind:"scalar",T:3},{no:5,name:"end_timestamp_ms",kind:"scalar",T:3,opt:!0},{no:6,name:"normalized_start_timestamp",kind:"message",T:qa},{no:7,name:"normalized_end_timestamp",kind:"message",T:qa,opt:!0},{no:8,name:"metadata",kind:"scalar",T:9},{no:9,name:"rid",kind:"scalar",T:13}]),n8=GA.makeEnum("livekit.BackupCodecPolicy",[{no:0,name:"PREFER_REGRESSION"},{no:1,name:"SIMULCAST"},{no:2,name:"REGRESSION"}]),wB=GA.makeEnum("livekit.TrackType",[{no:0,name:"AUDIO"},{no:1,name:"VIDEO"},{no:2,name:"DATA"}]),Ms=GA.makeEnum("livekit.TrackSource",[{no:0,name:"UNKNOWN"},{no:1,name:"CAMERA"},{no:2,name:"MICROPHONE"},{no:3,name:"SCREEN_SHARE"},{no:4,name:"SCREEN_SHARE_AUDIO"}]),UZ=GA.makeEnum("livekit.VideoQuality",[{no:0,name:"LOW"},{no:1,name:"MEDIUM"},{no:2,name:"HIGH"},{no:3,name:"OFF"}]),rC=GA.makeEnum("livekit.ConnectionQuality",[{no:0,name:"POOR"},{no:1,name:"GOOD"},{no:2,name:"EXCELLENT"},{no:3,name:"LOST"}]),aC=GA.makeEnum("livekit.ClientConfigSetting",[{no:0,name:"UNSET"},{no:1,name:"DISABLED"},{no:2,name:"ENABLED"}]),QB=GA.makeEnum("livekit.DisconnectReason",[{no:0,name:"UNKNOWN_REASON"},{no:1,name:"CLIENT_INITIATED"},{no:2,name:"DUPLICATE_IDENTITY"},{no:3,name:"SERVER_SHUTDOWN"},{no:4,name:"PARTICIPANT_REMOVED"},{no:5,name:"ROOM_DELETED"},{no:6,name:"STATE_MISMATCH"},{no:7,name:"JOIN_FAILURE"},{no:8,name:"MIGRATION"},{no:9,name:"SIGNAL_CLOSE"},{no:10,name:"ROOM_CLOSED"},{no:11,name:"USER_UNAVAILABLE"},{no:12,name:"USER_REJECTED"},{no:13,name:"SIP_TRUNK_FAILURE"},{no:14,name:"CONNECTION_TIMEOUT"},{no:15,name:"MEDIA_FAILURE"}]),NG=GA.makeEnum("livekit.ReconnectReason",[{no:0,name:"RR_UNKNOWN"},{no:1,name:"RR_SIGNAL_DISCONNECTED"},{no:2,name:"RR_PUBLISHER_FAILED"},{no:3,name:"RR_SUBSCRIBER_FAILED"},{no:4,name:"RR_SWITCH_CANDIDATE"}]),ybA=GA.makeEnum("livekit.SubscriptionError",[{no:0,name:"SE_UNKNOWN"},{no:1,name:"SE_CODEC_UNSUPPORTED"},{no:2,name:"SE_TRACK_NOTFOUND"}]),Cr=GA.makeEnum("livekit.AudioTrackFeature",[{no:0,name:"TF_STEREO"},{no:1,name:"TF_NO_DTX"},{no:2,name:"TF_AUTO_GAIN_CONTROL"},{no:3,name:"TF_ECHO_CANCELLATION"},{no:4,name:"TF_NOISE_SUPPRESSION"},{no:5,name:"TF_ENHANCED_NOISE_CANCELLATION"},{no:6,name:"TF_PRECONNECT_BUFFER"}]),em=GA.makeMessageType("livekit.Room",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"empty_timeout",kind:"scalar",T:13},{no:14,name:"departure_timeout",kind:"scalar",T:13},{no:4,name:"max_participants",kind:"scalar",T:13},{no:5,name:"creation_time",kind:"scalar",T:3},{no:15,name:"creation_time_ms",kind:"scalar",T:3},{no:6,name:"turn_password",kind:"scalar",T:9},{no:7,name:"enabled_codecs",kind:"message",T:tm,repeated:!0},{no:8,name:"metadata",kind:"scalar",T:9},{no:9,name:"num_participants",kind:"scalar",T:13},{no:11,name:"num_publishers",kind:"scalar",T:13},{no:10,name:"active_recording",kind:"scalar",T:8},{no:13,name:"version",kind:"message",T:h8}]),tm=GA.makeMessageType("livekit.Codec",()=>[{no:1,name:"mime",kind:"scalar",T:9},{no:2,name:"fmtp_line",kind:"scalar",T:9}]),YbA=GA.makeMessageType("livekit.ParticipantPermission",()=>[{no:1,name:"can_subscribe",kind:"scalar",T:8},{no:2,name:"can_publish",kind:"scalar",T:8},{no:3,name:"can_publish_data",kind:"scalar",T:8},{no:9,name:"can_publish_sources",kind:"enum",T:GA.getEnumType(Ms),repeated:!0},{no:7,name:"hidden",kind:"scalar",T:8},{no:8,name:"recorder",kind:"scalar",T:8},{no:10,name:"can_update_metadata",kind:"scalar",T:8},{no:11,name:"agent",kind:"scalar",T:8},{no:12,name:"can_subscribe_metrics",kind:"scalar",T:8}]),zG=GA.makeMessageType("livekit.ParticipantInfo",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"identity",kind:"scalar",T:9},{no:3,name:"state",kind:"enum",T:GA.getEnumType(cw)},{no:4,name:"tracks",kind:"message",T:lw,repeated:!0},{no:5,name:"metadata",kind:"scalar",T:9},{no:6,name:"joined_at",kind:"scalar",T:3},{no:17,name:"joined_at_ms",kind:"scalar",T:3},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"version",kind:"scalar",T:13},{no:11,name:"permission",kind:"message",T:YbA},{no:12,name:"region",kind:"scalar",T:9},{no:13,name:"is_publisher",kind:"scalar",T:8},{no:14,name:"kind",kind:"enum",T:GA.getEnumType(iC)},{no:15,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:16,name:"disconnect_reason",kind:"enum",T:GA.getEnumType(QB)},{no:18,name:"kind_details",kind:"enum",T:GA.getEnumType(ZbA),repeated:!0},{no:19,name:"data_tracks",kind:"message",T:nm,repeated:!0}]),cw=GA.makeEnum("livekit.ParticipantInfo.State",[{no:0,name:"JOINING"},{no:1,name:"JOINED"},{no:2,name:"ACTIVE"},{no:3,name:"DISCONNECTED"}]),iC=GA.makeEnum("livekit.ParticipantInfo.Kind",[{no:0,name:"STANDARD"},{no:1,name:"INGRESS"},{no:2,name:"EGRESS"},{no:3,name:"SIP"},{no:4,name:"AGENT"},{no:7,name:"CONNECTOR"},{no:8,name:"BRIDGE"}]),ZbA=GA.makeEnum("livekit.ParticipantInfo.KindDetail",[{no:0,name:"CLOUD_AGENT"},{no:1,name:"FORWARDED"},{no:2,name:"CONNECTOR_WHATSAPP"},{no:3,name:"CONNECTOR_TWILIO"},{no:4,name:"BRIDGE_RTSP"}]),cn=GA.makeEnum("livekit.Encryption.Type",[{no:0,name:"NONE"},{no:1,name:"GCM"},{no:2,name:"CUSTOM"}]),kbA=GA.makeMessageType("livekit.SimulcastCodecInfo",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"mid",kind:"scalar",T:9},{no:3,name:"cid",kind:"scalar",T:9},{no:4,name:"layers",kind:"message",T:Ed,repeated:!0},{no:5,name:"video_layer_mode",kind:"enum",T:GA.getEnumType(s8)},{no:6,name:"sdp_cid",kind:"scalar",T:9}]),lw=GA.makeMessageType("livekit.TrackInfo",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:GA.getEnumType(wB)},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"muted",kind:"scalar",T:8},{no:5,name:"width",kind:"scalar",T:13},{no:6,name:"height",kind:"scalar",T:13},{no:7,name:"simulcast",kind:"scalar",T:8},{no:8,name:"disable_dtx",kind:"scalar",T:8},{no:9,name:"source",kind:"enum",T:GA.getEnumType(Ms)},{no:10,name:"layers",kind:"message",T:Ed,repeated:!0},{no:11,name:"mime_type",kind:"scalar",T:9},{no:12,name:"mid",kind:"scalar",T:9},{no:13,name:"codecs",kind:"message",T:kbA,repeated:!0},{no:14,name:"stereo",kind:"scalar",T:8},{no:15,name:"disable_red",kind:"scalar",T:8},{no:16,name:"encryption",kind:"enum",T:GA.getEnumType(cn)},{no:17,name:"stream",kind:"scalar",T:9},{no:18,name:"version",kind:"message",T:h8},{no:19,name:"audio_features",kind:"enum",T:GA.getEnumType(Cr),repeated:!0},{no:20,name:"backup_codec_policy",kind:"enum",T:GA.getEnumType(n8)}]),nm=GA.makeMessageType("livekit.DataTrackInfo",()=>[{no:1,name:"pub_handle",kind:"scalar",T:13},{no:2,name:"sid",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"encryption",kind:"enum",T:GA.getEnumType(cn)}]),UbA=GA.makeMessageType("livekit.DataTrackSubscriptionOptions",()=>[{no:1,name:"target_fps",kind:"scalar",T:13,opt:!0}]),Ed=GA.makeMessageType("livekit.VideoLayer",()=>[{no:1,name:"quality",kind:"enum",T:GA.getEnumType(UZ)},{no:2,name:"width",kind:"scalar",T:13},{no:3,name:"height",kind:"scalar",T:13},{no:4,name:"bitrate",kind:"scalar",T:13},{no:5,name:"ssrc",kind:"scalar",T:13},{no:6,name:"spatial_layer",kind:"scalar",T:5},{no:7,name:"rid",kind:"scalar",T:9},{no:8,name:"repair_ssrc",kind:"scalar",T:13}]),s8=GA.makeEnum("livekit.VideoLayer.Mode",[{no:0,name:"MODE_UNUSED"},{no:1,name:"ONE_SPATIAL_LAYER_PER_STREAM"},{no:2,name:"MULTIPLE_SPATIAL_LAYERS_PER_STREAM"},{no:3,name:"ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR"}]),wa=GA.makeMessageType("livekit.DataPacket",()=>[{no:1,name:"kind",kind:"enum",T:GA.getEnumType(LG)},{no:4,name:"participant_identity",kind:"scalar",T:9},{no:5,name:"destination_identities",kind:"scalar",T:9,repeated:!0},{no:2,name:"user",kind:"message",T:DZ,oneof:"value"},{no:3,name:"speaker",kind:"message",T:DbA,oneof:"value"},{no:6,name:"sip_dtmf",kind:"message",T:o8,oneof:"value"},{no:7,name:"transcription",kind:"message",T:FbA,oneof:"value"},{no:8,name:"metrics",kind:"message",T:pbA,oneof:"value"},{no:9,name:"chat_message",kind:"message",T:sm,oneof:"value"},{no:10,name:"rpc_request",kind:"message",T:FZ,oneof:"value"},{no:11,name:"rpc_ack",kind:"message",T:MZ,oneof:"value"},{no:12,name:"rpc_response",kind:"message",T:xZ,oneof:"value"},{no:13,name:"stream_header",kind:"message",T:rm,oneof:"value"},{no:14,name:"stream_chunk",kind:"message",T:am,oneof:"value"},{no:15,name:"stream_trailer",kind:"message",T:im,oneof:"value"},{no:18,name:"encrypted_packet",kind:"message",T:r8,oneof:"value"},{no:16,name:"sequence",kind:"scalar",T:13},{no:17,name:"participant_sid",kind:"scalar",T:9}]),LG=GA.makeEnum("livekit.DataPacket.Kind",[{no:0,name:"RELIABLE"},{no:1,name:"LOSSY"}]),r8=GA.makeMessageType("livekit.EncryptedPacket",()=>[{no:1,name:"encryption_type",kind:"enum",T:GA.getEnumType(cn)},{no:2,name:"iv",kind:"scalar",T:12},{no:3,name:"key_index",kind:"scalar",T:13},{no:4,name:"encrypted_value",kind:"scalar",T:12}]),a8=GA.makeMessageType("livekit.EncryptedPacketPayload",()=>[{no:1,name:"user",kind:"message",T:DZ,oneof:"value"},{no:3,name:"chat_message",kind:"message",T:sm,oneof:"value"},{no:4,name:"rpc_request",kind:"message",T:FZ,oneof:"value"},{no:5,name:"rpc_ack",kind:"message",T:MZ,oneof:"value"},{no:6,name:"rpc_response",kind:"message",T:xZ,oneof:"value"},{no:7,name:"stream_header",kind:"message",T:rm,oneof:"value"},{no:8,name:"stream_chunk",kind:"message",T:am,oneof:"value"},{no:9,name:"stream_trailer",kind:"message",T:im,oneof:"value"}]),DbA=GA.makeMessageType("livekit.ActiveSpeakerUpdate",()=>[{no:1,name:"speakers",kind:"message",T:i8,repeated:!0}]),i8=GA.makeMessageType("livekit.SpeakerInfo",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:2},{no:3,name:"active",kind:"scalar",T:8}]),DZ=GA.makeMessageType("livekit.UserPacket",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:5,name:"participant_identity",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:12},{no:3,name:"destination_sids",kind:"scalar",T:9,repeated:!0},{no:6,name:"destination_identities",kind:"scalar",T:9,repeated:!0},{no:4,name:"topic",kind:"scalar",T:9,opt:!0},{no:8,name:"id",kind:"scalar",T:9,opt:!0},{no:9,name:"start_time",kind:"scalar",T:4,opt:!0},{no:10,name:"end_time",kind:"scalar",T:4,opt:!0},{no:11,name:"nonce",kind:"scalar",T:12}]),o8=GA.makeMessageType("livekit.SipDTMF",()=>[{no:3,name:"code",kind:"scalar",T:13},{no:4,name:"digit",kind:"scalar",T:9}]),FbA=GA.makeMessageType("livekit.Transcription",()=>[{no:2,name:"transcribed_participant_identity",kind:"scalar",T:9},{no:3,name:"track_id",kind:"scalar",T:9},{no:4,name:"segments",kind:"message",T:MbA,repeated:!0}]),MbA=GA.makeMessageType("livekit.TranscriptionSegment",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"start_time",kind:"scalar",T:4},{no:4,name:"end_time",kind:"scalar",T:4},{no:5,name:"final",kind:"scalar",T:8},{no:6,name:"language",kind:"scalar",T:9}]),sm=GA.makeMessageType("livekit.ChatMessage",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"timestamp",kind:"scalar",T:3},{no:3,name:"edit_timestamp",kind:"scalar",T:3,opt:!0},{no:4,name:"message",kind:"scalar",T:9},{no:5,name:"deleted",kind:"scalar",T:8},{no:6,name:"generated",kind:"scalar",T:8}]),FZ=GA.makeMessageType("livekit.RpcRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"method",kind:"scalar",T:9},{no:3,name:"payload",kind:"scalar",T:9},{no:4,name:"response_timeout_ms",kind:"scalar",T:13},{no:5,name:"version",kind:"scalar",T:13}]),MZ=GA.makeMessageType("livekit.RpcAck",()=>[{no:1,name:"request_id",kind:"scalar",T:9}]),xZ=GA.makeMessageType("livekit.RpcResponse",()=>[{no:1,name:"request_id",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:9,oneof:"value"},{no:3,name:"error",kind:"message",T:B8,oneof:"value"}]),B8=GA.makeMessageType("livekit.RpcError",()=>[{no:1,name:"code",kind:"scalar",T:13},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"data",kind:"scalar",T:9}]),c8=GA.makeMessageType("livekit.ParticipantTracks",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"track_sids",kind:"scalar",T:9,repeated:!0}]),l8=GA.makeMessageType("livekit.ServerInfo",()=>[{no:1,name:"edition",kind:"enum",T:GA.getEnumType(g8)},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"protocol",kind:"scalar",T:5},{no:4,name:"region",kind:"scalar",T:9},{no:5,name:"node_id",kind:"scalar",T:9},{no:6,name:"debug_info",kind:"scalar",T:9},{no:7,name:"agent_protocol",kind:"scalar",T:5}]),g8=GA.makeEnum("livekit.ServerInfo.Edition",[{no:0,name:"Standard"},{no:1,name:"Cloud"}]),d8=GA.makeMessageType("livekit.ClientInfo",()=>[{no:1,name:"sdk",kind:"enum",T:GA.getEnumType(u8)},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"protocol",kind:"scalar",T:5},{no:4,name:"os",kind:"scalar",T:9},{no:5,name:"os_version",kind:"scalar",T:9},{no:6,name:"device_model",kind:"scalar",T:9},{no:7,name:"browser",kind:"scalar",T:9},{no:8,name:"browser_version",kind:"scalar",T:9},{no:9,name:"address",kind:"scalar",T:9},{no:10,name:"network",kind:"scalar",T:9},{no:11,name:"other_sdks",kind:"scalar",T:9}]),u8=GA.makeEnum("livekit.ClientInfo.SDK",[{no:0,name:"UNKNOWN"},{no:1,name:"JS"},{no:2,name:"SWIFT"},{no:3,name:"ANDROID"},{no:4,name:"FLUTTER"},{no:5,name:"GO"},{no:6,name:"UNITY"},{no:7,name:"REACT_NATIVE"},{no:8,name:"RUST"},{no:9,name:"PYTHON"},{no:10,name:"CPP"},{no:11,name:"UNITY_WEB"},{no:12,name:"NODE"},{no:13,name:"UNREAL"},{no:14,name:"ESP32"}]),G8=GA.makeMessageType("livekit.ClientConfiguration",()=>[{no:1,name:"video",kind:"message",T:f8},{no:2,name:"screen",kind:"message",T:f8},{no:3,name:"resume_connection",kind:"enum",T:GA.getEnumType(aC)},{no:4,name:"disabled_codecs",kind:"message",T:xbA},{no:5,name:"force_relay",kind:"enum",T:GA.getEnumType(aC)}]),f8=GA.makeMessageType("livekit.VideoConfiguration",()=>[{no:1,name:"hardware_encoder",kind:"enum",T:GA.getEnumType(aC)}]),xbA=GA.makeMessageType("livekit.DisabledCodecs",()=>[{no:1,name:"codecs",kind:"message",T:tm,repeated:!0},{no:2,name:"publish",kind:"message",T:tm,repeated:!0}]),h8=GA.makeMessageType("livekit.TimedVersion",()=>[{no:1,name:"unix_micro",kind:"scalar",T:3},{no:2,name:"ticks",kind:"scalar",T:5}]),PZ=GA.makeEnum("livekit.DataStream.OperationType",[{no:0,name:"CREATE"},{no:1,name:"UPDATE"},{no:2,name:"DELETE"},{no:3,name:"REACTION"}]),w8=GA.makeMessageType("livekit.DataStream.TextHeader",()=>[{no:1,name:"operation_type",kind:"enum",T:GA.getEnumType(PZ)},{no:2,name:"version",kind:"scalar",T:5},{no:3,name:"reply_to_stream_id",kind:"scalar",T:9},{no:4,name:"attached_stream_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"generated",kind:"scalar",T:8}],{localName:"DataStream_TextHeader"}),Q8=GA.makeMessageType("livekit.DataStream.ByteHeader",()=>[{no:1,name:"name",kind:"scalar",T:9}],{localName:"DataStream_ByteHeader"}),rm=GA.makeMessageType("livekit.DataStream.Header",()=>[{no:1,name:"stream_id",kind:"scalar",T:9},{no:2,name:"timestamp",kind:"scalar",T:3},{no:3,name:"topic",kind:"scalar",T:9},{no:4,name:"mime_type",kind:"scalar",T:9},{no:5,name:"total_length",kind:"scalar",T:4,opt:!0},{no:7,name:"encryption_type",kind:"enum",T:GA.getEnumType(cn)},{no:8,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:9,name:"text_header",kind:"message",T:w8,oneof:"content_header"},{no:10,name:"byte_header",kind:"message",T:Q8,oneof:"content_header"}],{localName:"DataStream_Header"}),am=GA.makeMessageType("livekit.DataStream.Chunk",()=>[{no:1,name:"stream_id",kind:"scalar",T:9},{no:2,name:"chunk_index",kind:"scalar",T:4},{no:3,name:"content",kind:"scalar",T:12},{no:4,name:"version",kind:"scalar",T:5},{no:5,name:"iv",kind:"scalar",T:12,opt:!0}],{localName:"DataStream_Chunk"}),im=GA.makeMessageType("livekit.DataStream.Trailer",()=>[{no:1,name:"stream_id",kind:"scalar",T:9},{no:2,name:"reason",kind:"scalar",T:9},{no:3,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}}],{localName:"DataStream_Trailer"}),PbA=GA.makeMessageType("livekit.SubscribedAudioCodec",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"enabled",kind:"scalar",T:8}]),bB=GA.makeEnum("livekit.SignalTarget",[{no:0,name:"PUBLISHER"},{no:1,name:"SUBSCRIBER"}]),TZ=GA.makeEnum("livekit.StreamState",[{no:0,name:"ACTIVE"},{no:1,name:"PAUSED"}]),TbA=GA.makeEnum("livekit.CandidateProtocol",[{no:0,name:"UDP"},{no:1,name:"TCP"},{no:2,name:"TLS"}]),RbA=GA.makeMessageType("livekit.SignalRequest",()=>[{no:1,name:"offer",kind:"message",T:yd,oneof:"message"},{no:2,name:"answer",kind:"message",T:yd,oneof:"message"},{no:3,name:"trickle",kind:"message",T:om,oneof:"message"},{no:4,name:"add_track",kind:"message",T:oC,oneof:"message"},{no:5,name:"mute",kind:"message",T:Bm,oneof:"message"},{no:6,name:"subscription",kind:"message",T:cm,oneof:"message"},{no:7,name:"track_setting",kind:"message",T:I8,oneof:"message"},{no:8,name:"leave",kind:"message",T:lm,oneof:"message"},{no:10,name:"update_layers",kind:"message",T:H8,oneof:"message"},{no:11,name:"subscription_permission",kind:"message",T:y8,oneof:"message"},{no:12,name:"sync_state",kind:"message",T:OZ,oneof:"message"},{no:13,name:"simulate",kind:"message",T:Yc,oneof:"message"},{no:14,name:"ping",kind:"scalar",T:3,oneof:"message"},{no:15,name:"update_metadata",kind:"message",T:LZ,oneof:"message"},{no:16,name:"ping_req",kind:"message",T:k8,oneof:"message"},{no:17,name:"update_audio_track",kind:"message",T:zZ,oneof:"message"},{no:18,name:"update_video_track",kind:"message",T:p8,oneof:"message"},{no:19,name:"publish_data_track_request",kind:"message",T:SZ,oneof:"message"},{no:20,name:"unpublish_data_track_request",kind:"message",T:WZ,oneof:"message"},{no:21,name:"update_data_subscription",kind:"message",T:C8,oneof:"message"}]),b8=GA.makeMessageType("livekit.SignalResponse",()=>[{no:1,name:"join",kind:"message",T:NbA,oneof:"message"},{no:2,name:"answer",kind:"message",T:yd,oneof:"message"},{no:3,name:"offer",kind:"message",T:yd,oneof:"message"},{no:4,name:"trickle",kind:"message",T:om,oneof:"message"},{no:5,name:"update",kind:"message",T:XbA,oneof:"message"},{no:6,name:"track_published",kind:"message",T:NZ,oneof:"message"},{no:8,name:"leave",kind:"message",T:lm,oneof:"message"},{no:9,name:"mute",kind:"message",T:Bm,oneof:"message"},{no:10,name:"speakers_changed",kind:"message",T:ObA,oneof:"message"},{no:11,name:"room_update",kind:"message",T:JbA,oneof:"message"},{no:12,name:"connection_quality",kind:"message",T:jbA,oneof:"message"},{no:13,name:"stream_state_update",kind:"message",T:qbA,oneof:"message"},{no:14,name:"subscribed_quality_update",kind:"message",T:ACA,oneof:"message"},{no:15,name:"subscription_permission_update",kind:"message",T:tCA,oneof:"message"},{no:16,name:"refresh_token",kind:"scalar",T:9,oneof:"message"},{no:17,name:"track_unpublished",kind:"message",T:LbA,oneof:"message"},{no:18,name:"pong",kind:"scalar",T:3,oneof:"message"},{no:19,name:"reconnect",kind:"message",T:zbA,oneof:"message"},{no:20,name:"pong_resp",kind:"message",T:sCA,oneof:"message"},{no:21,name:"subscription_response",kind:"message",T:iCA,oneof:"message"},{no:22,name:"request_response",kind:"message",T:oCA,oneof:"message"},{no:23,name:"track_subscribed",kind:"message",T:BCA,oneof:"message"},{no:24,name:"room_moved",kind:"message",T:nCA,oneof:"message"},{no:25,name:"media_sections_requirement",kind:"message",T:gCA,oneof:"message"},{no:26,name:"subscribed_audio_codec_update",kind:"message",T:eCA,oneof:"message"},{no:27,name:"publish_data_track_response",kind:"message",T:VZ,oneof:"message"},{no:28,name:"unpublish_data_track_response",kind:"message",T:SbA,oneof:"message"},{no:29,name:"data_track_subscriber_handles",kind:"message",T:VbA,oneof:"message"}]),RZ=GA.makeMessageType("livekit.SimulcastCodec",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"cid",kind:"scalar",T:9},{no:4,name:"layers",kind:"message",T:Ed,repeated:!0},{no:5,name:"video_layer_mode",kind:"enum",T:GA.getEnumType(s8)}]),oC=GA.makeMessageType("livekit.AddTrackRequest",()=>[{no:1,name:"cid",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"type",kind:"enum",T:GA.getEnumType(wB)},{no:4,name:"width",kind:"scalar",T:13},{no:5,name:"height",kind:"scalar",T:13},{no:6,name:"muted",kind:"scalar",T:8},{no:7,name:"disable_dtx",kind:"scalar",T:8},{no:8,name:"source",kind:"enum",T:GA.getEnumType(Ms)},{no:9,name:"layers",kind:"message",T:Ed,repeated:!0},{no:10,name:"simulcast_codecs",kind:"message",T:RZ,repeated:!0},{no:11,name:"sid",kind:"scalar",T:9},{no:12,name:"stereo",kind:"scalar",T:8},{no:13,name:"disable_red",kind:"scalar",T:8},{no:14,name:"encryption",kind:"enum",T:GA.getEnumType(cn)},{no:15,name:"stream",kind:"scalar",T:9},{no:16,name:"backup_codec_policy",kind:"enum",T:GA.getEnumType(n8)},{no:17,name:"audio_features",kind:"enum",T:GA.getEnumType(Cr),repeated:!0}]),SZ=GA.makeMessageType("livekit.PublishDataTrackRequest",()=>[{no:1,name:"pub_handle",kind:"scalar",T:13},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"encryption",kind:"enum",T:GA.getEnumType(cn)}]),VZ=GA.makeMessageType("livekit.PublishDataTrackResponse",()=>[{no:1,name:"info",kind:"message",T:nm}]),WZ=GA.makeMessageType("livekit.UnpublishDataTrackRequest",()=>[{no:1,name:"pub_handle",kind:"scalar",T:13}]),SbA=GA.makeMessageType("livekit.UnpublishDataTrackResponse",()=>[{no:1,name:"info",kind:"message",T:nm}]),VbA=GA.makeMessageType("livekit.DataTrackSubscriberHandles",()=>[{no:1,name:"sub_handles",kind:"map",K:13,V:{kind:"message",T:WbA}}]),WbA=GA.makeMessageType("livekit.DataTrackSubscriberHandles.PublishedDataTrack",()=>[{no:1,name:"publisher_identity",kind:"scalar",T:9},{no:2,name:"publisher_sid",kind:"scalar",T:9},{no:3,name:"track_sid",kind:"scalar",T:9}],{localName:"DataTrackSubscriberHandles_PublishedDataTrack"}),om=GA.makeMessageType("livekit.TrickleRequest",()=>[{no:1,name:"candidateInit",kind:"scalar",T:9},{no:2,name:"target",kind:"enum",T:GA.getEnumType(bB)},{no:3,name:"final",kind:"scalar",T:8}]),Bm=GA.makeMessageType("livekit.MuteTrackRequest",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"muted",kind:"scalar",T:8}]),NbA=GA.makeMessageType("livekit.JoinResponse",()=>[{no:1,name:"room",kind:"message",T:em},{no:2,name:"participant",kind:"message",T:zG},{no:3,name:"other_participants",kind:"message",T:zG,repeated:!0},{no:4,name:"server_version",kind:"scalar",T:9},{no:5,name:"ice_servers",kind:"message",T:m8,repeated:!0},{no:6,name:"subscriber_primary",kind:"scalar",T:8},{no:7,name:"alternative_url",kind:"scalar",T:9},{no:8,name:"client_configuration",kind:"message",T:G8},{no:9,name:"server_region",kind:"scalar",T:9},{no:10,name:"ping_timeout",kind:"scalar",T:5},{no:11,name:"ping_interval",kind:"scalar",T:5},{no:12,name:"server_info",kind:"message",T:l8},{no:13,name:"sif_trailer",kind:"scalar",T:12},{no:14,name:"enabled_publish_codecs",kind:"message",T:tm,repeated:!0},{no:15,name:"fast_publish",kind:"scalar",T:8}]),zbA=GA.makeMessageType("livekit.ReconnectResponse",()=>[{no:1,name:"ice_servers",kind:"message",T:m8,repeated:!0},{no:2,name:"client_configuration",kind:"message",T:G8},{no:3,name:"server_info",kind:"message",T:l8},{no:4,name:"last_message_seq",kind:"scalar",T:13}]),NZ=GA.makeMessageType("livekit.TrackPublishedResponse",()=>[{no:1,name:"cid",kind:"scalar",T:9},{no:2,name:"track",kind:"message",T:lw}]),LbA=GA.makeMessageType("livekit.TrackUnpublishedResponse",()=>[{no:1,name:"track_sid",kind:"scalar",T:9}]),yd=GA.makeMessageType("livekit.SessionDescription",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"sdp",kind:"scalar",T:9},{no:3,name:"id",kind:"scalar",T:13},{no:4,name:"mid_to_track_id",kind:"map",K:9,V:{kind:"scalar",T:9}}]),XbA=GA.makeMessageType("livekit.ParticipantUpdate",()=>[{no:1,name:"participants",kind:"message",T:zG,repeated:!0}]),cm=GA.makeMessageType("livekit.UpdateSubscription",()=>[{no:1,name:"track_sids",kind:"scalar",T:9,repeated:!0},{no:2,name:"subscribe",kind:"scalar",T:8},{no:3,name:"participant_tracks",kind:"message",T:c8,repeated:!0}]),C8=GA.makeMessageType("livekit.UpdateDataSubscription",()=>[{no:1,name:"updates",kind:"message",T:v8,repeated:!0}]),v8=GA.makeMessageType("livekit.UpdateDataSubscription.Update",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"subscribe",kind:"scalar",T:8},{no:3,name:"options",kind:"message",T:UbA}],{localName:"UpdateDataSubscription_Update"}),I8=GA.makeMessageType("livekit.UpdateTrackSettings",()=>[{no:1,name:"track_sids",kind:"scalar",T:9,repeated:!0},{no:3,name:"disabled",kind:"scalar",T:8},{no:4,name:"quality",kind:"enum",T:GA.getEnumType(UZ)},{no:5,name:"width",kind:"scalar",T:13},{no:6,name:"height",kind:"scalar",T:13},{no:7,name:"fps",kind:"scalar",T:13},{no:8,name:"priority",kind:"scalar",T:13}]),zZ=GA.makeMessageType("livekit.UpdateLocalAudioTrack",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"features",kind:"enum",T:GA.getEnumType(Cr),repeated:!0}]),p8=GA.makeMessageType("livekit.UpdateLocalVideoTrack",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"width",kind:"scalar",T:13},{no:3,name:"height",kind:"scalar",T:13}]),lm=GA.makeMessageType("livekit.LeaveRequest",()=>[{no:1,name:"can_reconnect",kind:"scalar",T:8},{no:2,name:"reason",kind:"enum",T:GA.getEnumType(QB)},{no:3,name:"action",kind:"enum",T:GA.getEnumType(gw)},{no:4,name:"regions",kind:"message",T:rCA}]),gw=GA.makeEnum("livekit.LeaveRequest.Action",[{no:0,name:"DISCONNECT"},{no:1,name:"RESUME"},{no:2,name:"RECONNECT"}]),H8=GA.makeMessageType("livekit.UpdateVideoLayers",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"layers",kind:"message",T:Ed,repeated:!0}]),LZ=GA.makeMessageType("livekit.UpdateParticipantMetadata",()=>[{no:1,name:"metadata",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:4,name:"request_id",kind:"scalar",T:13}]),m8=GA.makeMessageType("livekit.ICEServer",()=>[{no:1,name:"urls",kind:"scalar",T:9,repeated:!0},{no:2,name:"username",kind:"scalar",T:9},{no:3,name:"credential",kind:"scalar",T:9}]),ObA=GA.makeMessageType("livekit.SpeakersChanged",()=>[{no:1,name:"speakers",kind:"message",T:i8,repeated:!0}]),JbA=GA.makeMessageType("livekit.RoomUpdate",()=>[{no:1,name:"room",kind:"message",T:em}]),KbA=GA.makeMessageType("livekit.ConnectionQualityInfo",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"quality",kind:"enum",T:GA.getEnumType(rC)},{no:3,name:"score",kind:"scalar",T:2}]),jbA=GA.makeMessageType("livekit.ConnectionQualityUpdate",()=>[{no:1,name:"updates",kind:"message",T:KbA,repeated:!0}]),_bA=GA.makeMessageType("livekit.StreamStateInfo",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"track_sid",kind:"scalar",T:9},{no:3,name:"state",kind:"enum",T:GA.getEnumType(TZ)}]),qbA=GA.makeMessageType("livekit.StreamStateUpdate",()=>[{no:1,name:"stream_states",kind:"message",T:_bA,repeated:!0}]),XZ=GA.makeMessageType("livekit.SubscribedQuality",()=>[{no:1,name:"quality",kind:"enum",T:GA.getEnumType(UZ)},{no:2,name:"enabled",kind:"scalar",T:8}]),$bA=GA.makeMessageType("livekit.SubscribedCodec",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"qualities",kind:"message",T:XZ,repeated:!0}]),ACA=GA.makeMessageType("livekit.SubscribedQualityUpdate",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"subscribed_qualities",kind:"message",T:XZ,repeated:!0},{no:3,name:"subscribed_codecs",kind:"message",T:$bA,repeated:!0}]),eCA=GA.makeMessageType("livekit.SubscribedAudioCodecUpdate",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"subscribed_audio_codecs",kind:"message",T:PbA,repeated:!0}]),E8=GA.makeMessageType("livekit.TrackPermission",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"all_tracks",kind:"scalar",T:8},{no:3,name:"track_sids",kind:"scalar",T:9,repeated:!0},{no:4,name:"participant_identity",kind:"scalar",T:9}]),y8=GA.makeMessageType("livekit.SubscriptionPermission",()=>[{no:1,name:"all_participants",kind:"scalar",T:8},{no:2,name:"track_permissions",kind:"message",T:E8,repeated:!0}]),tCA=GA.makeMessageType("livekit.SubscriptionPermissionUpdate",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"track_sid",kind:"scalar",T:9},{no:3,name:"allowed",kind:"scalar",T:8}]),nCA=GA.makeMessageType("livekit.RoomMovedResponse",()=>[{no:1,name:"room",kind:"message",T:em},{no:2,name:"token",kind:"scalar",T:9},{no:3,name:"participant",kind:"message",T:zG},{no:4,name:"other_participants",kind:"message",T:zG,repeated:!0}]),OZ=GA.makeMessageType("livekit.SyncState",()=>[{no:1,name:"answer",kind:"message",T:yd},{no:2,name:"subscription",kind:"message",T:cm},{no:3,name:"publish_tracks",kind:"message",T:NZ,repeated:!0},{no:4,name:"data_channels",kind:"message",T:Z8,repeated:!0},{no:5,name:"offer",kind:"message",T:yd},{no:6,name:"track_sids_disabled",kind:"scalar",T:9,repeated:!0},{no:7,name:"datachannel_receive_states",kind:"message",T:Y8,repeated:!0},{no:8,name:"publish_data_tracks",kind:"message",T:VZ,repeated:!0}]),Y8=GA.makeMessageType("livekit.DataChannelReceiveState",()=>[{no:1,name:"publisher_sid",kind:"scalar",T:9},{no:2,name:"last_seq",kind:"scalar",T:13}]),Z8=GA.makeMessageType("livekit.DataChannelInfo",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:13},{no:3,name:"target",kind:"enum",T:GA.getEnumType(bB)}]),Yc=GA.makeMessageType("livekit.SimulateScenario",()=>[{no:1,name:"speaker_update",kind:"scalar",T:5,oneof:"scenario"},{no:2,name:"node_failure",kind:"scalar",T:8,oneof:"scenario"},{no:3,name:"migration",kind:"scalar",T:8,oneof:"scenario"},{no:4,name:"server_leave",kind:"scalar",T:8,oneof:"scenario"},{no:5,name:"switch_candidate_protocol",kind:"enum",T:GA.getEnumType(TbA),oneof:"scenario"},{no:6,name:"subscriber_bandwidth",kind:"scalar",T:3,oneof:"scenario"},{no:7,name:"disconnect_signal_on_resume",kind:"scalar",T:8,oneof:"scenario"},{no:8,name:"disconnect_signal_on_resume_no_messages",kind:"scalar",T:8,oneof:"scenario"},{no:9,name:"leave_request_full_reconnect",kind:"scalar",T:8,oneof:"scenario"}]),k8=GA.makeMessageType("livekit.Ping",()=>[{no:1,name:"timestamp",kind:"scalar",T:3},{no:2,name:"rtt",kind:"scalar",T:3}]),sCA=GA.makeMessageType("livekit.Pong",()=>[{no:1,name:"last_ping_timestamp",kind:"scalar",T:3},{no:2,name:"timestamp",kind:"scalar",T:3}]),rCA=GA.makeMessageType("livekit.RegionSettings",()=>[{no:1,name:"regions",kind:"message",T:aCA,repeated:!0}]),aCA=GA.makeMessageType("livekit.RegionInfo",()=>[{no:1,name:"region",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"distance",kind:"scalar",T:3}]),iCA=GA.makeMessageType("livekit.SubscriptionResponse",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"err",kind:"enum",T:GA.getEnumType(ybA)}]),oCA=GA.makeMessageType("livekit.RequestResponse",()=>[{no:1,name:"request_id",kind:"scalar",T:13},{no:2,name:"reason",kind:"enum",T:GA.getEnumType(XG)},{no:3,name:"message",kind:"scalar",T:9},{no:4,name:"trickle",kind:"message",T:om,oneof:"request"},{no:5,name:"add_track",kind:"message",T:oC,oneof:"request"},{no:6,name:"mute",kind:"message",T:Bm,oneof:"request"},{no:7,name:"update_metadata",kind:"message",T:LZ,oneof:"request"},{no:8,name:"update_audio_track",kind:"message",T:zZ,oneof:"request"},{no:9,name:"update_video_track",kind:"message",T:p8,oneof:"request"},{no:10,name:"publish_data_track",kind:"message",T:SZ,oneof:"request"},{no:11,name:"unpublish_data_track",kind:"message",T:WZ,oneof:"request"}]),XG=GA.makeEnum("livekit.RequestResponse.Reason",[{no:0,name:"OK"},{no:1,name:"NOT_FOUND"},{no:2,name:"NOT_ALLOWED"},{no:3,name:"LIMIT_EXCEEDED"},{no:4,name:"QUEUED"},{no:5,name:"UNSUPPORTED_TYPE"},{no:6,name:"UNCLASSIFIED_ERROR"},{no:7,name:"INVALID_HANDLE"},{no:8,name:"INVALID_NAME"},{no:9,name:"DUPLICATE_HANDLE"},{no:10,name:"DUPLICATE_NAME"}]),BCA=GA.makeMessageType("livekit.TrackSubscribed",()=>[{no:1,name:"track_sid",kind:"scalar",T:9}]),U8=GA.makeMessageType("livekit.ConnectionSettings",()=>[{no:1,name:"auto_subscribe",kind:"scalar",T:8},{no:2,name:"adaptive_stream",kind:"scalar",T:8},{no:3,name:"subscriber_allow_pause",kind:"scalar",T:8,opt:!0},{no:4,name:"disable_ice_lite",kind:"scalar",T:8},{no:5,name:"auto_subscribe_data_track",kind:"scalar",T:8,opt:!0}]),cCA=GA.makeMessageType("livekit.JoinRequest",()=>[{no:1,name:"client_info",kind:"message",T:d8},{no:2,name:"connection_settings",kind:"message",T:U8},{no:3,name:"metadata",kind:"scalar",T:9},{no:4,name:"participant_attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:5,name:"add_track_requests",kind:"message",T:oC,repeated:!0},{no:6,name:"publisher_offer",kind:"message",T:yd},{no:7,name:"reconnect",kind:"scalar",T:8},{no:8,name:"reconnect_reason",kind:"enum",T:GA.getEnumType(NG)},{no:9,name:"participant_sid",kind:"scalar",T:9},{no:10,name:"sync_state",kind:"message",T:OZ}]),lCA=GA.makeMessageType("livekit.WrappedJoinRequest",()=>[{no:1,name:"compression",kind:"enum",T:GA.getEnumType(JZ)},{no:2,name:"join_request",kind:"scalar",T:12}]),JZ=GA.makeEnum("livekit.WrappedJoinRequest.Compression",[{no:0,name:"NONE"},{no:1,name:"GZIP"}]),gCA=GA.makeMessageType("livekit.MediaSectionsRequirement",()=>[{no:1,name:"num_audios",kind:"scalar",T:13},{no:2,name:"num_videos",kind:"scalar",T:13}]);function dCA(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gm={exports:{}},uCA=gm.exports,D8;function GCA(){return D8||(D8=1,(function(e){(function(A,t){e.exports?e.exports=t():A.log=t()})(uCA,function(){var A=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),s=["trace","debug","info","warn","error"],r={},a=null;function o(H,E){var Z=H[E];if(typeof Z.bind=="function")return Z.bind(H);try{return Function.prototype.bind.call(Z,H)}catch{return function(){return Function.prototype.apply.apply(Z,[H,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(H){return H==="debug"&&(H="log"),typeof console===t?!1:H==="trace"&&n?c:console[H]!==void 0?o(console,H):console.log!==void 0?o(console,"log"):A}function g(){for(var H=this.getLevel(),E=0;E<s.length;E++){var Z=s[E];this[Z]=E<H?A:this.methodFactory(Z,H,this.name)}if(this.log=this.debug,typeof console===t&&H<this.levels.SILENT)return"No console available for logging"}function u(H){return function(){typeof console!==t&&(g.call(this),this[H].apply(this,arguments))}}function f(H,E,Z){return l(H)||u.apply(this,arguments)}function w(H,E){var Z=this,M,S,x,D="loglevel";typeof H=="string"?D+=":"+H:typeof H=="symbol"&&(D=void 0);function V(rA){var iA=(s[rA]||"silent").toUpperCase();if(!(typeof window===t||!D)){try{window.localStorage[D]=iA;return}catch{}try{window.document.cookie=encodeURIComponent(D)+"="+iA+";"}catch{}}}function W(){var rA;if(!(typeof window===t||!D)){try{rA=window.localStorage[D]}catch{}if(typeof rA===t)try{var iA=window.document.cookie,hA=encodeURIComponent(D),fA=iA.indexOf(hA+"=");fA!==-1&&(rA=/^([^;]+)/.exec(iA.slice(fA+hA.length+1))[1])}catch{}return Z.levels[rA]===void 0&&(rA=void 0),rA}}function z(){if(!(typeof window===t||!D)){try{window.localStorage.removeItem(D)}catch{}try{window.document.cookie=encodeURIComponent(D)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function eA(rA){var iA=rA;if(typeof iA=="string"&&Z.levels[iA.toUpperCase()]!==void 0&&(iA=Z.levels[iA.toUpperCase()]),typeof iA=="number"&&iA>=0&&iA<=Z.levels.SILENT)return iA;throw new TypeError("log.setLevel() called with invalid level: "+rA)}Z.name=H,Z.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},Z.methodFactory=E||f,Z.getLevel=function(){return x??S??M},Z.setLevel=function(rA,iA){return x=eA(rA),iA!==!1&&V(x),g.call(Z)},Z.setDefaultLevel=function(rA){S=eA(rA),W()||Z.setLevel(rA,!1)},Z.resetLevel=function(){x=null,z(),g.call(Z)},Z.enableAll=function(rA){Z.setLevel(Z.levels.TRACE,rA)},Z.disableAll=function(rA){Z.setLevel(Z.levels.SILENT,rA)},Z.rebuild=function(){if(a!==Z&&(M=eA(a.getLevel())),g.call(Z),a===Z)for(var rA in r)r[rA].rebuild()},M=eA(a?a.getLevel():"WARN");var $=W();$!=null&&(x=eA($)),g.call(Z)}a=new w,a.getLogger=function(E){if(typeof E!="symbol"&&typeof E!="string"||E==="")throw new TypeError("You must supply a name when creating a logger.");var Z=r[E];return Z||(Z=r[E]=new w(E,a.methodFactory)),Z};var v=typeof window!==t?window.log:void 0;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=v),a},a.getLoggers=function(){return r},a.default=a,a})})(gm)),gm.exports}var dm=GCA(),KZ;(function(e){e[e.trace=0]="trace",e[e.debug=1]="debug",e[e.info=2]="info",e[e.warn=3]="warn",e[e.error=4]="error",e[e.silent=5]="silent"})(KZ||(KZ={}));var Kr;(function(e){e.Default="livekit",e.Room="livekit-room",e.TokenSource="livekit-token-source",e.Participant="livekit-participant",e.Track="livekit-track",e.Publication="livekit-track-publication",e.Engine="livekit-engine",e.Signal="livekit-signal",e.PCManager="livekit-pc-manager",e.PCTransport="livekit-pc-transport",e.E2EE="lk-e2ee",e.DataTracks="livekit-data-tracks"})(Kr||(Kr={}));let Ve=dm.getLogger("livekit");Object.values(Kr).map(e=>dm.getLogger(e)),Ve.setDefaultLevel(KZ.info);function $a(e){const A=dm.getLogger(e);return A.setDefaultLevel(Ve.getLevel()),A}const fCA=dm.getLogger("lk-e2ee"),BC=7e3,hCA=[0,300,4*300,9*300,16*300,BC,BC,BC,BC,BC];class wCA{constructor(A){this._retryDelays=A!==void 0?[...A]:hCA}nextRetryDelayInMs(A){if(A.retryCount>=this._retryDelays.length)return null;const t=this._retryDelays[A.retryCount];return A.retryCount<=1?t:t+Math.random()*1e3}}function QCA(e,A){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&A.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)A.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(t[n[s]]=e[n[s]]);return t}function nA(e,A,t,n){function s(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(g){try{l(n.next(g))}catch(u){a(u)}}function c(g){try{l(n.throw(g))}catch(u){a(u)}}function l(g){g.done?r(g.value):s(g.value).then(o,c)}l((n=n.apply(e,A||[])).next())})}function F8(e){var A=typeof Symbol=="function"&&Symbol.iterator,t=A&&e[A],n=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")}function dw(e){return this instanceof dw?(this.v=e,this):new dw(e)}function bCA(e,A,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(e,A||[]),s,r=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",a),s[Symbol.asyncIterator]=function(){return this},s;function a(w){return function(v){return Promise.resolve(v).then(w,u)}}function o(w,v){n[w]&&(s[w]=function(H){return new Promise(function(E,Z){r.push([w,H,E,Z])>1||c(w,H)})},v&&(s[w]=v(s[w])))}function c(w,v){try{l(n[w](v))}catch(H){f(r[0][3],H)}}function l(w){w.value instanceof dw?Promise.resolve(w.value.v).then(g,u):f(r[0][2],w)}function g(w){c("next",w)}function u(w){c("throw",w)}function f(w,v){w(v),r.shift(),r.length&&c(r[0][0],r[0][1])}}function CCA(e){var A,t;return A={},n("next"),n("throw",function(s){throw s}),n("return"),A[Symbol.iterator]=function(){return this},A;function n(s,r){A[s]=e[s]?function(a){return(t=!t)?{value:dw(e[s](a)),done:!1}:r?r(a):a}:r}}function CB(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var A=e[Symbol.asyncIterator],t;return A?A.call(e):(e=typeof F8=="function"?F8(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(a){return new Promise(function(o,c){a=e[r](a),s(o,c,a.done,a.value)})}}function s(r,a,o,c){Promise.resolve(c).then(function(l){r({value:l,done:o})},a)}}typeof SuppressedError=="function"&&SuppressedError;var um={exports:{}},M8;function vCA(){if(M8)return um.exports;M8=1;var e=typeof Reflect=="object"?Reflect:null,A=e&&typeof e.apply=="function"?e.apply:function(D,V,W){return Function.prototype.apply.call(D,V,W)},t;e&&typeof e.ownKeys=="function"?t=e.ownKeys:Object.getOwnPropertySymbols?t=function(D){return Object.getOwnPropertyNames(D).concat(Object.getOwnPropertySymbols(D))}:t=function(D){return Object.getOwnPropertyNames(D)};function n(x){console&&console.warn&&console.warn(x)}var s=Number.isNaN||function(D){return D!==D};function r(){r.init.call(this)}um.exports=r,um.exports.once=Z,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var a=10;function o(x){if(typeof x!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof x)}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(x){if(typeof x!="number"||x<0||s(x))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+x+".");a=x}}),r.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(D){if(typeof D!="number"||D<0||s(D))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+D+".");return this._maxListeners=D,this};function c(x){return x._maxListeners===void 0?r.defaultMaxListeners:x._maxListeners}r.prototype.getMaxListeners=function(){return c(this)},r.prototype.emit=function(D){for(var V=[],W=1;W<arguments.length;W++)V.push(arguments[W]);var z=D==="error",eA=this._events;if(eA!==void 0)z=z&&eA.error===void 0;else if(!z)return!1;if(z){var $;if(V.length>0&&($=V[0]),$ instanceof Error)throw $;var rA=new Error("Unhandled error."+($?" ("+$.message+")":""));throw rA.context=$,rA}var iA=eA[D];if(iA===void 0)return!1;if(typeof iA=="function")A(iA,this,V);else for(var hA=iA.length,fA=v(iA,hA),W=0;W<hA;++W)A(fA[W],this,V);return!0};function l(x,D,V,W){var z,eA,$;if(o(V),eA=x._events,eA===void 0?(eA=x._events=Object.create(null),x._eventsCount=0):(eA.newListener!==void 0&&(x.emit("newListener",D,V.listener?V.listener:V),eA=x._events),$=eA[D]),$===void 0)$=eA[D]=V,++x._eventsCount;else if(typeof $=="function"?$=eA[D]=W?[V,$]:[$,V]:W?$.unshift(V):$.push(V),z=c(x),z>0&&$.length>z&&!$.warned){$.warned=!0;var rA=new Error("Possible EventEmitter memory leak detected. "+$.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");rA.name="MaxListenersExceededWarning",rA.emitter=x,rA.type=D,rA.count=$.length,n(rA)}return x}r.prototype.addListener=function(D,V){return l(this,D,V,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(D,V){return l(this,D,V,!0)};function g(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(x,D,V){var W={fired:!1,wrapFn:void 0,target:x,type:D,listener:V},z=g.bind(W);return z.listener=V,W.wrapFn=z,z}r.prototype.once=function(D,V){return o(V),this.on(D,u(this,D,V)),this},r.prototype.prependOnceListener=function(D,V){return o(V),this.prependListener(D,u(this,D,V)),this},r.prototype.removeListener=function(D,V){var W,z,eA,$,rA;if(o(V),z=this._events,z===void 0)return this;if(W=z[D],W===void 0)return this;if(W===V||W.listener===V)--this._eventsCount===0?this._events=Object.create(null):(delete z[D],z.removeListener&&this.emit("removeListener",D,W.listener||V));else if(typeof W!="function"){for(eA=-1,$=W.length-1;$>=0;$--)if(W[$]===V||W[$].listener===V){rA=W[$].listener,eA=$;break}if(eA<0)return this;eA===0?W.shift():H(W,eA),W.length===1&&(z[D]=W[0]),z.removeListener!==void 0&&this.emit("removeListener",D,rA||V)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(D){var V,W,z;if(W=this._events,W===void 0)return this;if(W.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):W[D]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete W[D]),this;if(arguments.length===0){var eA=Object.keys(W),$;for(z=0;z<eA.length;++z)$=eA[z],$!=="removeListener"&&this.removeAllListeners($);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(V=W[D],typeof V=="function")this.removeListener(D,V);else if(V!==void 0)for(z=V.length-1;z>=0;z--)this.removeListener(D,V[z]);return this};function f(x,D,V){var W=x._events;if(W===void 0)return[];var z=W[D];return z===void 0?[]:typeof z=="function"?V?[z.listener||z]:[z]:V?E(z):v(z,z.length)}r.prototype.listeners=function(D){return f(this,D,!0)},r.prototype.rawListeners=function(D){return f(this,D,!1)},r.listenerCount=function(x,D){return typeof x.listenerCount=="function"?x.listenerCount(D):w.call(x,D)},r.prototype.listenerCount=w;function w(x){var D=this._events;if(D!==void 0){var V=D[x];if(typeof V=="function")return 1;if(V!==void 0)return V.length}return 0}r.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function v(x,D){for(var V=new Array(D),W=0;W<D;++W)V[W]=x[W];return V}function H(x,D){for(;D+1<x.length;D++)x[D]=x[D+1];x.pop()}function E(x){for(var D=new Array(x.length),V=0;V<D.length;++V)D[V]=x[V].listener||x[V];return D}function Z(x,D){return new Promise(function(V,W){function z($){x.removeListener(D,eA),W($)}function eA(){typeof x.removeListener=="function"&&x.removeListener("error",z),V([].slice.call(arguments))}S(x,D,eA,{once:!0}),D!=="error"&&M(x,z,{once:!0})})}function M(x,D,V){typeof x.on=="function"&&S(x,"error",D,V)}function S(x,D,V,W){if(typeof x.on=="function")W.once?x.once(D,V):x.on(D,V);else if(typeof x.addEventListener=="function")x.addEventListener(D,function z(eA){W.once&&x.removeEventListener(D,z),V(eA)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof x)}return um.exports}var Co=vCA();let x8=!0,P8=!0;function cC(e,A,t){const n=e.match(A);return n&&n.length>=t&&parseFloat(n[t],10)}function OG(e,A,t){if(!e.RTCPeerConnection)return;const n=e.RTCPeerConnection.prototype,s=n.addEventListener;n.addEventListener=function(a,o){if(a!==A)return s.apply(this,arguments);const c=l=>{const g=t(l);g&&(o.handleEvent?o.handleEvent(g):o(g))};return this._eventMap=this._eventMap||{},this._eventMap[A]||(this._eventMap[A]=new Map),this._eventMap[A].set(o,c),s.apply(this,[a,c])};const r=n.removeEventListener;n.removeEventListener=function(a,o){if(a!==A||!this._eventMap||!this._eventMap[A])return r.apply(this,arguments);if(!this._eventMap[A].has(o))return r.apply(this,arguments);const c=this._eventMap[A].get(o);return this._eventMap[A].delete(o),this._eventMap[A].size===0&&delete this._eventMap[A],Object.keys(this._eventMap).length===0&&delete this._eventMap,r.apply(this,[a,c])},Object.defineProperty(n,"on"+A,{get(){return this["_on"+A]},set(a){this["_on"+A]&&(this.removeEventListener(A,this["_on"+A]),delete this["_on"+A]),a&&this.addEventListener(A,this["_on"+A]=a)},enumerable:!0,configurable:!0})}function ICA(e){return typeof e!="boolean"?new Error("Argument type: "+typeof e+". Please use a boolean."):(x8=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function pCA(e){return typeof e!="boolean"?new Error("Argument type: "+typeof e+". Please use a boolean."):(P8=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function T8(){if(typeof window=="object"){if(x8)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function jZ(e,A){P8&&console.warn(e+" is deprecated, please use "+A+" instead.")}function HCA(e){const A={browser:null,version:null};if(typeof e>"u"||!e.navigator||!e.navigator.userAgent)return A.browser="Not a browser.",A;const{navigator:t}=e;if(t.userAgentData&&t.userAgentData.brands){const n=t.userAgentData.brands.find(s=>s.brand==="Chromium");if(n)return{browser:"chrome",version:parseInt(n.version,10)}}if(t.mozGetUserMedia)A.browser="firefox",A.version=parseInt(cC(t.userAgent,/Firefox\/(\d+)\./,1));else if(t.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)A.browser="chrome",A.version=parseInt(cC(t.userAgent,/Chrom(e|ium)\/(\d+)\./,2));else if(e.RTCPeerConnection&&t.userAgent.match(/AppleWebKit\/(\d+)\./))A.browser="safari",A.version=parseInt(cC(t.userAgent,/AppleWebKit\/(\d+)\./,1)),A.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,A._safariVersion=cC(t.userAgent,/Version\/(\d+(\.?\d+))/,1);else return A.browser="Not a supported browser.",A;return A}function R8(e){return Object.prototype.toString.call(e)==="[object Object]"}function S8(e){return R8(e)?Object.keys(e).reduce(function(A,t){const n=R8(e[t]),s=n?S8(e[t]):e[t],r=n&&!Object.keys(s).length;return s===void 0||r?A:Object.assign(A,{[t]:s})},{}):e}function _Z(e,A,t){!A||t.has(A.id)||(t.set(A.id,A),Object.keys(A).forEach(n=>{n.endsWith("Id")?_Z(e,e.get(A[n]),t):n.endsWith("Ids")&&A[n].forEach(s=>{_Z(e,e.get(s),t)})}))}function V8(e,A,t){const n=t?"outbound-rtp":"inbound-rtp",s=new Map;if(A===null)return s;const r=[];return e.forEach(a=>{a.type==="track"&&a.trackIdentifier===A.id&&r.push(a)}),r.forEach(a=>{e.forEach(o=>{o.type===n&&o.trackId===a.id&&_Z(e,o,s)})}),s}const W8=T8;function N8(e,A){const t=e&&e.navigator;if(!t.mediaDevices)return;const n=function(o){if(typeof o!="object"||o.mandatory||o.optional)return o;const c={};return Object.keys(o).forEach(l=>{if(l==="require"||l==="advanced"||l==="mediaSource")return;const g=typeof o[l]=="object"?o[l]:{ideal:o[l]};g.exact!==void 0&&typeof g.exact=="number"&&(g.min=g.max=g.exact);const u=function(f,w){return f?f+w.charAt(0).toUpperCase()+w.slice(1):w==="deviceId"?"sourceId":w};if(g.ideal!==void 0){c.optional=c.optional||[];let f={};typeof g.ideal=="number"?(f[u("min",l)]=g.ideal,c.optional.push(f),f={},f[u("max",l)]=g.ideal,c.optional.push(f)):(f[u("",l)]=g.ideal,c.optional.push(f))}g.exact!==void 0&&typeof g.exact!="number"?(c.mandatory=c.mandatory||{},c.mandatory[u("",l)]=g.exact):["min","max"].forEach(f=>{g[f]!==void 0&&(c.mandatory=c.mandatory||{},c.mandatory[u(f,l)]=g[f])})}),o.advanced&&(c.optional=(c.optional||[]).concat(o.advanced)),c},s=function(o,c){if(A.version>=61)return c(o);if(o=JSON.parse(JSON.stringify(o)),o&&typeof o.audio=="object"){const l=function(g,u,f){u in g&&!(f in g)&&(g[f]=g[u],delete g[u])};o=JSON.parse(JSON.stringify(o)),l(o.audio,"autoGainControl","googAutoGainControl"),l(o.audio,"noiseSuppression","googNoiseSuppression"),o.audio=n(o.audio)}if(o&&typeof o.video=="object"){let l=o.video.facingMode;l=l&&(typeof l=="object"?l:{ideal:l});const g=A.version<66;if(l&&(l.exact==="user"||l.exact==="environment"||l.ideal==="user"||l.ideal==="environment")&&!(t.mediaDevices.getSupportedConstraints&&t.mediaDevices.getSupportedConstraints().facingMode&&!g)){delete o.video.facingMode;let u;if(l.exact==="environment"||l.ideal==="environment"?u=["back","rear"]:(l.exact==="user"||l.ideal==="user")&&(u=["front"]),u)return t.mediaDevices.enumerateDevices().then(f=>{f=f.filter(v=>v.kind==="videoinput");let w=f.find(v=>u.some(H=>v.label.toLowerCase().includes(H)));return!w&&f.length&&u.includes("back")&&(w=f[f.length-1]),w&&(o.video.deviceId=l.exact?{exact:w.deviceId}:{ideal:w.deviceId}),o.video=n(o.video),W8("chrome: "+JSON.stringify(o)),c(o)})}o.video=n(o.video)}return W8("chrome: "+JSON.stringify(o)),c(o)},r=function(o){return A.version>=64?o:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[o.name]||o.name,message:o.message,constraint:o.constraint||o.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}},a=function(o,c,l){s(o,g=>{t.webkitGetUserMedia(g,c,u=>{l&&l(r(u))})})};if(t.getUserMedia=a.bind(t),t.mediaDevices.getUserMedia){const o=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(c){return s(c,l=>o(l).then(g=>{if(l.audio&&!g.getAudioTracks().length||l.video&&!g.getVideoTracks().length)throw g.getTracks().forEach(u=>{u.stop()}),new DOMException("","NotFoundError");return g},g=>Promise.reject(r(g))))}}}function z8(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function L8(e){if(typeof e=="object"&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(t){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=t)},enumerable:!0,configurable:!0});const A=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=n=>{n.stream.addEventListener("addtrack",s=>{let r;e.RTCPeerConnection.prototype.getReceivers?r=this.getReceivers().find(o=>o.track&&o.track.id===s.track.id):r={track:s.track};const a=new Event("track");a.track=s.track,a.receiver=r,a.transceiver={receiver:r},a.streams=[n.stream],this.dispatchEvent(a)}),n.stream.getTracks().forEach(s=>{let r;e.RTCPeerConnection.prototype.getReceivers?r=this.getReceivers().find(o=>o.track&&o.track.id===s.id):r={track:s};const a=new Event("track");a.track=s,a.receiver=r,a.transceiver={receiver:r},a.streams=[n.stream],this.dispatchEvent(a)})},this.addEventListener("addstream",this._ontrackpoly)),A.apply(this,arguments)}}else OG(e,"track",A=>(A.transceiver||Object.defineProperty(A,"transceiver",{value:{receiver:A.receiver}}),A))}function X8(e){if(typeof e=="object"&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const A=function(s,r){return{track:r,get dtmf(){return this._dtmf===void 0&&(r.kind==="audio"?this._dtmf=s.createDTMFSender(r):this._dtmf=null),this._dtmf},_pc:s}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const s=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(o,c){let l=s.apply(this,arguments);return l||(l=A(this,o),this._senders.push(l)),l};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(o){r.apply(this,arguments);const c=this._senders.indexOf(o);c!==-1&&this._senders.splice(c,1)}}const t=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(r){this._senders=this._senders||[],t.apply(this,[r]),r.getTracks().forEach(a=>{this._senders.push(A(this,a))})};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(r){this._senders=this._senders||[],n.apply(this,[r]),r.getTracks().forEach(a=>{const o=this._senders.find(c=>c.track===a);o&&this._senders.splice(this._senders.indexOf(o),1)})}}else if(typeof e=="object"&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const A=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const n=A.apply(this,[]);return n.forEach(s=>s._pc=this),n},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function O8(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const r=t.apply(this,[]);return r.forEach(a=>a._pc=this),r});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const r=n.apply(this,arguments);return r._pc=this,r}),e.RTCRtpSender.prototype.getStats=function(){const r=this;return this._pc.getStats().then(a=>V8(a,r.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const s=t.apply(this,[]);return s.forEach(r=>r._pc=this),s}),OG(e,"track",n=>(n.receiver._pc=n.srcElement,n)),e.RTCRtpReceiver.prototype.getStats=function(){const s=this;return this._pc.getStats().then(r=>V8(r,s.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype))return;const A=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const n=arguments[0];let s,r,a;return this.getSenders().forEach(o=>{o.track===n&&(s?a=!0:s=o)}),this.getReceivers().forEach(o=>(o.track===n&&(r?a=!0:r=o),o.track===n)),a||s&&r?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):s?s.getStats():r?r.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return A.apply(this,arguments)}}function J8(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(a=>this._shimmedLocalStreams[a][0])};const A=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(a,o){if(!o)return A.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const c=A.apply(this,arguments);return this._shimmedLocalStreams[o.id]?this._shimmedLocalStreams[o.id].indexOf(c)===-1&&this._shimmedLocalStreams[o.id].push(c):this._shimmedLocalStreams[o.id]=[o,c],c};const t=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(a){this._shimmedLocalStreams=this._shimmedLocalStreams||{},a.getTracks().forEach(l=>{if(this.getSenders().find(u=>u.track===l))throw new DOMException("Track already exists.","InvalidAccessError")});const o=this.getSenders();t.apply(this,arguments);const c=this.getSenders().filter(l=>o.indexOf(l)===-1);this._shimmedLocalStreams[a.id]=[a].concat(c)};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(a){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[a.id],n.apply(this,arguments)};const s=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(a){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},a&&Object.keys(this._shimmedLocalStreams).forEach(o=>{const c=this._shimmedLocalStreams[o].indexOf(a);c!==-1&&this._shimmedLocalStreams[o].splice(c,1),this._shimmedLocalStreams[o].length===1&&delete this._shimmedLocalStreams[o]}),s.apply(this,arguments)}}function K8(e,A){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&A.version>=65)return J8(e);const t=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const g=t.apply(this);return this._reverseStreams=this._reverseStreams||{},g.map(u=>this._reverseStreams[u.id])};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(g){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},g.getTracks().forEach(u=>{if(this.getSenders().find(w=>w.track===u))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[g.id]){const u=new e.MediaStream(g.getTracks());this._streams[g.id]=u,this._reverseStreams[u.id]=g,g=u}n.apply(this,[g])};const s=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(g){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},s.apply(this,[this._streams[g.id]||g]),delete this._reverseStreams[this._streams[g.id]?this._streams[g.id].id:g.id],delete this._streams[g.id]},e.RTCPeerConnection.prototype.addTrack=function(g,u){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const f=[].slice.call(arguments,1);if(f.length!==1||!f[0].getTracks().find(H=>H===g))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(H=>H.track===g))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const v=this._streams[u.id];if(v)v.addTrack(g),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const H=new e.MediaStream([g]);this._streams[u.id]=H,this._reverseStreams[H.id]=u,this.addStream(H)}return this.getSenders().find(H=>H.track===g)};function r(l,g){let u=g.sdp;return Object.keys(l._reverseStreams||[]).forEach(f=>{const w=l._reverseStreams[f],v=l._streams[w.id];u=u.replace(new RegExp(v.id,"g"),w.id)}),new RTCSessionDescription({type:g.type,sdp:u})}function a(l,g){let u=g.sdp;return Object.keys(l._reverseStreams||[]).forEach(f=>{const w=l._reverseStreams[f],v=l._streams[w.id];u=u.replace(new RegExp(w.id,"g"),v.id)}),new RTCSessionDescription({type:g.type,sdp:u})}["createOffer","createAnswer"].forEach(function(l){const g=e.RTCPeerConnection.prototype[l],u={[l](){const f=arguments;return arguments.length&&typeof arguments[0]=="function"?g.apply(this,[v=>{const H=r(this,v);f[0].apply(null,[H])},v=>{f[1]&&f[1].apply(null,v)},arguments[2]]):g.apply(this,arguments).then(v=>r(this,v))}};e.RTCPeerConnection.prototype[l]=u[l]});const o=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?o.apply(this,arguments):(arguments[0]=a(this,arguments[0]),o.apply(this,arguments))};const c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const l=c.get.apply(this);return l.type===""?l:r(this,l)}}),e.RTCPeerConnection.prototype.removeTrack=function(g){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!g._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(g._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};let f;Object.keys(this._streams).forEach(w=>{this._streams[w].getTracks().find(H=>g.track===H)&&(f=this._streams[w])}),f&&(f.getTracks().length===1?this.removeStream(this._reverseStreams[f.id]):f.removeTrack(g.track),this.dispatchEvent(new Event("negotiationneeded")))}}function qZ(e,A){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&A.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],s={[t](){return arguments[0]=new(t==="addIceCandidate"?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=s[t]})}function j8(e,A){OG(e,"negotiationneeded",t=>{const n=t.target;if(!((A.version<72||n.getConfiguration&&n.getConfiguration().sdpSemantics==="plan-b")&&n.signalingState!=="stable"))return t})}var _8=Object.freeze({__proto__:null,fixNegotiationNeeded:j8,shimAddTrackRemoveTrack:K8,shimAddTrackRemoveTrackWithNative:J8,shimGetSendersWithDtmf:X8,shimGetUserMedia:N8,shimMediaStream:z8,shimOnTrack:L8,shimPeerConnection:qZ,shimSenderReceiverGetStats:O8});function q8(e,A){const t=e&&e.navigator,n=e&&e.MediaStreamTrack;if(t.getUserMedia=function(s,r,a){jZ("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),t.mediaDevices.getUserMedia(s).then(r,a)},!(A.version>55&&"autoGainControl"in t.mediaDevices.getSupportedConstraints())){const s=function(a,o,c){o in a&&!(c in a)&&(a[c]=a[o],delete a[o])},r=t.mediaDevices.getUserMedia.bind(t.mediaDevices);if(t.mediaDevices.getUserMedia=function(a){return typeof a=="object"&&typeof a.audio=="object"&&(a=JSON.parse(JSON.stringify(a)),s(a.audio,"autoGainControl","mozAutoGainControl"),s(a.audio,"noiseSuppression","mozNoiseSuppression")),r(a)},n&&n.prototype.getSettings){const a=n.prototype.getSettings;n.prototype.getSettings=function(){const o=a.apply(this,arguments);return s(o,"mozAutoGainControl","autoGainControl"),s(o,"mozNoiseSuppression","noiseSuppression"),o}}if(n&&n.prototype.applyConstraints){const a=n.prototype.applyConstraints;n.prototype.applyConstraints=function(o){return this.kind==="audio"&&typeof o=="object"&&(o=JSON.parse(JSON.stringify(o)),s(o,"autoGainControl","mozAutoGainControl"),s(o,"noiseSuppression","mozNoiseSuppression")),a.apply(this,[o])}}}}function mCA(e,A){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!(n&&n.video)){const s=new DOMException("getDisplayMedia without video constraints is undefined");return s.name="NotFoundError",s.code=8,Promise.reject(s)}return n.video===!0?n.video={mediaSource:A}:n.video.mediaSource=A,e.navigator.mediaDevices.getUserMedia(n)})}function $8(e){typeof e=="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function $Z(e,A){if(typeof e!="object"||!(e.RTCPeerConnection||e.mozRTCPeerConnection))return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),A.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(s){const r=e.RTCPeerConnection.prototype[s],a={[s](){return arguments[0]=new(s==="addIceCandidate"?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}};e.RTCPeerConnection.prototype[s]=a[s]});const t={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},n=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[r,a,o]=arguments;return n.apply(this,[r||null]).then(c=>{if(A.version<53&&!a)try{c.forEach(l=>{l.type=t[l.type]||l.type})}catch(l){if(l.name!=="TypeError")throw l;c.forEach((g,u)=>{c.set(u,Object.assign({},g,{type:t[g.type]||g.type}))})}return c}).then(a,o)}}function AW(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const A=e.RTCPeerConnection.prototype.getSenders;A&&(e.RTCPeerConnection.prototype.getSenders=function(){const s=A.apply(this,[]);return s.forEach(r=>r._pc=this),s});const t=e.RTCPeerConnection.prototype.addTrack;t&&(e.RTCPeerConnection.prototype.addTrack=function(){const s=t.apply(this,arguments);return s._pc=this,s}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function eW(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const A=e.RTCPeerConnection.prototype.getReceivers;A&&(e.RTCPeerConnection.prototype.getReceivers=function(){const n=A.apply(this,[]);return n.forEach(s=>s._pc=this),n}),OG(e,"track",t=>(t.receiver._pc=t.srcElement,t)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function tW(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(t){jZ("removeStream","removeTrack"),this.getSenders().forEach(n=>{n.track&&t.getTracks().includes(n.track)&&this.removeTrack(n)})})}function nW(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function sW(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const A=e.RTCPeerConnection.prototype.addTransceiver;A&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let n=arguments[1]&&arguments[1].sendEncodings;n===void 0&&(n=[]),n=[...n];const s=n.length>0;s&&n.forEach(a=>{if("rid"in a&&!/^[a-z0-9]{0,16}$/i.test(a.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in a&&!(parseFloat(a.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in a&&!(parseFloat(a.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const r=A.apply(this,arguments);if(s){const{sender:a}=r,o=a.getParameters();(!("encodings"in o)||o.encodings.length===1&&Object.keys(o.encodings[0]).length===0)&&(o.encodings=n,a.sendEncodings=n,this.setParametersPromises.push(a.setParameters(o).then(()=>{delete a.sendEncodings}).catch(()=>{delete a.sendEncodings})))}return r})}function rW(e){if(!(typeof e=="object"&&e.RTCRtpSender))return;const A=e.RTCRtpSender.prototype.getParameters;A&&(e.RTCRtpSender.prototype.getParameters=function(){const n=A.apply(this,arguments);return"encodings"in n||(n.encodings=[].concat(this.sendEncodings||[{}])),n})}function aW(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const A=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>A.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):A.apply(this,arguments)}}function iW(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const A=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>A.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):A.apply(this,arguments)}}var oW=Object.freeze({__proto__:null,shimAddTransceiver:sW,shimCreateAnswer:iW,shimCreateOffer:aW,shimGetDisplayMedia:mCA,shimGetParameters:rW,shimGetUserMedia:q8,shimOnTrack:$8,shimPeerConnection:$Z,shimRTCDataChannel:nW,shimReceiverGetStats:eW,shimRemoveStream:tW,shimSenderGetStats:AW});function BW(e){if(!(typeof e!="object"||!e.RTCPeerConnection)){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const A=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(n){this._localStreams||(this._localStreams=[]),this._localStreams.includes(n)||this._localStreams.push(n),n.getAudioTracks().forEach(s=>A.call(this,s,n)),n.getVideoTracks().forEach(s=>A.call(this,s,n))},e.RTCPeerConnection.prototype.addTrack=function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),a=1;a<s;a++)r[a-1]=arguments[a];return r&&r.forEach(o=>{this._localStreams?this._localStreams.includes(o)||this._localStreams.push(o):this._localStreams=[o]}),A.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(t){this._localStreams||(this._localStreams=[]);const n=this._localStreams.indexOf(t);if(n===-1)return;this._localStreams.splice(n,1);const s=t.getTracks();this.getSenders().forEach(r=>{s.includes(r.track)&&this.removeTrack(r)})})}}function cW(e){if(!(typeof e!="object"||!e.RTCPeerConnection)&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(t){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=t),this.addEventListener("track",this._onaddstreampoly=n=>{n.streams.forEach(s=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(s))return;this._remoteStreams.push(s);const r=new Event("addstream");r.stream=s,this.dispatchEvent(r)})})}});const A=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const n=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(s){s.streams.forEach(r=>{if(n._remoteStreams||(n._remoteStreams=[]),n._remoteStreams.indexOf(r)>=0)return;n._remoteStreams.push(r);const a=new Event("addstream");a.stream=r,n.dispatchEvent(a)})}),A.apply(n,arguments)}}}function lW(e){if(typeof e!="object"||!e.RTCPeerConnection)return;const A=e.RTCPeerConnection.prototype,t=A.createOffer,n=A.createAnswer,s=A.setLocalDescription,r=A.setRemoteDescription,a=A.addIceCandidate;A.createOffer=function(l,g){const u=arguments.length>=2?arguments[2]:arguments[0],f=t.apply(this,[u]);return g?(f.then(l,g),Promise.resolve()):f},A.createAnswer=function(l,g){const u=arguments.length>=2?arguments[2]:arguments[0],f=n.apply(this,[u]);return g?(f.then(l,g),Promise.resolve()):f};let o=function(c,l,g){const u=s.apply(this,[c]);return g?(u.then(l,g),Promise.resolve()):u};A.setLocalDescription=o,o=function(c,l,g){const u=r.apply(this,[c]);return g?(u.then(l,g),Promise.resolve()):u},A.setRemoteDescription=o,o=function(c,l,g){const u=a.apply(this,[c]);return g?(u.then(l,g),Promise.resolve()):u},A.addIceCandidate=o}function gW(e){const A=e&&e.navigator;if(A.mediaDevices&&A.mediaDevices.getUserMedia){const t=A.mediaDevices,n=t.getUserMedia.bind(t);A.mediaDevices.getUserMedia=s=>n(dW(s))}!A.getUserMedia&&A.mediaDevices&&A.mediaDevices.getUserMedia&&(A.getUserMedia=(function(n,s,r){A.mediaDevices.getUserMedia(n).then(s,r)}).bind(A))}function dW(e){return e&&e.video!==void 0?Object.assign({},e,{video:S8(e.video)}):e}function uW(e){if(!e.RTCPeerConnection)return;const A=e.RTCPeerConnection;e.RTCPeerConnection=function(n,s){if(n&&n.iceServers){const r=[];for(let a=0;a<n.iceServers.length;a++){let o=n.iceServers[a];o.urls===void 0&&o.url?(jZ("RTCIceServer.url","RTCIceServer.urls"),o=JSON.parse(JSON.stringify(o)),o.urls=o.url,delete o.url,r.push(o)):r.push(n.iceServers[a])}n.iceServers=r}return new A(n,s)},e.RTCPeerConnection.prototype=A.prototype,"generateCertificate"in A&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get(){return A.generateCertificate}})}function GW(e){typeof e=="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function fW(e){const A=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(n){if(n){typeof n.offerToReceiveAudio<"u"&&(n.offerToReceiveAudio=!!n.offerToReceiveAudio);const s=this.getTransceivers().find(a=>a.receiver.track.kind==="audio");n.offerToReceiveAudio===!1&&s?s.direction==="sendrecv"?s.setDirection?s.setDirection("sendonly"):s.direction="sendonly":s.direction==="recvonly"&&(s.setDirection?s.setDirection("inactive"):s.direction="inactive"):n.offerToReceiveAudio===!0&&!s&&this.addTransceiver("audio",{direction:"recvonly"}),typeof n.offerToReceiveVideo<"u"&&(n.offerToReceiveVideo=!!n.offerToReceiveVideo);const r=this.getTransceivers().find(a=>a.receiver.track.kind==="video");n.offerToReceiveVideo===!1&&r?r.direction==="sendrecv"?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":r.direction==="recvonly"&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):n.offerToReceiveVideo===!0&&!r&&this.addTransceiver("video",{direction:"recvonly"})}return A.apply(this,arguments)}}function hW(e){typeof e!="object"||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var wW=Object.freeze({__proto__:null,shimAudioContext:hW,shimCallbacksAPI:lW,shimConstraints:dW,shimCreateOfferLegacy:fW,shimGetUserMedia:gW,shimLocalStreamsAPI:BW,shimRTCIceServerUrls:uW,shimRemoteStreamsAPI:cW,shimTrackEventTransceiver:GW}),Ak={exports:{}},QW;function ECA(){return QW||(QW=1,(function(e){const A={};A.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},A.localCName=A.generateIdentifier(),A.splitLines=function(t){return t.trim().split(`
|
|
99
99
|
`).map(n=>n.trim())},A.splitSections=function(t){return t.split(`
|
|
100
100
|
m=`).map((s,r)=>(r>0?"m="+s:s).trim()+`\r
|