PageSourceSearch

https://www.hotel-royal.it/_next/static/chunks/3676-f4857e3c8d2267e5.js?dpl=dpl_CPnsRHEe75WEPXH6qiV9aJWmw3TY

js hotel-royal.it collected 2026-10-04 01:48:24 UTC 40,912 bytes, 3 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3676],{4293:(t,e,s)=>{s.d(e,{a:()=>r,b:()=>v,c:()=>d,e:()=>u,s:()=>p});var n=s(60867);function i(t,e,s,i,{assignment:r}){if(!e.context)throw Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");let o={},a={context:e.context,event:s.event,spawn:function(t,{machine:e,context:s},i,r){let o=(o,a)=>{if("string"!=typeof o)return(0,n.A)(o,{id:a?.id,parent:t.self,syncSnapshot:a?.syncSnapshot,input:a?.input,src:o,systemId:a?.systemId});{let u=(0,n.z)(e,o);if(!u)throw Error(`Actor logic '${o}' not implemented in machine '${e.id}'`);let c=(0,n.A)(u,{id:a?.id,parent:t.self,syncSnapshot:a?.syncSnapshot,input:"function"==typeof a?.input?a.input({context:s,event:i,self:t.self}):a?.input,src:o,systemId:a?.systemId});return r[c.id]=c,c}};return(e,s)=>{let i=o(e,s);return r[i.id]=i,t.defer(()=>{i._processingStatus!==n.T.Stopped&&i.start()}),i}}(t,e,s.event,o),self:t.self,system:t.system},u={};if("function"==typeof r)u=r(a,i);else for(let t of Object.keys(r)){let e=r[t];u[t]="function"==typeof e?e(a,i):e}let c=Object.assign({},e.context,u);return[(0,n.U)(e,{context:c,children:Object.keys(o).length?{...e.children,...o}:e.children}),void 0,void 0]}function r(t){function e(t,e){}return e.type="xstate.assign",e.assignment=t,e.resolve=i,e}function o(t,e,s,n,{event:i}){return[e,{event:"function"==typeof i?i(s,n):i},void 0]}function a(t,{event:e}){t.defer(()=>t.emit(e))}function u(t){function e(t,e){}return e.type="xstate.emit",e.event=t,e.resolve=o,e.execute=a,e}let c=function(t){return t.Parent="#_parent",t.Internal="#_internal",t}({});function h(t,e,s,n,{to:i,event:r,id:o,delay:a},u){let h,l,f=e.machine.implementations.delays;if("string"==typeof r)throw Error(`Only event objects may be used with sendTo; use sendTo({ type: "${r}" }) instead`);let d="function"==typeof r?r(s,n):r;if("string"==typeof a){let t=f&&f[a];h="function"==typeof t?t(s,n):t}else h="function"==typeof a?a(s,n):a;let p="function"==typeof i?i(s,n):i;if("string"==typeof p){if(!(l=p===c.Parent?t.self._parent:p===c.Internal?t.self:p.startsWith("#_")?e.children[p.slice(2)]:u.deferredActorIds?.includes(p)?p:e.children[p]))throw Error(`Unable to send event to actor '${p}' from machine '${e.machine.id}'.`)}else l=p||t.self;return[e,{to:l,targetId:"string"==typeof p?p:void 0,event:d,id:o,delay:h},void 0]}function l(t,e,s){"string"==typeof s.to&&(s.to=e.children[s.to])}function f(t,e){t.defer(()=>{let{to:s,event:i,delay:r,id:o}=e;if("number"==typeof r){t.system.scheduler.schedule(t.self,s,i,r,o);return}t.system._relay(t.self,s,i.type===n.V?(0,n.W)(t.self.id,i.data):i)})}function d(t,e,s){function n(t,e){}return n.type="xstate.sendTo",n.to=t,n.event=e,n.id=s?.id,n.delay=s?.delay,n.resolve=h,n.retryResolve=l,n.execute=f,n}function p(t,e){return d(c.Parent,t,e)}function y(t,e,s,i,{collect:o}){let a=[],c=function(t){a.push(t)};return c.assign=(...t)=>{a.push(r(...t))},c.cancel=(...t)=>{a.push((0,n.M)(...t))},c.raise=(...t)=>{a.push((0,n.O)(...t))},c.sendTo=(...t)=>{a.push(d(...t))},c.sendParent=(...t)=>{a.push(p(...t))},c.spawnChild=(...t)=>{a.push((0,n.P)(...t))},c.stopChild=(...t)=>{a.push((0,n.R)(...t))},c.emit=(...t)=>{a.push(u(...t))},o({context:s.context,event:s.event,enqueue:c,check:t=>(0,n.e)(t,e.context,s.event,e),self:t.self,system:t.system},i),[e,void 0,a]}function v(t){function e(t,e){}return e.type="xstate.enqueueActions",e.collect=t,e.resolve=y,e}},28662:(t,e,s)=>{s.d(e,{Q:()=>a});var n=s(1125),i=s(98175),r=s(57173),o=s(77020);function a(t){return(0,n.N)(function(e,s){(0,r.Tg)(t).subscribe((0,i._)(s,function(){return s.complete()},o.l)),s.closed||e.subscribe(s)})}},30208:(t,e,s)=>{s.d(e,{DT:()=>r,mj:()=>f}),s(80898);var n=s(60867),i=s(4293);function r(t,e){let s=(0,n.t)(e);if(!s.includes(t.type)){let e=1===s.length?`type "${s[0]}"`:`one of types "${s.join('", "')}"`;throw Error(`Expected event ${JSON.stringify(t)} to have ${e}`)}}let o=new WeakMap;function a(t,e,s){let n=o.get(t);return n?e in n||(n[e]=s()):(n={[e]:s()},o.set(t,n)),n[e]}let u={},c=t=>"string"==typeof t?{type:t}:"function"==typeof t?"resolve"in t?{type:t.type}:{type:t.name}:t;class h{constructor(t,e){if(this.config=t,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=e._parent,this.key=e._key,this.machine=e._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join(n.S),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?(0,n.m)(this.config.states,(t,e)=>new h(t,{_parent:this,_key:e,_machine:this.machine})):u,"compound"===this.type&&!this.config.initial)throw Error(`No initial state specified for c
1ompound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=!0===this.config.history?"shallow":this.config.history||!1,this.entry=(0,n.t)(this.config.entry).slice(),this.exit=(0,n.t)(this.config.exit).slice(),this.meta=this.config.meta,this.output="final"!==this.type&&this.parent?void 0:this.config.output,this.tags=(0,n.t)(t.tags).slice()}_initialize(){this.transitions=(0,n.f)(this),this.config.always&&(this.always=(0,n.a)(this.config.always).map(t=>(0,n.b)(this,n.N,t))),Object.keys(this.states).forEach(t=>{this.states[t]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(c),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(t=>`#${t.id}`),source:`#${this.id}`,actions:this.initial.actions.map(c),eventType:null})}:void 0,history:this.history,states:(0,n.m)(this.states,t=>t.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(t=>({...t,actions:t.actions.map(c)})),entry:this.entry.map(c),exit:this.exit.map(c),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return a(this,"invoke",()=>(0,n.t)(this.config.invoke).map((t,e)=>{let{src:s,systemId:i}=t,r=t.id??(0,n.c)(this.id,e),o="string"==typeof s?s:`xstate.invoke.${(0,n.c)(this.id,e)}`;return{...t,src:o,id:r,systemId:i,toJSON(){let{onDone:e,onError:s,...n}=t;return{...n,type:"xstate.invoke",src:o,id:r}}}}))}get on(){return a(this,"on",()=>[...this.transitions].flatMap(([t,e])=>e.map(e=>[t,e])).reduce((t,[e,s])=>(t[e]=t[e]||[],t[e].push(s),t),{}))}get after(){return a(this,"delayedTransitions",()=>(0,n.g)(this))}get initial(){return a(this,"initial",()=>(0,n.d)(this,this.config.initial))}next(t,e){let s,i=e.type,r=[];for(let o of a(this,`candidates-${i}`,()=>(0,n.h)(this,i))){let{guard:a}=o,u=t.context,c=!1;try{c=!a||(0,n.e)(a,u,e,t)}catch(e){let t="string"==typeof a?a:"object"==typeof a?a.type:void 0;throw Error(`Unable to evaluate guard ${t?`'${t}' `:""}in transition for event '${i}' in state node '${this.id}':
2${e.message}`)}if(c){r.push(...o.actions),s=o;break}}return s?[s]:void 0}get events(){return a(this,"events",()=>{let{states:t}=this,e=new Set(this.ownEvents);if(t)for(let s of Object.keys(t)){let n=t[s];if(n.states)for(let t of n.events)e.add(`${t}`)}return Array.from(e)})}get ownEvents(){return Array.from(new Set([...this.transitions.keys()].filter(t=>this.transitions.get(t).some(t=>!(!t.target&&!t.actions.length&&!t.reenter)))))}}class l{constructor(t,e){this.config=t,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=t.id||"(machine)",this.implementations={actors:e?.actors??{},actions:e?.actions??{},delays:e?.delays??{},guards:e?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new h(t,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events}provide(t){let{actions:e,guards:s,actors:n,delays:i}=this.implementations;return new l(this.config,{actions:{...e,...t.actions},guards:{...s,...t.guards},actors:{...n,...t.actors},delays:{...i,...t.delays}})}resolveState(t){let e=(0,n.r)(this.root,t.value),s=(0,n.i)((0,n.j)(this.root,e));return(0,n.k)({_nodes:[...s],context:t.context||{},children:{},status:(0,n.l)(s,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,e,s){return(0,n.n)(t,e,s,[]).snapshot}microstep(t,e,s){return(0,n.n)(t,e,s,[]).microstates}getTransitionData(t,e){return(0,n.o)(this.root,t.value,t,e)||[]}getPreInitialState(t,e,s){let{context:r}=this.config,o=(0,n.k)({context:"function"!=typeof r&&r?r:{},_nodes:[this.root],children:{},status:"active"},this);return"function"==typeof r?(0,n.p)(o,e,t,[(0,i.a)(({spawn:t,event:e,self:s})=>r({spawn:t,input:e.input,self:s}))],s,void 0):o}getInitialSnapshot(t,e){let s=(0,n.q)(e),i=[],r=this.getPreInitialState(t,s,i),o=(0,n.s)([{target:[...(0,n.u)(this.root)],source:this.root,reenter
2:!0,actions:[],eventType:null,toJSON:null}],r,t,s,!0,i),{snapshot:a}=(0,n.n)(o,s,t,i);return a}start(t){Object.values(t.children).forEach(t=>{"active"===t.getSnapshot().status&&t.start()})}getStateNodeById(t){let e=(0,n.v)(t),s=e.slice(1),i=(0,n.w)(e[0])?e[0].slice(1):e[0],r=this.idMap.get(i);if(!r)throw Error(`Child state node '#${i}' does not exist on machine '${this.id}'`);return(0,n.x)(r,s)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,e){return(0,n.y)(t,e)}restoreSnapshot(t,e){let s={},i=t.children;Object.keys(i).forEach(t=>{let r=i[t],o=r.snapshot,a=r.src,u="string"==typeof a?(0,n.z)(this,a):a;if(!u)return;let c=(0,n.A)(u,{id:t,parent:e.self,syncSnapshot:r.syncSnapshot,snapshot:o,src:a,systemId:r.systemId});s[t]=c});let r=(0,n.k)({...t,children:s,_nodes:Array.from((0,n.i)((0,n.j)(this.root,t.value)))},this),o=new Set;return!function t(e,s){if(!o.has(e))for(let i in o.add(e),e){let r=e[i];if(r&&"object"==typeof r){if("xstate$$type"in r&&r.xstate$$type===n.$){e[i]=s[r.id];continue}t(r,s)}}}(r.context,s),r}}function f({schemas:t,actors:e,actions:s,guards:n,delays:i}){return{createMachine:r=>new l({...r,schemas:t},{actors:e,actions:s,guards:n,delays:i})}}},40529:(t,e,s)=>{s.d(e,{R:()=>function t(e,s,p,y){if((0,u.T)(p)&&(y=p,p=void 0),y)return t(e,s,p).pipe((0,c.I)(y));var v,g,m,_=(0,n.zs)((v=e,(0,u.T)(v.addEventListener)&&(0,u.T)(v.removeEventListener))?l.map(function(t){return function(n){return e[t](s,n,p)}}):(g=e,(0,u.T)(g.addListener)&&(0,u.T)(g.removeListener))?h.map(d(e,s)):(m=e,(0,u.T)(m.on)&&(0,u.T)(m.off))?f.map(d(e,s)):[],2),S=_[0],x=_[1];if(!S&&(0,a.X)(e))return(0,o.Z)(function(e){return t(e,s,p)})((0,i.Tg)(e));if(!S)throw TypeError("Invalid event target");return new r.c(function(t){var e=function(){for(var e=[],s=0;s<arguments.length;s++)e[s]=arguments[s];return t.next(1<e.length?e:e[0])};return S(e),function(){return x(e)}})}});var n=s(39249),i=s(57173),r=s(94354),o=s(49967),a=s(56534),u=s(91208),c=s(781),h=["addListener","removeListener"],l=["addEventListener","removeEventListener"],f=["on","off"];function d(t,e){return function(s){return function(n){return t[s](e,n)}}}},46295:(t,e,s)=>{s.d(e,{J:()=>i});var n=s(33670);function i(t){let e=(0,n.useRef)(null);return(0,n.useInsertionEffect)(()=>{e.current=t},[t]),(0,n.useCallback)((...t)=>(0,e.current)(...t),[])}},60867:(t,e,s)=>{s.d(e,{$:()=>O,A:()=>P,D:()=>H,E:()=>Z,G:()=>U,L:()=>k,M:()=>D,N:()=>o,O:()=>tJ,P:()=>J,R:()=>B,S:()=>r,T:()=>N,U:()=>tC,V:()=>u,W:()=>l,X:()=>c,a:()=>b,b:()=>ta,c:()=>$,d:()=>tc,e:()=>Q,f:()=>tu,g:()=>to,h:()=>tr,i:()=>tt,j:()=>tv,k:()=>tR,l:()=>tn,m:()=>g,n:()=>tE,o:()=>function t(e,s,n,i){if("string"==typeof s){let t=tp(e,s).next(n,i);return t&&t.length?t:e.next(n,i)}if(1===Object.keys(s).length){let r=Object.keys(s),o=t(tp(e,r[0]),s[r[0]],n,i);return o&&o.length?o:e.next(n,i)}let r=[];for(let o of Object.keys(s)){let a=s[o];if(!a)continue;let u=t(tp(e,o),a,n,i);u&&r.push(...u)}return r.length?r:e.next(n,i)},p:()=>t$,q:()=>f,r:()=>tj,s:()=>tb,t:()=>_,u:()=>td,v:()=>y,w:()=>ti,x:()=>ty,y:()=>tD,z:()=>E});let n=t=>{if("undefined"==typeof window)return;let e=function(){let t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==s.g?s.g:void 0;if(t.__xstate__)return t.__xstate__}();e&&e.register(t)};class i{constructor(t){this._process=t,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(t){let e={value:t,next:null};if(this._current){this._last.next=e,this._last=e;return}this._current=e,this._last=e,this._active&&this.flush()}flush(){for(;this._current;){let t=this._current;this._process(t.value),this._current=t.next}this._last=null}}let r=".",o="",a="xstate.init",u="xstate.error",c="xstate.stop";function h(t,e){return{type:`xstate.done.state.${t}`,output:e}}function l(t,e){return{type:`xstate.error.actor.${t}`,error:e,actorId:t}}function f(t){return{type:a,input:t}}function d(t){setTimeout(()=>{throw t})}let p="function"==typeof Symbol&&Symbol.observable||"@@observable";function y(t){if(x(t))return t;let e=[],s="";for(let n=0;n<t.length;n++){switch(t.charCodeAt(n)){case 92:s+=t[n+1],n++;continue;case 46:e.push(s),s="";continue}s+=t[n]}return e.push(s),e}function v(t){var e;return(e=t)&&"object"==typeof e&&"machine"in e&&"value"in e?t.value:"string"!=typeof t?t:function(t){if(1===t.length)return t[0];let e={},s=e;for(let e=0;e<t.length-1;e++)if(e===t.length-2)s[t[e]]=t[e+1];else{let n=s;s={},n[t[e]]=s}return e}(y(t))}function g(t,e){let s={},n=Object.keys(t);for(let i=0;i<n.length;i++){let r=n[i];s[r]=e(t[r],r,t,i)}return s}function m(t){return x(t)?t:[t]}function _(t){var e;return void 0===t?[]:x(e=t)?e:[e]}function S(t,e,s,n){return"function"==typeof t?t({context:e,event:s,self:n}):t}function x(t){return Array.isArray(t)}function b(t){var e;return(x(e=t)?e:[e]).map(t=>void 0===t||"string"==typeof t?{target:t}:t)}function w(t){if(void 0!==t&&""!==t)return _(t)}function k(t,e,s){let n="object"==typeof t,i=n?t:void 0;return{next:(n?t.next:t)?.bind(i),error:(n?t.error:e)?.bind(i),complete:(n?t.complete:s)?.bind(i)}}function $(t,e){return`${e}.${t}`}function E(t,e){let s=e.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!s)return t.implementations.actors[e];let[,n,i]=s,r=t.getStateNodeById(i).config.invoke;return(Array.isArray(r)?r[n]:r).src}function I(t,e){return`${t.sessionId}.${e}`}let T=0,j=!1,O=1,N=function(t){return t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped",t}({}),A={clock:{setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},logger:console.log.bind(console),devTools:!1};class M{constructor(t,e){this.logic=t,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new i(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=N.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this._systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];let s={...A,...e},{clock:n,logger:r,parent:o,syncSnapshot:a,id:u,systemId:c,inspect:h}=s;this.system=o?o.system:function(t,e){let s=new Map,n=new Map,i=new WeakMap,r=new Set,o={},{clock:a,logger:u}=e,c={schedule:(t,e,s,n,i=Math.random().toString(36).slice(2))=>{let r={source:t,target:e,event:s,delay:n,id:i,startedAt:Date.now()},u=I(t,i);h._snapshot._scheduledEvents[u]=r;let c=a.setTimeout(()=>{delete o[u],delete h._snapshot._scheduledEvents[u],h._relay(t,e,s)},n);o[u]=c},cancel:(t,e)=>{let s=I(t,e),n=o[s];delete o[s],delete h._snapshot._scheduledEvents[s],void 0!==n&&a.clearTimeout(n)},cancelAll:t=>{for(let e in h._snapshot._scheduledEvents){let s=h._snapshot._scheduledEvents[e];s.source===t&&c.cancel(t,s.id)}}},h={_snapshot:{_scheduledEvents:(e?.snapshot&&e.snapshot.scheduler)??{}},_bookId:()=>`x:${T++}`,_register:(t,e)=>(s.set(t,e),t),_unregister:t=>{s.delete(t.sessionId);let e=i.get(t);void 0!==e&&(n.delete(e),i.delete(t))},get:t=>n.get(t),_set:(t,e)=>{let s=n.get(t);if(s&&s!==e)throw Error(`Actor with system ID '${t}' already exists.`);n.set(t,e),i.set(e,t)},inspect:t=>{let e=k(t);return r.add(e),{unsubscribe(){r.delete(e)}}},_sendInspectionEvent:e=>{if(!r.size)return;let s={...e,rootId:t.sessionId};r.forEach(t=>t.next?.(s))},_relay:(t,e,s)=>{h._sendInspectionEvent({type:"@xstate.event",sourceRef:t,actorRef:e,event:s}),e._send(s)},scheduler:c,getSnapshot:()=>({_scheduledEvents:{...h._snapshot._scheduledEvents}}),start:()=>{let t=h._snapshot._scheduledEvents;for(let e in h._snapshot._scheduledEvents={},t){let{source:s,target:n,event:i,delay:r,id:o}=t[e];c.schedule(s,n,i,r,o)}},_clock:a,_logger:u};return h}(this,{clock:n,logger:r}),h&&!o&&this.system.inspect(k(h)),this.sessionId=this.system._bookId(),this.id=u??this.sessionId,this.logger=e?.logger??this.system._logger,this.clock=e?.clock??this.system._clock,this._parent=o,this._syncSnapshot=a,this.options=s,this.src=s.src??t,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:t=>{this._deferred.push(t)},system:this.system,stopChild:t=>{if(t._parent!==this)throw Error(`Cannot stop child actor ${t.id} of ${this.id} because it is not a child`);t._stop()},emit:t=>{let e=this.eventListeners.get(t.type),s=this.eventListeners.get("*");if(e||s)for(let n of[...e?e.values():[],...s?s.values():[]])n(t)},actionExecutor:t=>{let e=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:t.type,params:t.params}}),!t.exec)return;let e=j;try{j=!0,t.exec(t.info,t.params)}finally{j=e}};this._processingStatus===N.Running?e():this._deferred.push(e)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),c&&(this._systemId=c,this.system._set(c,this)),this._initState(e?.snapshot??e?.state),c&&"active"!==this._snapshot.status&&this.system._unregister(this)}_initState(t){try{this._snapshot=t?this.logic.restoreSnapshot?this.logic.restoreSnapshot(t,this._actorScope):t:this.logic.getInitialSnapshot(this._actorScope,this.options?.input)}catch(t){this._snapshot={status:"error",output:void 0,error:t}}}update(t,e){let s;for(this._snapshot=t;s=this._deferred.shift();)try{s()}catch(e){this._deferred.length=0,this._snapshot={...t,status:"error",error:e}}switch(this._snapshot.status){case"active":for(let e of this.observers)try{e.
2next?.(t)}catch(t){d(t)}break;case"done":var n;for(let e of this.observers)try{e.next?.(t)}catch(t){d(t)}this._stopProcedure(),this._complete(),this._doneEvent=(n=this.id,{type:`xstate.done.actor.${n}`,output:this._snapshot.output,actorId:n}),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error)}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:e,snapshot:t})}subscribe(t,e,s){let n=k(t,e,s);if(this._processingStatus!==N.Stopped)this.observers.add(n);else switch(this._snapshot.status){case"done":try{n.complete?.()}catch(t){d(t)}break;case"error":{let t=this._snapshot.error;if(n.error)try{n.error(t)}catch(t){d(t)}else d(t)}}return{unsubscribe:()=>{this.observers.delete(n)}}}on(t,e){let s=this.eventListeners.get(t);s||(s=new Set,this.eventListeners.set(t,s));let n=e.bind(void 0);return s.add(n),{unsubscribe:()=>{s.delete(n)}}}start(){if(this._processingStatus===N.Running)return this;this._syncSnapshot&&this.subscribe({next:t=>{"active"===t.status&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:t})},error:()=>{}}),this.system._register(this.sessionId,this),this._systemId&&this.system._set(this._systemId,this),this._processingStatus=N.Running;let t=f(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:t}),this._snapshot.status){case"done":return this.update(this._snapshot,t),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(t){return this._snapshot={...this._snapshot,status:"error",error:t},this._error(t),this}return this.update(this._snapshot,t),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let e,s;try{e=this.logic.transition(this._snapshot,t,this._actorScope)}catch(t){s={err:t}}if(s){let{err:t}=s;this._snapshot={...this._snapshot,status:"error",error:t},this._error(t);return}this.update(e,t),t.type===c&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===N.Stopped||((this.mailbox.clear(),this._processingStatus===N.NotStarted)?this._processingStatus=N.Stopped:this.mailbox.enqueue({type:c})),this}stop(){if(this._parent)throw Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(let t of this.observers)try{t.complete?.()}catch(t){d(t)}this.observers.clear()}_reportError(t){if(!this.observers.size){this._parent||d(t);return}let e=!1;for(let s of this.observers){let n=s.error;e||=!n;try{n?.(t)}catch(t){d(t)}}this.observers.clear(),e&&d(t)}_error(t){this._stopProcedure(),this._reportError(t),this._parent&&this.system._relay(this,this._parent,l(this.id,t))}_stopProcedure(){return this._processingStatus!==N.Running||(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new i(this._process.bind(this)),this._processingStatus=N.Stopped,this.system._unregister(this)),this}_send(t){this._processingStatus!==N.Stopped&&this.mailbox.enqueue(t)}send(t){this.system._relay(void 0,this,t)}attachDevTools(){let{devTools:t}=this.options;t&&("function"==typeof t?t:n)(this)}toJSON(){return{xstate$$type:O,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[p](){return this}getSnapshot(){return this._snapshot}}function P(t,...[e]){return new M(t,e)}function R(t,e,s,n,{sendId:i}){return[e,{sendId:"function"==typeof i?i(s,n):i},void 0]}function C(t,e){t.defer(()=>{t.system.scheduler.cancel(t.self,e.sendId)})}function D(t){function e(t,e){}return e.type="xstate.cancel",e.sendId=t,e.resolve=R,e.execute=C,e}function L(t,e,s,n,{id:i,systemId:r,src:o,input:a,syncSnapshot:u}){let c,h,l="string"==typeof o?E(e.machine,o):o,f="function"==typeof i?i(s):i;return l&&(h="function"==typeof a?a({context:e.context,event:s.event,self:t.self}):a,c=P(l,{id:f,src:o,parent:t.self,syncSnapshot:u,systemId:r,input:h})),[tC(e,{children:{...e.children,[f]:c}}),{id:i,systemId:r,actorRef:c,src:o,input:h},void 0]}function z(t,{actorRef:e}){e&&t.defer(()=>{e._processingStatus!==N.Stopped&&e.start()})}function J(...[t,{id:e,systemId:s,input:n,syncSnapshot:i=!1}={}]){function r(t,e){}return r.type="xstate.spawnChild",r.id=e,r.systemId=s,r.src=t,r.input=n,r.syncSnapshot=i,r.resolve=L,r.execute=z,r}function V(t,e,s,n,{actorRef:i}){let r="function"==typeof i?i(s,n):i,o="string"==typeof r?e.children[r]:r,a=e.children;return o&&(a={...a},delete a[o.id]),[tC(e,{children:a}),o,void 0]}function W(t,e){if(e){if(t.system._unregister(e),e._processingStatus!==N.Running){t.stopChild(e);return}t.defer(()=>{t.stopChild(e)})}}function B(t){function e(t,e){}return e.type="xstate.stopChild",e.actorRef=t,e.resolve=V,e.execute=W,e}function q(t,e,{stateValue:s}){if("string"==typeof s&&ti(s)){let e=t.machine.getStateNodeById(s);return t._nodes.some(t=>t===e)}return t.matches(s)}function U(t){function e(){return!1}return e.check=q,e.stateValue=t,e}function X(t,{context:e,event:s},{guards:n}){return!Q(n[0],e,s,t)}function Z(t){function e(t,e){return!1}return e.check=X,e.guards=[t],e}function G(t,{context:e,event:s},{guards:n}){return n.every(n=>Q(n,e,s,t))}function H(t){function e(t,e){return!1}return e.check=G,e.guards=t,e}function Q(t,e,s,n){let{machine:i}=n,r="function"==typeof t,o=r?t:i.implementations.guards["string"==typeof t?t:t.type];if(!r&&!o)throw Error(`Guard '${"string"==typeof t?t:t.type}' is not implemented.'.`);if("function"!=typeof o)return Q(o,e,s,n);let a={context:e,event:s},u=r||"string"==typeof t?void 0:"params"in t?"function"==typeof t.params?t.params({context:e,event:s}):t.params:void 0;return"check"in o?o.check(n,a,o):o(a,u)}let F=t=>"atomic"===t.type||"final"===t.type;function K(t){return Object.values(t.states).filter(t=>"history"!==t.type)}function Y(t,e){let s=[];if(e===t)return s;let n=t.parent;for(;n&&n!==e;)s.push(n),n=n.parent;return s}function tt(t){let e=new Set(t),s=te(e);for(let t of e)if("compound"!==t.type||s.get(t)&&s.get(t).length){if("parallel"===t.type){for(let s of K(t))if("history"!==s.type&&!e.has(s))for(let t of tf(s))e.add(t)}}else tf(t).forEach(t=>e.add(t));for(let t of e){let s=t.parent;for(;s;)e.add(s),s=s.parent}return e}function te(t){let e=new Map;for(let s of t)e.has(s)||e.set(s,[]),s.parent&&(e.has(s.parent)||e.set(s.parent,[]),e.get(s.parent).push(s));return e}function ts(t,e){return function t(e,s){let n=s.get(e);if(!n)return{};if("compound"===e.type){let t=n[0];if(!t)return{};if(F(t))return t.key}let i={};for(let e of n)i[e.key]=t(e,s);return i}(t,te(tt(e)))}function tn(t,e){return"compound"===e.type?K(e).some(e=>"final"===e.type&&t.has(e)):"parallel"===e.type?K(e).every(e=>tn(t,e)):"final"===e.type}let ti=t=>"#"===t[0];function tr(t,e){return t.transitions.get(e)||[...t.transitions.keys()].filter(t=>{if("*"===t)return!0;
2if(!t.endsWith(".*"))return!1;let s=t.split("."),n=e.split(".");for(let t=0;t<s.length;t++){let e=s[t],i=n[t];if("*"===e)return t===s.length-1;if(e!==i)return!1}return!0}).sort((t,e)=>e.length-t.length).flatMap(e=>t.transitions.get(e))}function to(t){let e=t.config.after;if(!e)return[];let s=e=>{var s;let n=(s=t.id,{type:`xstate.after.${e}.${s}`}),i=n.type;return t.entry.push(tJ(n,{id:i,delay:e})),t.exit.push(D(i)),i};return Object.keys(e).flatMap(t=>{let n=e[t],i=Number.isNaN(+t)?t:+t,r=s(i);return _("string"==typeof n?{target:n}:n).map(t=>({...t,event:r,delay:i}))}).map(e=>{let{delay:s}=e;return{...ta(t,e.event,e),delay:s}})}function ta(t,e,s){let n=w(s.target),i=s.reenter??!1,o=function(t,e){if(void 0!==e)return e.map(e=>{if("string"!=typeof e)return e;if(ti(e))return t.machine.getStateNodeById(e);let s=e[0]===r;if(s&&!t.parent)return ty(t,e.slice(1));let n=s?t.key+e:e;if(t.parent)try{return ty(t.parent,n)}catch(e){throw Error(`Invalid transition definition for state node '${t.id}':
3${e.message}`)}else throw Error(`Invalid target: "${e}" is not a valid target from the root node. Did you mean ".${e}"?`)})}(t,n),a={...s,actions:_(s.actions),guard:s.guard,target:o,source:t,reenter:i,eventType:e,toJSON:()=>({...a,source:`#${t.id}`,target:o?o.map(t=>`#${t.id}`):void 0})};return a}function tu(t){let e=new Map;if(t.config.on)for(let s of Object.keys(t.config.on)){if(s===o)throw Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');let n=t.config.on[s];e.set(s,b(n).map(e=>ta(t,s,e)))}if(t.config.onDone){let s=`xstate.done.state.${t.id}`;e.set(s,b(t.config.onDone).map(e=>ta(t,s,e)))}for(let s of t.invoke){if(s.onDone){let n=`xstate.done.actor.${s.id}`;e.set(n,b(s.onDone).map(e=>ta(t,n,e)))}if(s.onError){let n=`xstate.error.actor.${s.id}`;e.set(n,b(s.onError).map(e=>ta(t,n,e)))}if(s.onSnapshot){let n=`xstate.snapshot.${s.id}`;e.set(n,b(s.onSnapshot).map(e=>ta(t,n,e)))}}for(let s of t.after){let t=e.get(s.eventType);t||(t=[],e.set(s.eventType,t)),t.push(s)}return e}function tc(t,e){let s="string"==typeof e?t.states[e]:e?t.states[e.target]:void 0;if(!s&&e)throw Error(`Initial state node "${e}" not found on parent state node #${t.id}`);let n={source:t,actions:e&&"string"!=typeof e?_(e.actions):[],eventType:null,reenter:!1,target:s?[s]:[],toJSON:()=>({...n,source:`#${t.id}`,target:s?[`#${s.id}`]:[]})};return n}function th(t){let e=w(t.config.target);return e?{target:e.map(e=>"string"==typeof e?ty(t.parent,e):e)}:t.parent.initial}function tl(t){return"history"===t.type}function tf(t){let e=td(t);for(let s of e)for(let n of Y(s,t))e.add(n);return e}function td(t){let e=new Set;return!function t(s){if(!e.has(s)){if(e.add(s),"compound"===s.type)t(s.initial.target[0]);else if("parallel"===s.type)for(let e of K(s))t(e)}}(t),e}function tp(t,e){if(ti(e))return t.machine.getStateNodeById(e);if(!t.states)throw Error(`Unable to retrieve child state '${e}' from '${t.id}'; no child states exist.`);let s=t.states[e];if(!s)throw Error(`Child state '${e}' does not exist on '${t.id}'`);return s}function ty(t,e){if("string"==typeof e&&ti(e))try{return t.machine.getStateNodeById(e)}catch{}let s=y(e).slice(),n=t;for(;s.length;){let t=s.shift();if(!t.length)break;n=tp(n,t)}return n}function tv(t,e){if("string"==typeof e){let s=t.states[e];if(!s)throw Error(`State '${e}' does not exist on '${t.id}'`);return[t,s]}let s=Object.keys(e),n=s.map(e=>tp(t,e)).filter(Boolean);return[t.machine.root,t].concat(n,s.reduce((s,n)=>{let i=tp(t,n);if(!i)return s;let r=tv(i,e[n]);return s.concat(r)},[]))}function tg(t,e){let s=t;for(;s.parent&&s.parent!==e;)s=s.parent;return s.parent===e}function tm(t,e,s){let n=new Set;for(let i of t){let t=!1,r=new Set;for(let o of n)if(function(t,e){let s=new Set(t),n=new Set(e);for(let t of s)if(n.has(t))return!0;for(let t of n)if(s.has(t))return!0;return!1}(tx([i],e,s),tx([o],e,s)))if(tg(i.source,o.source))r.add(o);else{t=!0;break}if(!t){for(let t of r)n.delete(t);n.add(i)}}return Array.from(n)}function t_(t,e){if(!t.target)return[];let s=new Set;for(let n of t.target)if(tl(n))if(e[n.id])for(let t of e[n.id])s.add(t);else for(let t of t_(th(n),e))s.add(t);else s.add(n);return[...s]}function tS(t,e){let s=t_(t,e);if(!s)return;if(!t.reenter&&s.every(e=>e===t.source||tg(e,t.source)))return t.source;let n=function(t){let[e,...s]=t;for(let t of Y(e,void 0))if(s.every(e=>tg(e,t)))return t}(s.concat(t.source));return n||(t.reenter?void 0:t.source.machine.root)}function tx(t,e,s){let n=new Set;for(let i of t)if(i.target?.length){let t=tS(i,s);for(let s of(i.reenter&&i.source===t&&n.add(t),e))tg(s,t)&&n.add(s)}return[...n]}function tb(t,e,s,n,i,r){if(!t.length)return e;let o=new Set(e._nodes),a=e.historyValue,u=tm(t,o,a),c=e;i||([c,a]=function(t,e,s,n,i,r,o,a){let u,c=t,h=tx(n,i,r);for(let t of(h.sort((t,e)=>e.order-t.order),h))for(let e of function(t){return Object.keys(t.states).map(e=>t.states[e]).filter(t=>"history"===t.type)}(t)){let s;s="deep"===e.history?e=>F(e)&&tg(e,t):e=>e.parent===t,(u??={...r})[e.id]=Array.from(i).filter(s)}for(let t of h)c=t$(c,e,s,[...t.exit,...t.invoke.map(t=>B(t.id))],o,void 0),i.delete(t);return[c,u||r]}(c,n,s,u,o,a,r,s.actionExecutor)),c=function(t,e,s,n,i,r,o,a){let u=t,c=new Set,l=new Set;(function(t,e,s,n){for(let i of t){let t=tS(i,e);for(let r of i.target||[])!tl(r)&&(i.source!==r||i.source!==t||i.reenter)&&(n.add(r),s.add(r)),tw(r,e,s,n);for(let r of t_(i,e)){let o=Y(r,t);t?.type==="parallel"&&o.push(t),tk(n,e,s,o,!i.source.parent&&i.reenter?void 0:t)}}})(n,o,l,c),a&&l.add(t.machine.root);let f=new Set;for(let t of[...c].sort((t,e)=>t.order-e.order)){i.add(t);let n=[];for(let e of(n.push(...t.entry),t.invoke))n.push(J(e.src,{...e,syncSnapshot:!!e.onSnapshot}));if(l.has(t)){let e=t.initial.actions;n.push(...e)}if(u=t$(u,e,s,n,r,t.invoke.map(t=>
3t.id)),"final"===t.type){let n=t.parent,o=n?.type==="parallel"?n:n?.parent,a=o||t;for(n?.type==="compound"&&r.push(h(n.id,void 0!==t.output?S(t.output,u.context,e,s.self):void 0));o?.type==="parallel"&&!f.has(o)&&tn(i,o);)f.add(o),r.push(h(o.id)),a=o,o=o.parent;if(o)continue;u=tC(u,{status:"done",output:function(t,e,s,n,i){if(void 0===n.output)return;let r=h(i.id,void 0!==i.output&&i.parent?S(i.output,t.context,e,s.self):void 0);return S(n.output,t.context,r,s.self)}(u,e,s,u.machine.root,a)})}}return u}(c=t$(c,n,s,u.flatMap(t=>t.actions),r,void 0),n,s,u,o,r,a,i);let l=[...o];"done"===c.status&&(c=t$(c,n,s,l.sort((t,e)=>e.order-t.order).flatMap(t=>t.exit),r,void 0));try{if(a===e.historyValue&&function(t,e){if(t.length!==e.size)return!1;for(let s of t)if(!e.has(s))return!1;return!0}(e._nodes,o))return c;return tC(c,{_nodes:l,historyValue:a})}catch(t){throw t}}function tw(t,e,s,n){var i,r,o,a;if(tl(t))if(e[t.id]){let o=e[t.id];for(let t of o)n.add(t),tw(t,e,s,n);for(let a of o){i=a,r=t.parent,tk(n,e,s,Y(i,r))}}else{let i=th(t);for(let r of i.target)n.add(r),i===t.parent?.initial&&s.add(t.parent),tw(r,e,s,n);for(let r of i.target){o=r,a=t.parent,tk(n,e,s,Y(o,a))}}else if("compound"===t.type){let[i]=t.initial.target;tl(i)||(n.add(i),s.add(i)),tw(i,e,s,n),tk(n,e,s,Y(i,t))}else if("parallel"===t.type)for(let i of K(t).filter(t=>!tl(t)))[...n].some(t=>tg(t,i))||(tl(i)||(n.add(i),s.add(i)),tw(i,e,s,n))}function tk(t,e,s,n,i){for(let r of n)if((!i||tg(r,i))&&t.add(r),"parallel"===r.type)for(let n of K(r).filter(t=>!tl(t)))[...t].some(t=>tg(t,n))||(t.add(n),tw(n,e,s,t))}function t$(t,e,s,n,i,r){let o=r?[]:void 0,a=function t(e,s,n,i,r,o){let{machine:a}=e,u=e;for(let e of i){var c;let i="function"==typeof e,h=i?e:(c="string"==typeof e?e:e.type,a.implementations.actions[c]),l={context:u.context,event:s,self:n.self,system:n.system},f=i||"string"==typeof e?void 0:"params"in e?"function"==typeof e.params?e.params({context:u.context,event:s}):e.params:void 0;if(!h||!("resolve"in h)){n.actionExecutor({type:"string"==typeof e?e:"object"==typeof e?e.type:e.name||"(anonymous)",info:l,params:f,exec:h});continue}let[d,p,y]=h.resolve(n,u,l,f,h,r);u=d,"retryResolve"in h&&o?.push([h,p]),"execute"in h&&n.actionExecutor({type:h.type,info:l,params:p,exec:h.execute.bind(null,n,p)}),y&&(u=t(u,s,n,y,r,o))}return u}(t,e,s,n,{internalQueue:i,deferredActorIds:r},o);return o?.forEach(([t,e])=>{t.retryResolve(s,a,e)}),a}function tE(t,e,s,n){let i=t,r=[];function o(t,e,n){s.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:s.self,event:e,snapshot:t,_transitions:n}),r.push(t)}if(e.type===c)return o(i=tC(tI(i,e,s),{status:"stopped"}),e,[]),{snapshot:i,microstates:r};let u=e;if(u.type!==a){let e=u,a=e.type.startsWith("xstate.error.actor"),c=tT(e,i);if(a&&!c.length)return o(i=tC(t,{status:"error",error:e.error}),e,[]),{snapshot:i,microstates:r};o(i=tb(c,t,s,u,!1,n),e,c)}let h=!0;for(;"active"===i.status;){let t=h?function(t,e){let s=new Set;for(let n of t._nodes.filter(F))t:for(let i of[n].concat(Y(n,void 0)))if(i.always){for(let n of i.always)if(void 0===n.guard||Q(n.guard,t.context,e,t)){s.add(n);break t}}return tm(Array.from(s),new Set(t._nodes),t.historyValue)}(i,u):[],e=t.length?i:void 0;if(!t.length){if(!n.length)break;t=tT(u=n.shift(),i)}h=(i=tb(t,i,s,u,!1,n))!==e,o(i,u,t)}return"active"!==i.status&&tI(i,u,s),{snapshot:i,microstates:r}}function tI(t,e,s){return t$(t,e,s,Object.values(t.children).map(t=>B(t)),[],void 0)}function tT(t,e){return e.machine.getTransitionData(e,t)}function tj(t,e){let s=tt(tv(t,e));return ts(t,[...s])}let tO=function(t){return function t(e,s){let n=v(e),i=v(s);return"string"==typeof i?"string"==typeof n&&i===n:"string"==typeof n?n in i:Object.keys(n).every(e=>e in i&&t(n[e],i[e]))}(t,this.value)},tN=function(t){return this.tags.has(t)},tA=function(t){let e=this.machine.getTransitionData(this,t);return!!e?.length&&e.some(t=>void 0!==t.target||t.actions.length)},tM=function(){let{_nodes:t,tags:e,machine:s,getMeta:n,toJSON:i,can:r,hasTag:o,matches:a,...u}=this;return{...u,tags:Array.from(e)}},tP=function(){return this._nodes.reduce((t,e)=>(void 0!==e.meta&&(t[e.id]=e.meta),t),{})};function tR(t,e){return{status:t.status,output:t.output,error:t.error,machine:e,context:t.context,_nodes:t._nodes,value:ts(e.root,t._nodes),tags:new Set(t._nodes.flatMap(t=>t.tags)),children:t.children,historyValue:t.historyValue||{},matches:tO,hasTag:tN,can:tA,getMeta:tP,toJSON:tM}}function tC(t,e={}){return tR({...t,...e},t.machine)}function tD(t,e){let{_nodes:s,tags:n,machine:i,children:r,context:o,can:a,hasTag:u,matches:c,getMeta:h,toJSON:l,...f}=t,d={};for(let t in r){let s=r[t];d[t]={snapshot:s.getPersistedSnapshot(e),src:s.src,systemId:s._systemId,syncSnapshot:s._syncSnapshot}}return{...f,context:function t(e){let s;for(let n in e){let i=e[n];if(i&&"object"==typeof i)if("sessionId"in i&&"send"in i&&"ref"in i)(s??=Array.isArray(e)?e.slice():{...e})[n]={xstate$$type:O,id:i.id};else{let r=t(i);r!==i&&((s??=Array.isArray(e)?e.slice():{...e})[n]=r)}}return s??e}(o),children:d}}function tL(t,e,s,n,{event:i,id:r,delay:o},{internalQueue:a}){let u,c=e.machine.implementations.delays;if("string"==typeof i)throw Error(`Only event objects may be used with raise; use raise({ type: "${i}" }) instead`);let h="function"==typeof i?i(s,n):i;
3if("string"==typeof o){let t=c&&c[o];u="function"==typeof t?t(s,n):t}else u="function"==typeof o?o(s,n):o;return"number"!=typeof u&&a.push(h),[e,{event:h,id:r,delay:u},void 0]}function tz(t,e){let{event:s,delay:n,id:i}=e;if("number"==typeof n){t.defer(()=>{let e=t.self;t.system.scheduler.schedule(e,e,s,n,i)});return}}function tJ(t,e){function s(t,e){}return s.type="xstate.raise",s.event=t,s.id=e?.id,s.delay=e?.delay,s.resolve=tL,s.execute=tz,s}},72961:(t,e,s)=>{s.d(e,{H:()=>r});var n=s(49967),i=s(91208);function r(t,e){return(0,i.T)(e)?(0,n.Z)(t,e,1):(0,n.Z)(t,1)}},77246:(t,e,s)=>{s.d(e,{s:()=>o});var n=s(79332),i=s(1125),r=s(98175);function o(t){return t<=0?function(){return n.w}:(0,i.N)(function(e,s){var n=0;e.subscribe((0,r._)(s,function(e){++n<=t&&(s.next(e),t<=n&&s.complete())}))})}},80898:(t,e,s)=>{s.d(e,{H6:()=>p,OX:()=>u,SP:()=>r,Sx:()=>f});var n=s(60867);let i=new WeakMap;function r(t){return{config:t,start:(e,s)=>{let{self:n,system:r,emit:o}=s,a={receivers:void 0,dispose:void 0};i.set(n,a),a.dispose=t({input:e.input,system:r,self:n,sendBack:t=>{"stopped"!==n.getSnapshot().status&&n._parent&&r._relay(n,n._parent,t)},receive:t=>{a.receivers??=new Set,a.receivers.add(t)},emit:o})},transition:(t,e,s)=>{let r=i.get(s.self);return e.type===n.X?(t={...t,status:"stopped",error:void 0},r.dispose?.()):r.receivers?.forEach(t=>t(e)),t},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,input:e}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t}}let o="xstate.observable.error",a="xstate.observable.complete";function u(t){return{config:t,transition:(t,e)=>{if("active"!==t.status)return t;switch(e.type){case o:return{...t,status:"error",error:e.data,input:void 0,_subscription:void 0};case a:return{...t,status:"done",input:void 0,_subscription:void 0};case n.X:return t._subscription.unsubscribe(),{...t,status:"stopped",input:void 0,_subscription:void 0};default:return t}},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,context:void 0,input:e,_subscription:void 0}),start:(e,{self:s,system:n,emit:i})=>{"done"!==e.status&&(e._subscription=t({input:e.input,system:n,self:s,emit:i}).subscribe({next:t=>{s._parent&&n._relay(s,s._parent,t)},error:t=>{n._relay(s,s,{type:o,data:t})},complete:()=>{n._relay(s,s,{type:a})}}))},getPersistedSnapshot:({_subscription:t,...e})=>e,restoreSnapshot:t=>({...t,_subscription:void 0})}}let c="xstate.promise.resolve",h="xstate.promise.reject",l=new WeakMap;function f(t){return{config:t,transition:(t,e,s)=>{if("active"!==t.status)return t;switch(e.type){case c:{let s=e.data;return{...t,status:"done",output:s,input:void 0}}case h:return{...t,status:"error",error:e.data,input:void 0};case n.X:return l.get(s.self)?.abort(),{...t,status:"stopped",input:void 0};default:return t}},start:(e,{self:s,system:n,emit:i})=>{if("active"!==e.status)return;let r=new AbortController;l.set(s,r),Promise.resolve(t({input:e.input,system:n,self:s,signal:r.signal,emit:i})).then(t=>{"active"===s.getSnapshot().status&&(l.delete(s),n._relay(s,s,{type:c,data:t}))},t=>{"active"===s.getSnapshot().status&&(l.delete(s),n._relay(s,s,{type:h,data:t}))})},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,input:e}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t}}let d=function(t,e){return{config:t,transition:(e,s,n)=>({...e,context:t(e.context,s,n)}),getInitialSnapshot:(t,s)=>({status:"active",output:void 0,error:void 0,context:"function"==typeof e?e({input:s}):e}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t}}(t=>void 0,void 0);function p(){return(0,n.A)(d)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.